your lookup is wrong. assuming you have a resource reference in your
web.xml and a mapping in jboss-web.xml then you should be able to
lookup the datasource with...
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/mysql");
Al
----- Original Message -----
From: "Richard Bottoms" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 08, 2001 6:46 AM
Subject: [JBoss-user] DataSource
> Please clairfy something for me.
>
> This doesn't work in my JSP:
>
> InitialContext ctx = new InititalContext(); ok here
> DataSource ds = (DataSource)ctx.lookup("jdbc/mysql"); fails
>
> Could someone clarify why? Are servlets the only 'proper' way to get
at my
> database source identified in jboss.jcml?
>
> I can get at it by going directly to the driver, but thta seems to
defeat
> the purpose of specifying the data source in the .jcml file.
>
> Thanks,
> r.b.
>
>
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user