I have a problem with the JBossMQ tests in package jmsra which needs some consideration.
1. The testsuite uses by default a classpath called tests.classpath to execute client-side
JUnit test cases. This classpath is constructed automatically, with the help of
jbossbuild, and includes among other things jars from third-party products imported from
the repository. This includes Messaging, so that jboss-messaging.jar is included on
tests.classpath.
In order to get the client side tests to work, I need to override the versions of remoting
and serialization which get included on tests.classpath. I do this by using the following
classpath for my tests:
${build.classes}
${build.resources}
thirdparty/jboss-messaging-client.jar
tests.classpath
This works fine and makes sure that the client side tests get the right versions of
remoting and serialization.
2. Above and beyond this, the tests in package jmsra deploy a jar, jmsra.jar, which
contains some EJBs used in the test; in particular, one called Publisher. When I run any
test involving Publisher, I get the following remoting error:
2006-11-13 10:33:03,930 ERROR [org.jboss.remoting.transport.socket.SocketClientInvoker]
Got marshalling exception, exiting
java.net.SocketException
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:352)
at
org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:125)
at org.jboss.remoting.Client.invoke(Client.java:589)
at org.jboss.remoting.Client.invoke(Client.java:581)
at
org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.java:161)
at
org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:241)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:181)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
at $Proxy1.create(Unknown Source)
at
org.jboss.test.jbossmessaging.ra.RaJMSSessionUnitTestCase.testSendToQueueAndTopic(RaJMSSessionUnitTestCase.java:5\5)
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 junit.framework.TestCase.runTest(TestCase.java:154)
The above error occurs when calling the Publisher home.create() method.
I believe this may be due to jmsra.jar being deployed in such a way that it picks up the
non-modified version of remoting. (Is this correct?) Therefore, I believe that I need to
somehow arrange for jmsra.jar to be deployed within the same scoped classloading context
as Messaging, so that it will pick up the correct (modified) version of Remoting.
jmsra.jar is deployed using the method JBossTestCase.deploy() method, which makes a
"deploy" invocation on the MBean jboss.system:service=MainDeployer.
Does anyone know the best way to deploy this jar in such a way that it gets loaded using
the scoped deployment? I'll keep on investigating..
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985538#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...