aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Using EJB and Oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Using EJB and Oracle" Watch "Using EJB and Oracle" New topic
Author

Using EJB and Oracle

Oleg Shklyar
Greenhorn

Joined: May 28, 2001
Posts: 26
Hello ranchers,
Will anybody clarify my questions:
1. I am using WebLogic 6.0 and Oracle 8.1.7. A primary key generated using sequence object in RDBMS. Following Ed Roman book "Mastering EJB" I created CMP enterprise bean and in weblogic-cmp-rdbms-jar.xml descriptor I used weblogic QL.
Why I can not get the recordset using findAll() method containing all DB fields without using create() method ? I tryed to create() first and findAll() next and it works, but I don't need to create any row, I just need to select it.
2. How should I use sequence object with connection to EJB. There is no proper explanation in EJB books
TIA
Oleg
faisal mahmood
Ranch Hand

Joined: Nov 30, 2000
Posts: 349
I am not sure if this is possible with CMP.
you can use bean-managed entity beans for your purpose.
Faisal
Oleg Shklyar
Greenhorn

Joined: May 28, 2001
Posts: 26
Thanks, Faisal.
I'd like just to clarify the second thing: when I'm doing with Oracle I have to use sequence object to get a value to have it as primary key (for MS SQL Servet you don't need to deal with primary key at all if it is assigned with IDENTITY).
If someone doing with Oracle, please tell me: should I get the value of primary key first (calling the sequence object first) and then pass that value into CallableStatement object's methods.
Please give your suggestions.
TIA
Oleg
Marcos Maia
Ranch Hand

Joined: Jan 06, 2001
Posts: 977
I created CMP enterprise bean and in weblogic-cmp-rdbms-jar.xml descriptor I used weblogic QL.
Why I can not get the recordset using findAll() method containing all DB fields without using create() method ? I tryed to create() first and findAll() next and it works, but I don't need to create any row, I just need to select it.
2. How should I use sequence object with connection to EJB. There is no proper explanation in EJB books

Hi I think the design patterns catalog from sun it�s gonna beat very usefull to clarify your questions, take a look at: http://java.sun.com/j2ee/blueprints/design_patterns/index.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using EJB and Oracle