File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Map a nested table in an session-managed Entity Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Map a nested table in an session-managed Entity Bean" Watch "Map a nested table in an session-managed Entity Bean" New topic
Author

Map a nested table in an session-managed Entity Bean

hollis
Greenhorn

Joined: Jul 31, 2001
Posts: 2
Hi, All
I am new to EJB, now i am thinking of possibility of mapping an session-managed entity bean to a nested table in Oracle 8.1.7, can any one guide me to do that since i have not see any doc about them.
Thanks
Hollis
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1121

Hi Hollis,
Any interaction that a Session bean (either stateful or
stateless) does with the database _must_ be done directly using
JDBC. You must put code into your session bean that connects to
the database and queries the database tables. This means using
classes in the java.sql package including Connection, Statement,
ResultSet, etc.


Therefore, in order to query a nested table, you use the same SQL
as you would from (say) an SQL*Plus session. Something like:




<pre>
Connection conn = DriverManager.getConnection();
Statement stmt = conn.getStatement();
ResultSet rs = stmt.executeQuery(" ... put your SQL here ...");
</pre>


Good Luck,
Avi.

------------------
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
hollis,
Please note that JavaRanch has a naming standard that requires you to register using your full name (first name and last name).
Thnaks.
------------------
Tom
Sun Certified Programmer for the Java� 2 Platform
Moderator of the forums:
J2EE and EJB
Other Java APIs


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Map a nested table in an session-managed Entity Bean
 
Similar Threads
Bean Managed Transactions
Bean Managed Transactions
Container Managed Transactions
Mock question about EntityManager
BMP transaction in DAO