Re: EJBs & CMP with real database users
From: Fredrik Bertilsson (fredrik_bertilsson_at_passagen.se)
Date: 08/25/04
- Next message: davout: "Newbie MySQL question: how to retrieve latest entry from a history of entries?"
- Previous message: Rich Wahl: "Re: mySQL Database to a TextArea?"
- In reply to: Matt Hughes: "EJBs & CMP with real database users"
- Next in thread: Jon Martin Solaas: "Re: EJBs & CMP with real database users"
- Reply: Jon Martin Solaas: "Re: EJBs & CMP with real database users"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 25 Aug 2004 01:23:48 -0700
I am afraid that J2EE will not help you very much here. Normally J2EE
applications are using connection pooling. The datasources are defined
(url, driver, user, password, etc) in a configuration file. When the
application want a connection it makes a lookup using the datasource
name. But the database user normally has to be defined in the
configuration file.
I think that you can't use connection pooling at all. Every user has
its own database session. You have to create connections (instead of
doing lookup), using JDBC DriverManager. Because you are not using
connection pooling, you have to check with you DBA that a user session
does not allocate too much memory on the database server. Otherwise
your application will scale very bad.
I also think that you can't use J2EE transaction handling, because you
are not using connection pooling. You have to do commit and rollback
explicit in your code. Or you can use some AOP (Aspect Oriented
Programming) framwork (like spring framework) and put the transaction
code in some post-processing code.
Because you are not using the two most important features of J2EE
(transaction handling and connection pooling), maybe you should not
use J2EE at all. It is a big overhead in money and performance using
J2EE.
/Fredrik
- Next message: davout: "Newbie MySQL question: how to retrieve latest entry from a history of entries?"
- Previous message: Rich Wahl: "Re: mySQL Database to a TextArea?"
- In reply to: Matt Hughes: "EJBs & CMP with real database users"
- Next in thread: Jon Martin Solaas: "Re: EJBs & CMP with real database users"
- Reply: Jon Martin Solaas: "Re: EJBs & CMP with real database users"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|