users@glassfish.java.net

Using local jdbc reference

From: <glassfish_at_javadesktop.org>
Date: Thu, 16 Aug 2007 14:41:46 PDT

Is there a way to use a local jdbc reference to a DataSource and then map it to a different on in the app server?

For example if I have an application with jdbc/myDataSource in it:

[code]
@SessionBean
public class MyBean implements MyBeanLocal {
    @Resource(name = "jdbc/myDataSource")
    private DataSource ds;

    ...
}
[/code]

Right now, I simply go to the admin console, create a connection pool and then the jdbc resource.

But if I want to run another app using the same bean (in a different EAR) but talking to a different connection pool, how and where do I make that change so that the two can co-exist?
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=231230