[Clustering/JBoss] - Correct way to deploy ear in a cluster
by SleepyCrom
My ear file contains both war application and ejb3. When I upload ear file to both servers in the cluster I get a NameAlreadyBoundException(only on stateless ejbs, not entity) on one of the servers(the one I start second).
I have a default installation of jboss-4.0.4.GA in a linux redhat envoriment.
The stateless class:
@Stateless
| @Local ({IndexEngineBIZLocal.class})
| @LocalBinding (jndiBinding=BeanFactory.INDEX_ENGINE_BIZ_LOCAL)
| public class IndexEngineBIZBean implements IndexEngineBIZLocal {
|
And exception:
2006-09-14 12:09:10,817 INFO [org.jboss.ejb3.JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=PrivateEconomicDictionary-1.0.ear,jar=PrivateEconomicDictionaryBeans.jar,name=IndexEngineBIZBean,service=EJB3 with dependencies:
| 2006-09-14 12:09:10,837 INFO [org.jboss.ejb3.EJBContainer] STARTED EJB: no.tv2.nettavisen.privateeconomicadvice.biz.IndexEngineBIZBean ejbName: IndexEngineBIZBean
| 2006-09-14 12:09:10,869 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:ear=PrivateEconomicDictionary-1.0.ear,jar=PrivateEconomicDictionaryBeans.jar,name=IndexEngineBIZBean,service=EJB3
| javax.naming.NamingException: Could not bind statless proxy with ejb name IndexEngineBIZBean into JNDI under jndiName: /pea/IndexEngineBIZ/local [Root exception is javax.naming.NameAlreadyBoundException]
| at org.jboss.ejb3.stateless.BaseStatelessProxyFactory.start(BaseStatelessProxyFactory.java:70)
| at org.jboss.ejb3.stateless.StatelessLocalProxyFactory.start(StatelessLocalProxyFactory.java:63)
| at org.jboss.ejb3.ProxyDeployer.start(ProxyDeployer.java:107)
| at org.jboss.ejb3.SessionContainer.start(SessionContainer.java:85)
| at org.jboss.ejb3.stateless.StatelessContainer.start(StatelessContainer.java:80)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
|
Maybe farmdeployment can solve my problem. But where do I find documentation about that :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971541#3971541
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971541
19 years, 7 months
[EJB 3.0] - Refresh POJOs in a JSP
by Juergen.Zimmermann
I'm using Struts and JBoss/EJB3. The Struts Action invokes an EJB3 Session Bean and gets a collection of objects, e.g. objects of class Customer.
Later the retrieved objects are displayed in a JSP (and the EJB3 entity manager is gone). If I want to display also the orders of each customer I have a problem with lazy loading.
OK, one solution is to use a fetch join inside the EJB code so that each customer's orders are loaded in advance.
However, for flexibility (not performance) reasons I'm looking for a solution regarding my JSPs. How can I reload inside a JSP the referenced objects that were not loaded in the cache, yet? Any hint is appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971537#3971537
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3971537
19 years, 7 months