Roman Brouk wrote:
> I am using BMP. The question is how to access DataSource that represents
> connection pool.
>
> on start up JBOSS says that "[mySQLDS] XA Connection pool mySQLDS bound to
> java:/mySQLDS [mySQLDS] ". I have entries in jboss.jcml.
>
> But in entity bean which I retrieve from JNDI, when I get connection:
>
> try{
> InitialContext jndiContext = new InitialContext();
> javax.sql.DataSource ds = (javax.sql.DataSource)
> jndiContext.lookup("java:/mySQLDS");
> con = ds.getConnection();
> }catch(Exception ex){
> System.out.println("Looking for DataSource: " +
> ex.getMessage());
> }
>
>
> I get message that mySQLDS is not bound.
That's strange. What you're doing isn't the "correct" way for an EJB to
access a DataSource, but it should work. Is this all using a single
JBoss instance? What does the JNDIView MBean tell you (i.e. go to port
8082, find the JNDIView MBean, invoke the list operation)?
Toby.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user