How can an entity bean access a custom connection pool?

Is there any way for entity beans to access a shared context like how servlets/jsp can access servlet context for global information?My entity bean needs access to a LDAP connection pool created by a servlet. Could JNDI provide an alternate solution?
[278 byte] By [buruccha] at [2007-9-26 3:04:31]
# 1

I think I've seen code using JNDI to retreive a DB connection in a pool managed by the container.

Have a look at DataSources, perhaps it will work for you...

It was looking like this :

InitialContext ic = new InitialContext();

DataSource ds = (DataSource) ic.lookup(""java:/OracleDB);

Connection con = ds.getConnection();

delattrj at 2007-6-29 11:05:24 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...