File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Map a nested table in an session-managed Entity Bean

 
hollis
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1141
1
Java Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13974
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic