-
15. Re: MDB receiving messages before end of startup
stephanenicoll May 28, 2003 10:22 AM (in response to dbxbdxdob)
<ejb-name>LogWriter</ejb-name>
<jndi-name>ejb/debug/LogWriter</jndi-name>
<local-jndi-name>ejb/debug/LogWriterLocal</local-jndi-name>
and
<ejb-name>ParcelFacade</ejb-name>
<jndi-name>ejb/kp/ParcelFacade</jndi-name>
<local-jndi-name>ejb/kp/ParcelFacadeLocal</local-jndi-name>
it's part of the JBoss.xml contained in the JARs of my ear -
16. Re: MDB receiving messages before end of startup
adrian.brock May 28, 2003 7:29 PM (in response to dbxbdxdob)It uses <jndi-name> when present.
It only uses the local name when there
is no remote interface.
Regards,
Adrian -
17. Re: MDB receiving messages before end of startup
stephanenicoll May 30, 2003 4:50 AM (in response to dbxbdxdob)Mmmm seems JBoss does not like requires on Local EJB ??? I used to remote jndi name and it worked for startup only, i.e. it waits before processing my message
Now I still have the problem on shutdown. When stopping Jboss, it keeps on processing JMS message for a while but some stuff have already been undeployed.
Any idea how I can fix this? -
18. Re: MDB receiving messages before end of startup
adrian.brock May 30, 2003 7:41 AM (in response to dbxbdxdob)Post the stacktrace
Regards,
Adrian -
19. Re: MDB receiving messages before end of startup
stephanenicoll May 30, 2003 8:07 AM (in response to dbxbdxdob)So I fixed evertthing for startup. My MDB waits before processing pending JMS messages (Here is the definition of my MDB):
<message-driven >
<![CDATA[A message driven bean that handles 'create parcel' instructions.]]>
<display-name>Handles parcel creation XML instructions (v 0.0.1)</display-name>
<ejb-name>ejb/kp/v0.0.1/ParcelCreator</ejb-name>
<ejb-class>com.kiala.kialapointserver.jms.ParcelCreatorMessageBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-selector>instructionType = 'create-parcel' AND version = '0.0.1'</message-selector>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
<subscription-durability>NonDurable</subscription-durability>
</message-driven-destination>
<ejb-local-ref >
<ejb-ref-name>ejb/debug/LogWriterLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.kiala.debugging.LogWriterLocalHome</local-home>
com.kiala.debugging.LogWriterLocal
<ejb-link>LogWriter</ejb-link>
</ejb-local-ref>
<ejb-local-ref >
<ejb-ref-name>ejb/kp/ParcelFacadeLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.kiala.kialapointserver.entity.facades.interfaces.ParcelFacadeLocalHome</local-home>
com.kiala.kialapointserver.entity.facades.interfaces.ParcelFacadeLocal
<ejb-link>ParcelFacade</ejb-link>
</ejb-local-ref>
<ejb-local-ref >
<ejb-ref-name>ejb/kp/DSPFacadeLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.kiala.kialapointserver.entity.facades.interfaces.DSPFacadeLocalHome</local-home>
com.kiala.kialapointserver.entity.facades.interfaces.DSPFacadeLocal
<ejb-link>DSPFacade</ejb-link>
</ejb-local-ref>
<ejb-local-ref >
<ejb-ref-name>ejb/kp/KPFacadeLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.kiala.kialapointserver.entity.facades.interfaces.KPFacadeLocalHome</local-home>
com.kiala.kialapointserver.entity.facades.interfaces.KPFacadeLocal
<ejb-link>KPFacade</ejb-link>
</ejb-local-ref>
</message-driven>
When I shutdown JBoss, this MDB still go on processing msgs.
0 13:39:21,413 [ Worker-3] INFO r.jms.ParcelCreatorMessageBean - Received Parcel Creation Instruction
2003-05-30 13:39:21,425 [ Worker-3] ERROR r.jms.ParcelCreatorMessageBean - Invalid parcel instruction [Entity not found [DSPLocalHome not bound]]
2003-05-30 13:39:21,427 [ Worker-1] FATAL r.jms.ParcelCreatorMessageBean - Could not find LogWriterLocal home interface
javax.naming.NameNotFoundException: LogWriterLocal not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
at org.jnp.server.NamingServer.lookup(NamingServer.java:256)
at org.jnp.server.NamingServer.lookup(NamingServer.java:256)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.kiala.debugging.LogWriterUtil.getLocalHome(LogWriterUtil.java:66)
at com.kiala.kialapointserver.jms.ParcelCreatorMessageBean.getLogger(ParcelCreatorMessageBean.java:200)
at com.kiala.kialapointserver.jms.ParcelCreatorMessageBean.onMessage(ParcelCreatorMessageBean.java:78)
at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:434)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:216)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:348)
at org.jboss.ejb.Container.invoke(Container.java:674)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:732)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1020)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:241)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:636)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:442)
at org.jboss.mq.SpySession.run(SpySession.java:294)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:177)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:536)
I was expecting JBoss to stop processing if, for instance LogWriterLocal wasn't bound anymore ...
Thanks for any help! -
20. Re: MDB receiving messages before end of startup
stephanenicoll Sep 9, 2003 4:16 AM (in response to dbxbdxdob)adiran, any idea? :(