[JBoss Seam] - jndi name of ejb in ear
by knaas
EJBs deployed from an EAR are put under the EAR's jndi namespace. For instance if the ear file is "my-ear.ear", and there is a Local Session Bean with the name of "MySessionBean", it will be bound to "my-ear/MySessionBean". In order for Seam to lookup this EJB, it requires a change to the components.xml so that instead of using "#{ejbName}/local" it uses "my-ear/#{ejbName}/local". While this works great, the ear name is now hardcoded in the ejb jar module inside of the ear. This isn't such a big problem until someone renames the ear file. At this point,the components.xml has to be updated since Seam can no longer find "my-ear/MySessionBean/local". This is a big problem, especially when trying to run multiple versions of the same application on a single server.
One possibility to fix the problem is to override the jndi name using either the @LocalBinding or @JndiName annotations. However, the jndi bindings of different EARS can collide since they both name is now hardcoded in the Java class.
Would it be possible for the Seam jndiPattern to automatically look in the EAR's jndi namespace?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991091#3991091
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991091
18 years, 1 month
[JBoss Seam] - Re: how to use taskinstance??
by juangiovanolli
you has solved, in part my problem. now i'm getting a new error :
| 16:36:30,281 ERROR [STDERR] org.hibernate.SessionException: Session is closed!
| at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
| at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:874)
| at org.hibernate.impl.SessionImpl.load(SessionImpl.java:795)
| at org.hibernate.impl.SessionImpl.load(SessionImpl.java:788)
| at org.jbpm.db.GraphSession.loadProcessInstance(GraphSession.java:276)
| at org.jboss.seam.core.ProcessInstance$1.work(ProcessInstance.java:50)
| at org.jboss.seam.core.ProcessInstance$1.work(ProcessInstance.java:43)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:31)
| at org.jboss.seam.core.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
| at sun.reflect.GeneratedMethodAccessor436.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1738)
| at org.jboss.seam.Component.unwrap(Component.java:1764)
| at org.jboss.seam.Component.getInstance(Component.java:1597)
| at org.jboss.seam.Component.getInstance(Component.java:1564)
| at org.jboss.seam.Component.getInstance(Component.java:1546)
| at org.jboss.seam.core.ProcessInstance.instance(ProcessInstance.java:70)
| at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:213)
| at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:200)
| at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:55)
| at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:149)
| at org.jboss.seam.Component.getInstance(Component.java:1556)
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1789)
| at org.jboss.seam.Component.injectFields(Component.java:1312)
| at org.jboss.seam.Component.inject(Component.java:1082)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| at sun.reflect.GeneratedMethodAccessor427.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:55)
| at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor413.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
| at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:128)
| at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:69)
| at com.santex.darwin.web.sample.TaskBean$$EnhancerByCGLIB$$90451471.destroy(<generated>)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1738)
| at org.jboss.seam.Component.callDestroyMethod(Component.java:1694)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:186)
| at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:356)
| at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:239)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:180)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:83)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo
| 16:36:30,281 ERROR [STDERR] lTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| 16:36:30,281 ERROR [GraphSession] org.hibernate.SessionException: Session is closed!
| 16:36:30,281 WARN [Contexts] Could not destroy component: taskManager
| org.jbpm.JbpmException: couldn't load process instance '11'
| at org.jbpm.db.GraphSession.loadProcessInstance(GraphSession.java:281)
| at org.jboss.seam.core.ProcessInstance$1.work(ProcessInstance.java:50)
| at org.jboss.seam.core.ProcessInstance$1.work(ProcessInstance.java:43)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:31)
| at org.jboss.seam.core.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
| at sun.reflect.GeneratedMethodAccessor436.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1738)
| at org.jboss.seam.Component.unwrap(Component.java:1764)
| at org.jboss.seam.Component.getInstance(Component.java:1597)
| at org.jboss.seam.Component.getInstance(Component.java:1564)
| at org.jboss.seam.Component.getInstance(Component.java:1546)
| at org.jboss.seam.core.ProcessInstance.instance(ProcessInstance.java:70)
| at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:213)
| at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:200)
| at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:55)
| at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:149)
| at org.jboss.seam.Component.getInstance(Component.java:1556)
| at org.jboss.seam.Component.getInstanceToInject(Component.java:1789)
| at org.jboss.seam.Component.injectFields(Component.java:1312)
| at org.jboss.seam.Component.inject(Component.java:1082)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| at sun.reflect.GeneratedMethodAccessor427.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:55)
| at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor413.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:28)
| at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:128)
| at org.jboss.seam.intercept.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:69)
| at com.santex.darwin.web.sample.TaskBean$$EnhancerByCGLIB$$90451471.destroy(<generated>)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1738)
| at org.jboss.seam.Component.callDestroyMethod(Component.java:1694)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:186)
| at org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:356)
| at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:239)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.afterRender(AbstractSeamPhaseListener.java:180)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:83)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.hibernate.SessionException: Session is closed!
| at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
| at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:874)
| at org.hibernate.impl.SessionImpl.load(SessionImpl.java:795)
| at org.hibernate.impl.SessionImpl.load(SessionImpl.java:788)
| at org.jbpm.db.GraphSession.loadProcessInstance(GraphSession.java:276)
| ... 98 more
|
any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991089#3991089
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991089
18 years, 1 month