This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

EJB 1.1/CMP and oracle triggers  RSS feed

 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some old code based on EJB 1.1 ,CMP 1.1 works on OC4J(9.0.02). Now going forward seems this does not work(seems it calls getprimarykey in ejbcreate in generated wrappers). Basically, I have a before insert trigger that generates nextval from oracle sequnece and we call create with
all required columns and set the PK to null. Will this setting work in CMP
for generating PK using oracle sequence. We are on OC4J so that is the hard part. Please share your experience. I am sure it will be valuable to many as this is a standard way in Oracle to use sequence.
 
Raj Puri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will anyone take a take on this. I am finding that code i have with ejb 1.1 and CMP on OC4J is braking when I move to higher version. This will mean a rewrite. I did not expect this. Has anyone taken code from EJB 1.1.
and moved to EJB 2.0 without any changes. Really code I have is straight from Petstore EJB 1.1 but it is quite big as I have a number of beans. It complaints that I am calling getprimarykey in create method and it is not per EJB 2.0 chapter 10.5.4. Really the code is generated by OC4J/Orion as
wrappers and when I debug it does call at a number of places getprimarykey.
So I will think generated code is messy.

Any one with these kinds of issues. I want to use Oracle trigger(pre-insert) to make PK. I have in code PK value=9999 as containre needs to have some bogus value to work with. Before I tried using null for that it did not work also. I am not sure if that is an issue or the syntax of EJB 1.1 is not supported anyomre and one needs to use different methods(portable) to istantiate the EJB.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!