Hi all!

Daniel De Luca wrote:

>    2.I don't have EJB Server vendor independency anymore because I need to get a
> DB connection from the the connection
>      pool. To do this I need to put a specify EJBServer parameter in the
> statement:
>
> I think the EJB specs need to provide something more clean...

Sure, it would be good to have the EJB specs to cover all this things that could be
EJBServer specific, but it is easy to go around the problem right now. Just build
your own classes (factories) that can give you these EJBServer specific things like
InitialContext, sql connections, get the home/remote interface locally within the
EJBServer when it supports it... Let the beans properties file have a parameter
telling the bean how to get a connection:

//Get kind of EJBServer from property file
kindOfEJBServer = ......

//Now kindOfEJBServer holds Tengha or Ejipt or Persistence or whatever...

//Get the connection
Connection con = MyConnectionFactory.getConnection(kindOfEJBServer);

Now you can use a specific EJBServers optimization without changing your code in the
bean.

//Lennart
--
________________________________
Lennart Petersson
Benefit Partner AB
Bergendorffsgatan 5A
S-652 24 Karlstad
Phone: +46 (0)54 186800
mailto:[EMAIL PROTECTED]
http://www.benefit.se

===========================================================================
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".

Reply via email to