Hi all,
I try to deploy an EJB3 MDB to JBoss 5.0GA, and I want to do the Queue config trough a
...-service.xml file in the EJB jar.
Here is the config file:
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE server
| PUBLIC "-//JBoss//DTD MBean Service 5.0//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-service_5_0.dtd">
| <server>
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="knauf:service=Queue,name=MessageBeanQueue"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <attribute name="JNDIName">queue/MessageBeanQueue</attribute>
| <depends
optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| </mbean>
| </server>
This works fine on first deploy. But on every redeploy, I see those error messages in the
console:
22:33:04,796 WARN [AbstractDeploymentContext] Unable to register deployment mbean
vfszip:/C:/temp/jboss-5.0.0.GA/server/default/deploy/Message.ear/MessageEJB.jar/knaufmq-service.xml
| javax.management.InstanceAlreadyExistsException:
jboss.deployment:id="vfszip:/C:/temp/jboss-5.0.0.GA/server/default/deploy/Message.ear/MessageEJB.jar/knaufmq-service.xml",type=SubDeployment
already registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
| at
org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
| at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
| at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| ...
| MDB deployment output
| ...
| 22:33:05,000 WARN [JmsActivation] Failure in jms activation
org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1053a6b(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)15d0009
destination=queue/MessageBeanQueue destinationType=javax.jms.Queue tx=true durable=false
reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1
maxSession=15 keepAlive=60000 useDLQ=true
DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler
DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
| javax.naming.NameNotFoundException: MessageBeanQueue not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
| at javax.naming.InitialContext.lookup(Unknown Source)
| at org.jboss.util.naming.Util.lookup(Util.java:222)
| at
org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:464)
| at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:352)
| at
org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:729)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
| at java.lang.Thread.run(Unknown Source)
| 22:33:05,031 INFO [QueueService] Queue[queue/MessageBeanQueue] started,
fullSize=200000, pageSize=2000, downCacheSize=2000
| 22:33:15,000 INFO [JmsActivation] Attempting to reconnect
org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1053a6b(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)15d0009
destination=queue/MessageBeanQueue destinationType=javax.jms.Queue tx=true durable=false
reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1
maxSession=15 keepAlive=60000 useDLQ=true
DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler
DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
| 22:33:15,015 INFO [JmsActivation] Reconnected with messaging provider.
|
Nevertheless, my app works fine. When deleting the EAR file, the queue is removed from
JNDI view.
Configuring the app through "destinations-service.xml" works fine.
I created a full sample here:
http://www.informatik.fh-wiesbaden.de/~knauf/private/mdb/service/
(deploy EAR file to jboss, then use "startclient.bat" +
"MessageClient.jar " + "log4j.properties" to start the app client
=> click on "Send message" button to send a message to the server).
Can someone help me with this error? Am I doing something wrong? Is this a deployment
error of JBoss5?
Thanks
Wolfgang
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204834#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...