File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes JBOSS AND JMS HELP!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBOSS AND JMS HELP!!!" Watch "JBOSS AND JMS HELP!!!" New topic


sonyia nandan

Joined: Feb 11, 2004
Posts: 14
Hi all,
I have implemented a JMS enabled program in J2EE already.I have to run the corresponding JMS program in JBOSS.I have a program in a file 'f'which accepts the QueueConnectionFactory,Queuename from a config directory in the same file 'f'.
I have no clue as to what changes i need to incorporate for JBOSS.I know that i add topic and queue via the J2EEadmin -addListFactory command,I was wondering if there is an equivalient command for JBOSS too..
Any help is appreciated
kalpeshS desai

Joined: Jan 20, 2004
Posts: 6
Here is what you should try to set up a Queue/topic on Jboss
Add entries for queue/topic in "default/deploy/jms/jbossmq-destinations-service.xml" file.
for ex: Entry for setting up new queue "myQueue"
<mbean code=""
<depends optional-attribute-name="DestinationManager"></depends>
Your client can use a preconfigured "ConnectionFactory" in Jboss.
If your JMS client and JMS server are in same JVM,then use ConnectionFactory located in the file,/server/default/deploy/jms/jvm-il-service.xml
Else use the one located in /server/default/deploy/jms/oil-service.xml
A sample client code to lookup Connection and Queue would be,
Properties p = new Properties();
InitialContext ctx = new InitialContext(p);
QueueConnectionFactory qcf = (QueueConnectionFactory)ctx.lookup("java:/ConnectionFactory");
QueueConnection qc = qcf.createQueueConnection();
Queue queue = (Queue) ctx.lookup("queue/myQueue");

Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1066
Thanks Kalpesh,
I am also new to JMS with JBoss 3.2.1. I got the sample Topic publisher/subscriber working.
A small correction to the initialContext code:
Hashtable env = new Hashtable();
env.put(Context.PROVIDER_URL, "localhost:1099");
InitialContext iniCtx = new InitialContext(env);
sonyia nandan

Joined: Feb 11, 2004
Posts: 14
Hi ,
Thank you kalpesh for your suggestion as such i havent run my JBOSS still coz i am getting some problem during startup.I dont know what the problem is.I have posted the error that it is giving in another topic.Hope someone can give me a solution to this coz i am stuk with this for 2 days
Meera K

Joined: Apr 10, 2002
Posts: 4
Hi! guys
I have a problem in configuring the security for the destination queue which is the permanent queue. I have DBServerLogin configured for "jbossmq" in login-config.xml where unauthenticated identity is "guest"
I dont want to add this principal to my SecurityConfig for the queue. If I dont add the principal I get
javax.jms.JMSSecurityException: Connection not authorized to subscribe to destination: tryQueue
Any clue ?

Francois Beauregard

Joined: Jul 30, 2004
Posts: 1
I have excatly the same problem, but with Topic created through the MBeans interface... The only thing I can think of that could affect this is the fact that I configured my application to use a JAAS source for authentication... It seem to want to pass everything through the security system now... Does it ring a bell to anyone out there ???
I agree. Here's the link:
subject: JBOSS AND JMS HELP!!!
It's not a secret anymore!