IIRC, only EJBs or classes residing in the same JVM as the EJB
server may access DataSources defined the EJB server.  There have been
several posts in this mailing list regarding this.  If the archive search is
working, try looking up "DataSource client".

---
Michael R. Maraya


> ----------
> From:         [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To:     [EMAIL PROTECTED]
> Sent:         Thursday, July 19, 2001 12:07 PM
> To:   [EMAIL PROTECTED]
> Subject:      [JBoss-user] How to get the DataSource
> 
> In the config file jboss.jcml, I configure a database pool for Oracle, I
> give the Poolname,  driver,  url, username, password. I start the JBoss,
> everything is fine. Now the problem is I try to get the DataSource from
> this registered pool, then I can get the connection from the DataSource.
> (In a regular Java class, not in the EJB )
> May I use following code to do this?
> 
> InitialContext iniCtx = new InitialContext();
> DataSource ds = iniCtx.lookup( poolName );
> 
> 
> Thanks.
> 
> 
> Flora Ding
> 
> 
> 
> _______________________________________________
> 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

Reply via email to