JMS and JBoss
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, June 19, 2003 12:05 AM

These are defined by default in JBoss queue = "queue/testQueue" queue_connection_factory = "ConnectionFactory" How can change this? Because I want to lookup "QueueConnectionFactory". When I lookup QueueConnectionFactory, I get the error "javax.naming.NameNotFoundException: QueueConnectionFactory not bound". How can solve this? here is the code i'm using: public static void main(String[] args) { try{ Context jndiContext = new InitialContext(); QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory)context.lookup("QueueConnectionFactory");    More>>

These are defined by default in JBoss



queue = "queue/testQueue"

queue_connection_factory = "ConnectionFactory"




How can change this? Because I want to lookup "QueueConnectionFactory". When I lookup QueueConnectionFactory, I get the error "javax.naming.NameNotFoundException: QueueConnectionFactory not bound".

How can solve this?



here is the code i'm using:



public static void main(String[] args) {

try{

Context jndiContext = new InitialContext();

QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory)context.lookup("QueueConnectionFactory");

Queue queue = (Queue)context.lookup("queue/testQueue");


} catch (NamingException nEx){

System.out.println(nEx.toString() + "
Does the queue exist?");

System.exit(1);

}

}



THX

   <<Less

Re: JMS and JBoss

Posted By:   Nicholas_Whitehead  
Posted On:   Thursday, June 19, 2003 06:04 PM

Tang;

The object bound as ConnectionFactory serves as both Queue and Topic connection factory.

Hence, your code should look like this:

QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory)context.lookup("ConnectionFactory");


But if you really want to change the name, you can edit the file jbossmq-service.xml in your JBoss deploy directory. There is an entry that looks something like this:


name="jboss.mq:service=InvocationLayer,type=OIL">

jboss.mq:service=Invoker

ConnectionFactory

XAConnectionFactory

8090

60000

true




Change the ConnectionFactoryJNDIRef attribute to anything you want.

Cheers.

//Nicholas

Re: JMS and JBoss

Posted By:   Java_Guru  
Posted On:   Thursday, June 19, 2003 02:36 AM

Change attribute value queue_connection_factory="QueueConnectionFactory"

or
use
QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory)context.lookup("ConnectionFactory");





Jeyachandran :-)
About | Sitemap | Contact