This content has been marked as final.
Show 5 replies
-
1. Re: datasource and singleton
adrian.brock May 7, 2004 11:28 AM (in response to greiff)Yes, the DataSource is a factory. Singleton caching works with any factory that has
been coded correctly (i.e. it is thread safe).
In fact, the JBossCMP engine does this. -
2. Re: datasource and singleton
greiff May 7, 2004 11:30 AM (in response to greiff)thanks for your quick reply adrion
it's a helpful information
Torsten -
3. Re: datasource and singleton
henk53 Aug 14, 2009 5:11 PM (in response to greiff)"greiff" wrote:
to avoid expensive JNDI lookups to datasource is it possible to use the singleton pattern for datasources ?
Just wondering, are JNDI lookups really that expensive? When looking up an EJB (either programmatic, or via injection), isn't there a JNDI lookup happening all the time? -
-
5. Re: datasource and singleton
vickyk Oct 9, 2009 3:03 AM (in response to greiff)"henk53" wrote:
Just wondering, are JNDI lookups really that expensive? When looking up an EJB (either programmatic, or via injection), isn't there a JNDI lookup happening all the time?
Yes, but you need to understand that there is a trade-off between the efficiency and flexibility(loosely coupling).
You should be talking at EJB forums for the EJB details, you can get more help there.