>
> Greetings,
>
> I wonder what should I use for executing some business logic
> and call stored procedures: ordinary classes or stateless
> session beans?
>
> For stateless session beans it's possible to cache somewhere
> the datasource factory or must I lookup always for the jndi
> connection pool?
Sure:
private static DataSource ds = null;
private static InitialContext ic = null;
private void init() {
if (ic == null)
initHomes();
}
private static synchronized void initHomes() {
if (ic == null) {
ic = new InitialContext();
ds = (DataSource) ic.lookup("someDataSource);
}
}
>
> thanks.
>
> P.S.-I believe the stateful session bean is out of question
> since it's much more heavy than stateless beans.
>
> regards,
> Pedro Salazar.
> --
> PS
> [EMAIL PROTECTED]
> PGP:0E129E31D803BC61
>
> ==============================================================
> =============
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "signoff EJB-INTEREST".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".