I'm trying to learn MDB's and JMS using jboss4.2.2. I have a bean and it deploys fine. Now, I want to write a client to test my bean. I want to create an individual QueueConnectionFactory for my bean. I've already created a Queue on which to send. I edited the file listed in the link below...
Now, isthis the same file I edit to create a QueueConnectionFactory? If not can someone point me in the right direction? I saw this link:
Yeah, it hepled, but I'm still confused, sort of. When I created my own queue, I just copied/pasted and changed the jndi name of the queue to suit my needs. I thought it would be the same here. When I did copy/paste, I got an error thrown on the server to the effect that it was trying to install an already registered mbean. Here is what I created or tried to create:
Do you really want to create a new connection factory? JBoss already comes shipped with default connection factories which you can use. You just have to look it up using "ConnectionFactory" jndi-name. See this for an example.
Joined: Oct 05, 2006
I've been trying to figure out how to answer this. Now, I've finally got one. Today, I was playing around coding a client and I got to the point where I was doing something like:
Can you post the entire exception stacktrace? Where exactly is the nullpointer? I am assuming that your client is an standalone java application. If the ConnectionFactory wasn't bound then i would except a NameNotFoundException. Furthermore, you can use the JNDIView to see whether the ConnectionFactory is bound in the jndi tree. For me, i see it in the Global JNDI namespace:
Joined: Oct 05, 2006
I played around with this some and finally got past the QueueConnectionFactory problems I was having, to a point.
There's a couple other lines in the stack trace, but it points ot my main function and the line above (1). In NONE of the jboss docs I saw using this tutorial did I see where they imported oswego anything. It's not even mentioned.
Any ideas on what may be causing this and or how to fix it?
Originally posted by John Gregory: Exception in thread "main.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ThreadFactory org.jboss.mq.SpyConnectionFactory.internalCreateQueueConnection (line 137) org.jboss.mq.SpyConnectionFactory.createQueueConnection (line 108)
You will have to include jbossall-client.jar (which can be found in %JBOSS_HOME%\client folder) in the client's classpath.