• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using EJB and Oracle

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure if this is possible with CMP.
you can use bean-managed entity beans for your purpose.
Faisal
 
Oleg Shklyar
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic