Where can I download the tutorial about "How to write EJB Entity Bean CMP/BMP to connect with Oracle Database."
Thank.
-
about connect with oracle database (4 messages)
- Posted by: xwing games
- Posted on: May 16 2003 05:38 EDT
Threaded Messages (4)
- The database is not specific to Entity Beans by SAF . on May 16 2003 09:54 EDT
- The database is not specific to Entity Beans by xwing games on May 19 2003 03:05 EDT
- The database is not specific to Entity Beans by Preeti Ramesh on May 19 2003 10:03 EDT
- The database is not specific to Entity Beans by xwing games on May 19 2003 03:05 EDT
- about connect with oracle database by Brian Chan on May 16 2003 13:34 EDT
-
The database is not specific to Entity Beans[ Go to top ]
- Posted by: SAF .
- Posted on: May 16 2003 09:54 EDT
- in response to xwing games
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..
http://java.sun.com/j2ee/tutorial/1_3-fcs/
Hope it helps,
SAF -
The database is not specific to Entity Beans[ Go to top ]
- Posted by: xwing games
- Posted on: May 19 2003 03:05 EDT
- in response to SAF .
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. -
The database is not specific to Entity Beans[ Go to top ]
- Posted by: Preeti Ramesh
- Posted on: May 19 2003 10:03 EDT
- in response to xwing games
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:
jdbc:oracle:thin:@localhost:1521:mydatabase
where
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:
<datasources>
<jdbc name="MyConnectionName">
<pool-controller min="5" max="10"/>
<dburl>jdbc:oracle:thin:@localhost:1521:mydatabase</dburl>
<user>mylogin</user>
<password>myPassword</password>
</jdbc>
<j2ee name="MyJ2eeConnection">
<dbname>someDB</dbname>
</j2ee>
</datasources> -
about connect with oracle database[ Go to top ]
- Posted by: Brian Chan
- Posted on: May 16 2003 13:34 EDT
- in response to xwing games
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