[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Integration TEsts / Use of other connections
clebert.suconic@jboss.com
do-not-reply at jboss.com
Mon Feb 19 15:46:37 EST 2007
I have this MDB:
https://svn.jboss.org/repos/messaging/projects/jms-integration/src/main/org/jboss/test/jms/integration/support/ejb20/TestMessageDriven.java (Sorry for non-committers... the URL wasn't available the time I posted this)
And I'm running this on JBoss-4.0.4... with a messaging configuration created by our utils.
On ejbCreate I'm using other resources such as opening a new connection, as I will answer messages through an answering queue:
| public void ejbCreate() throws EJBException
| {
| try
| {
| ctx = new InitialContext();
| cf = (XAConnectionFactory) ctx.lookup(CONNECTION_FACTORY);
| conn = cf.createXAConnection();
| //ts = messageContext.getTimerService();
| }
| catch (NamingException e)
| {
| throw new EJBException(e);
| }
| catch (JMSException e)
| {
| throw new EJBException(e);
| }
|
| }
|
When I run this, I'm getting a classCastException:
Caused by: java.lang.ClassCastException: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl
| at org.jboss.test.messaging.integration.mdb.support.ejb20.TestMessageDriven.ejbCreate(TestMessageDriven.java:81)
| 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.ejb.MessageDrivenEnterpriseContext.<init>(MessageDrivenEnterpriseContext.java:82)
|
This is bound to java:/JmsXA
Is this a bug, or I am missing a config here?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019023#4019023
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019023
More information about the jboss-dev-forums
mailing list