I'm creating a dynamic queue according to the docs and am not sure of several things after looking up the MBean ...
 
         MBeanServer server = (MBeanServer)
            MBeanServerFactory.findMBeanServer(null).iterator().next();
 
         server.invoke(new ObjectName("JBossMQ", "service", "Server"),
            "createQueue", new Object[] { bInfo.getNodeName() },
            new String[] {"java.lang.String"});
 
At what point and in what order do I now do the following steps. Do I just need to do the above first
and then carry on as I normally would w/ the steps below? If that's the case, I get the errors at the bottom.
 
- get the initial context
- lookup the connection factory
- obtain the connection
- create a sesson
- lookup the destination (if this, do I still lookup w/ the prefix of "queue/" or as created in the MBean?)
- create a msg producer.
 
Basically all I want to do is send an object to a client.
 
--- error output ---
 
[WARN,TxCapsule] XAException: tx=XidImpl [FormatId=257, GlobalId=cassia//28, BranchQual=] errorCode=XAER_RMERR
javax.transaction.xa.XAException
        at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:102)
        at org.jboss.tm.TxCapsule.commitResources(TxCapsule.java:1490)
        at org.jboss.tm.TxCapsule.commit(TxCapsule.java:324)
        at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
        at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:314)
        at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:565)
        at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:376)
        at org.jboss.mq.SpySession.run(SpySession.java:248)
        at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:172)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:725)
        at java.lang.Thread.run(Thread.java:484)
Any help much appreciated

Reply via email to