The java: namespace is local to the JBoss server. You cannot lookup items
bound under it outside of the server VM.
----- Original Message -----
From: "Gabi Perets" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 11:26 PM
Subject: [JBoss-user] (no subject)
> Gang,
>
> I am trying to get a reference of a component via JNDI. I see in the JNDIView that
>under java: Namespace there are some components
(the basic ones which come with the basic JBoss installation):
>
> java: Namespace
> +- MinervaXACMFactory (class:
>org.opentools.minerva.connector.jboss.MinervaXACMFactory)
> +- DefaultDS (class: org.opentools.minerva.jdbc.xa.XAPoolDataSource)
> +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
> +- InstantDB (class: org.opentools.minerva.jdbc.xa.XAPoolDataSource)
> +- DefaultJMSProvider (class: org.jboss.jms.jndi.JBossMQProvider)
> +- comp (class: javax.naming.Context)
>
>
> Now, I run this simple line:
> DataSource dataSource = (DataSource) getJBossContext().lookup("java:/InstantDB");
> or
> DataSource dataSource = (DataSource) getJBossContext().lookup("InstantDB");
>
> and I get:
>
> javax.naming.NameNotFoundException: InstantDB not bound
>
> at org.jnp.server.NamingServer.getBinding(NamingServer.java:473)
>
> at org.jnp.server.NamingServer.getBinding(NamingServer.java:481)
>
> at org.jnp.server.NamingServer.getObject(NamingServer.java:487)
>
> at org.jnp.server.NamingServer.lookup(NamingServer.java:282)
>
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
>
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
>
> at javax.naming.InitialContext.lookup(InitialContext.java:350)
>
> at Portable.getJBossConnection(Portable.java:40)
>
> at Portable.main(Portable.java:84)
>
>
> Yet, I can get and use components from the Global JNDI Namespace (e.g. topic):
>
> Global JNDI Namespace
> +- TopicConnectionFactory (class: org.jbossmq.SpyTopicConnectionFactory)
> +- XAQueueConnectionFactory (class: org.jbossmq.SpyXAQueueConnectionFactory)
> +- jmx (class: org.jboss.jmx.server.JMXAdaptorImpl)
> +- UILXAQueueConnectionFactory (class: org.jbossmq.SpyXAQueueConnectionFactory)
> +- RMIXAQueueConnectionFactory (class: org.jbossmq.SpyXAQueueConnectionFactory)
> +- RMIQueueConnectionFactory (class: org.jbossmq.SpyQueueConnectionFactory)
> +- NonOptimized (class: $Proxy0)
> +- XATopicConnectionFactory (class: org.jbossmq.SpyXATopicConnectionFactory)
> +- UILXATopicConnectionFactory (class: org.jbossmq.SpyXATopicConnectionFactory)
> +- RMIXATopicConnectionFactory (class: org.jbossmq.SpyXATopicConnectionFactory)
> +- RMITopicConnectionFactory (class: org.jbossmq.SpyTopicConnectionFactory)
> +- interest (class: org.jnp.interfaces.NamingContext)
> | +- Interest (class: $Proxy2)
>
> I use JBoss-2.2.2_Tomcat-3.2.2 under Win2000 and jdk1.3
>
> How can I get a reference to the problematic components ?
>
> best regards,
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user