Try:

DataSource ds = (DataSource)ctx.lookup("java:/TryDB");

Tim

----- Original Message -----
From: Chidambara, Vinoth (CTS) <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 16, 2001 7:03 AM
Subject: [jBoss-User] Problem while accessing JBoss JDBC Connection Pool


> Hai,
>
> I have created connection pool named "TryDB"
> And i can see the output in server dosprompt like this
>
> [TryDB] Starting
> [TryDB] XA Connection pool TryDB bound to java:/TryDB
> [TryDB] Started
>
> Am having a bean which connects to the database.For that i get a
connection
> like this( is
> it correct)
>
> Context ctx = new InitialContext();
>             DataSource ds =
> (DataSource)ctx.lookup("java:comp/env/jdbc/TryDB");
>         con = ds.getConnection();
>         Statement stmt=con.createStatement();
>
> While calling a bean from the client am getting exception like this in
> server dosprompt
>
> [DatabaseBean] naming exception javax.naming.NameNotFoundException: jdbc
not
> bound
>
> Did i miss anything to be done
>
> Thanks in advance.
> With Regards,
> Vinoth.C
>
>
> This e-mail and any files transmitted with it are for the sole use of the
intended recipient(s) and may contain confidential and privileged
information.
> If you are not the intended recipient, please contact the sender by reply
e-mail and destroy all copies of the original message.
> Any unauthorised review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly
> prohibited and may be unlawful.
>
> Visit us at http://www.cognizant.com
>
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]

Reply via email to