This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I am able to deploy a simple ejb application in weblogic 8.1 with the help of Weblogic builder.I want to deploy the same application using Tomcat i.e deploy servlets and jsp code here and deploy ejb in weblogic.I want to upgrade the same application to weblogic 9.1. Plese share and multiply your knowledge. Regards, Yogaraj
I would build a WAR file and an EAR file for the client and EJB applications respectively. Each EJB which is called by the client must expose a remote interface.
You would need to include the RMI EJBHome and EJBObject stubs in the WAR file. This will enable Tomcat to use the stubs for EJB calls.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Joined: Jun 06, 2007
Hi, I am getting this error while deploying the war in tomcat and jar in ejb. Pls help me with this. 500 Servlet Exception
java.lang.NoSuchMethodError: org.apache.struts.action.ActionErrors.add(Ljava/lang/String;Lorg/apache/struts/action/ActionError V at ActionBean.execute(ActionBean.java:33) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96) at com.caucho.server.http.Invocation.service(Invocation.java:315) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:253) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:171) at com.caucho.server.TcpConnection.run(TcpConnection.java:139) at java.lang.Thread.run(Thread.java:534)
But the real reason I responded to this post, is that I thought about the issue.
A while back it was thought that separating the Servlet/JSP container from the EJB's would give better separation of processes. Which it does. This was common thinking in the Weblogic 8 time frame. Evolution/de-evolution?
But it also means that all request to the EJB Container is Serialized as well, which added a new bottleneck. In some application this was more than just a little bottleneck. It was HUGE!
We as a community rushed back to putting them in the same JVM, with some additional class loader code/magic to elegantly separate them.
If you can share more of why you are doing this, it may help better with the solution.
Generally speaking, I still use a Web Server to service Media (Pictures, movies, etc etc, and keep my Servelet Container and EJB Container in one JVM, because of the speed of not using Java Serialization.
It is still an option , which is why we have local and remote interfaces for EJB's, but the argument for using remote is tougher these days, unless there really is a good reason.
Tony Sun Certified Web Business Component Developer Sun Certified Web Components Developer Sun Certified Programmer for the Java 2 Platform
Tony McClay<br />Architect / Developer, SOA and Jave Enterprise Edition 1-5<br />---------------------------------------------------------------------- <br />Sun Certified Enterprise Architect, Enterprise Edition 5 (Step 1 of 3)<br />Sun Certified Web Component Developer, Enterprise Edition 4<br />Sun Certified Business Component Developer Enterprise Edition 5<br />Sun Certified Programmer , Standard Edition 5.0
Joined: Sep 29, 2002
In my company, the web and EJB apps are hosted on separate boxes (RedHat Linux I think) as there is a lot of traffic. In most cases, however, I'm sure that the best solution is to have a single app which comprises the EAR file which contains the WAR and EJB JAR files. When you know that the EJB clients are always part of the same app, then only local interfaces need to be exposed.