I am trying to get JMS running between 2 applications on the same machine.  I 
have written a new Mbean for the new Topic channel -- and it shows up when 
JBOSS starts up.

But I am having a problem getting to the ConnectionFActory and to the Topic 
ConnectionFActory

My code -- setting the Context Part
properties.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
 properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
 properties.put(Context.PROVIDER_URL,"jnp://localhost:1099") ;


And i set up the InitialConcext and lookups as follows:

  InitialContext ctx = new InitialContext(properties);
  System.out.println("Looking up connection factory");
  Object tmp = ctx.lookup("ConnectionFactory");
  TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;
  System.out.println("Creating topic connection");


OUTPUT of the Running CodE:

Looking up connection factory
Exception in thread "main" javax.naming.NoInitialContextException: Need to speci
fy class name in environment or system property, or as an applet parameter, or i
n an application resource file:  java.naming.factory.initial
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
45)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247
)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.jav
a:284)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
        at Sender.setUpPublishing(Sender.java:54)
        at SenderTest.main(SenderTest.java:53)


thanks for your help

margaret 


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955599#3955599

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955599

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to