Can I use separate servers for web and application?


EJB design: Can I use separate servers for web and application?

  1. Hi,
    I am developing an EJB application. I wanted to use Weblogic 7.0 as the application server and Tomcat as the webserver. Can I use like that? Will I be able to do a lookup of the remote/home interface from the servlet, which is running in tomcat and the beans being deployed in weblogic? Can I run the servers each on different machines?

  2. Yes that the whole reason for remote interfaces

    just remember to deploy the remote interfaces in a jar file in your tomcat web apps class path same goes with any client stuff that is needed for the weblogic
  3. I added the jar containing the home and remote interface in the classpath of the tomcat server. When I tried out the application, while loading the servlet, it gave an exception in tomcat logs as ClassFormatError(Bad Magic Number).
    If I am not wrong, I should also add the ejb.jar in the tomcat's classpath as the home and remote interface import the classes present in ejb.jar.
    I don't know why this error is coming. Can anyone please suggest me what might be wrong. Is there anything I have to specify in tomcat's configuration files to use Weblogic as the application server.

  4. thin appserver[ Go to top ]

    Normally when separating app and web servers you need to install the thin version of the appserver on the web side. This thin version will contain information regarding the appserver, its location and deployed entities etc., Websphere has this and i'm sure weblogic should provide you some way to create this plugin. It is also possible in your case that you have generated the ejb.jar in a version of JVM that is different from your tomcat jvm version.