This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
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>
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