-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Miranda Carlos
Sent: Thursday, May 10, 2001 3:59 PM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] JNDI Lookup of Datasourcesjavax.sql.DataSource source = (javax.sql.DataSource)jndiContext.lookup("java:/defaultDS");
-----Original Message-----
From: Nikhil Patil [mailto:[EMAIL PROTECTED]]
Sent: Jueves, 10 de Mayo de 2001 04:26 p.m.
To: jboss
Subject: [JBoss-user] JNDI Lookup of Datasources
Hi
I have set a datasource called "workflowDS" in JBOSS. I am trying to do a
client lookup from a client and this how my code looks like.Properties env = new Properties();
env.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "localhost:1099");try
{
// Get a naming context
InitialContext jndiContext = new InitialContext(env);
System.out.println("Got context");
javax.sql.DataSource source =
(javax.sql.DataSource)jndiContext.lookup("defaultDS");}
catch(Exception e)
{
System.out.println(e.toString());
}I get a NameNotFoundException. Any reason. I know that workflowDS is getting
bound to the jndi tree for the console says so.Thanks
Nikhil
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user
Title: RE: [JBoss-user] JNDI Lookup of Datasources
Hi
I
apologize for the typo in my mail, but my code was using "workflowDS". One the
reasons it was not working cause I was making the lookup in a different vm. It
seems that lookups for datasources
only
work in-vm. Even then one has to specify "java:/" to the name of the
datasource.
thanks
Nikhil
- [JBoss-user] JNDI Lookup of Datasources Nikhil Patil
- Re: [JBoss-user] JNDI Lookup of Datasource... MailingLists
- Re: [JBoss-user] JNDI Lookup of Datasource... danch (Dan Christopherson)
- Re: [JBoss-user] Error Message When Runnin... Lan Nguyen
- RE: [JBoss-user] JNDI Lookup of Datasource... Christian Thrum
- RE: [JBoss-user] JNDI Lookup of Datasource... Miranda Carlos
- RE: [JBoss-user] JNDI Lookup of Dataso... Nikhil Patil
- RE: [JBoss-user] JNDI Lookup of Datasource... Mayo, Eric
