Queues are allways bound to naming context queue. To lookup your queue,
use queue/MyQueue
//Peter
On Wed, 4 Apr 2001, Taylor, Richard wrote:
>
> (JBoss 1.2, JDK1.3)
>
> I have created a queue called MyQueue using the interface on port 8082.
> The debug when starting JBoss indicates:
>
> [JBossMQ] new queue : MyQueue
>
> and there is a file in the db folder called [EMAIL PROTECTED]
>
> However when I execute the following code:
>
> System.setProperty("java.naming.factory.initial",
> "org.jnp.interfaces.NamingContextFactory");
> System.setProperty("java.naming.provider.url",
> "localhost:1099");
>
> InitialContext jndiContext = new InitialContext();
> System.out.println("Got context");
>
> QueueConnectionFactory queueConnectionFactory
> = (QueueConnectionFactory)
> jndiContext.lookup("QueueConnectionFactory");
> System.out.println("QCF= "+queueConnectionFactory);
>
> String queueName = "MyQueue";
> Queue queue = (Queue) jndiContext.lookup(queueName);
>
> I get the following output:
>
> Got context
> QCF= org.jbossmq.SpyQueueConnectionFactory@52544e
> Ex: javax.naming.NameNotFoundException: MyQueue not bound
>
>
> Am I doing something obviously wrong?
>
> Richard.
>
>
> **********************************************************************
> Information in this email is confidential and may be privileged.
> It is intended for the addressee only. If you have received it in error,
> please notify the sender immediately and delete it from your system.
> You should not otherwise copy it, retransmit it or use or disclose its
> contents to anyone.
> Thank you for your co-operation.
> **********************************************************************
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
Jobba hos oss: http://www.tim.se/weblab
------------------------------------------------------------
Peter Antman Technology in Media, Box 34105 100 26 Stockholm
Systems Architect WWW: http://www.tim.se
Email: [EMAIL PROTECTED] WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942
------------------------------------------------------------
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user