EJB design: about connect with oracle database
Where can I download the tutorial about "How to write EJB Entity Bean CMP/BMP to connect with Oracle Database."
- Posted by: xwing games
- Posted on: May 16 2003 05:38 EDT
- The database is not specific to Entity Beans by SAF . on May 16 2003 09:54 EDT
- about connect with oracle database by Brian Chan on May 16 2003 13:34 EDT
You probably won't find an article of that nature since, at least for CMP Entity Beans, the underlying database is abstracted and not specific in any way to your implementation. You simply need to configure declerative mappings in your deployment descriptors properly and you should have no problem using CMP Entity Beans with Oracle, or any other database.
For BMP Entity beans, you will need to code all persistence and query logic manually. I recommend using a DAO and ConnectionFactory pattern when taking this approach as to avoid placing any database/vendor-specific code in your entity beans.
For tutorials that might assist you in learning the basic of CMP/BMP Entity beans, refer to the following link..
Hope it helps,
Hmm... Thank you.
But when I want to setup the DataSource. I must specify the JDBC Driver(the default have 2 drivers > db2,idb...)
When I click add the driver to specify the Oracle JDBC driver.I don't know the data to enter in the textbox.
What you can do is check your datasource entry:
I think what you are looking for is the DB URL
It should be of the format:
localhost is the hostname of your database server.
1521 is the standard port for db connection
mydatabase is the database name (which you will be using for your application)
This should work. Your full datasource entry should look like this:
<pool-controller min="5" max="10"/>
If you want to use reference sources, check out otn.oracle.com
go to the Java section. But most of the whitepapers talks about deploying on Oracle database and Oracle Application server. Not sure if it's helpful to you