Sorry, reading my mail backwards and found your later post first.
Chidambara, Vinoth (CTS) wrote:
> 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
What is in your res-ref-name tag in the resource-ref stanza of your
ejb-jar.xml? This should be 'jdbc/TryDB'
By default, that will be mapped to whatever datasource is named
'DefaultDS', so unless you're lazy like me and have set up DefaultDS to
be the pool you want, you'll also have to change jboss.xml to map that
to the resource name 'java:/TryDB' The easiest way to do that would be
to use EJX (java -jar ejx.jar in the jboss bin directory), but note that
your milage may vary with that tool.
>
> 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]