The code you have below is in a client (stand alone application), right? 
That won't work. Things in the 'java' namespace are only available from 
within the JBoss process.

Gabi Perets wrote:

> 
>>[EMAIL PROTECTED] [EMAIL PROTECTED]: Tue, 26 Jun 2001 23:26:25
>>
>>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");
>>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to