Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Map a nested table in an session-managed Entity Bean

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

------------------
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic