[
http://jira.jboss.com/jira/browse/JBAS-3798?page=all ]
Darran Lofthouse updated JBAS-3798:
-----------------------------------
Attachment: jbossws-samples-jmstransport.sar
To reproduce place the attached archive in the deploy folder and then start JBoss.
As you can see the MDB has a dependency defined for
jboss.jca:service=CachedConnectionManager but as the interceptors are initialised in the
create step this is before the dependency has been met.
EJB Interceptors Initialised Before Dependent Services Started
--------------------------------------------------------------
Key: JBAS-3798
URL:
http://jira.jboss.com/jira/browse/JBAS-3798
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: EJB2, Deployment services
Affects Versions: JBossAS-4.0.5.GA, JBossAS-4.0.4.GA
Reporter: Darran Lofthouse
Assigned To: Dimitris Andreadis
Fix For: JBossAS-4.0.6.CR1
Attachments: jbossws-samples-jmstransport.sar
The interceptors for an EJB are initialised in the create step of EJB deployment, this
means that they can be initialised before the services the EJB depends on have been
started.
This can be reproduced by deploying a sar that contains a jar that contains a MDB and
then starting JBoss, the CachedConnectionInterceptor is initialised before the
CachedConnectionManager is available and the following warning is logged: -
12:27:54,179 WARN [EjbModule] Could not load the
org.jboss.resource.connectionmanager.CachedConnectionInterceptor interceptor for this
container
javax.management.InstanceNotFoundException: jboss.jca:service=CachedConnectionManager is
not registered.
at
org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:523)
at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:550)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.<init>(CachedConnectionInterceptor.java:78)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.jboss.ejb.EjbModule.addInterceptors(EjbModule.java:930)
at org.jboss.ejb.EjbModule.initializeContainer(EjbModule.java:816)
at org.jboss.ejb.EjbModule.createMessageDrivenContainer(EjbModule.java:602)
at org.jboss.ejb.EjbModule.createContainer(EjbModule.java:569)
at org.jboss.ejb.EjbModule.createService(EjbModule.java:342)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira