File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes EJB1.1 to EJB 2.0 migration Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "EJB1.1 to EJB 2.0 migration" Watch "EJB1.1 to EJB 2.0 migration" New topic
Author

EJB1.1 to EJB 2.0 migration

Raj Puri
Ranch Hand

Joined: Apr 24, 2003
Posts: 189
I was using Oracle application server(latest 10g) that has EJB 2.0. When I run the old code that was based on EJB 1.1. I get error:
Can not getprimaryket within ejbcreate() - ollyy thing I do in ejbcreate is return null as the key is Oracle system generated.. Believe me there is no call like getprimarykey in my code. Here is the line that fails.

IEventEntityHome eventHome = (IEventEntityHome)getEventEntityBean();
event = eventHome.create( _event.getContact1(), _event.getContact2(), _event.getEventdate(), _event.getStarttime(), _event.getEndtime(), _event.getDescr(), _event.getNotes(), _event.getcustidd());

And code for getEventEntityBean() is below:

private IEventEntityHome getEventEntityBean()
throws Exception
{
Context ctx = new InitialContext(System.getProperties());
return(IEventEntityHome)ctx.lookup("ejb.common.EventEntityBean");
}


Any ideas?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel/download
 
subject: EJB1.1 to EJB 2.0 migration
 
Similar Threads
Return type of ejbCreate
CMP :: ejbCreate :: why return null ?
weblogic 8.1 , Oracle sequence problem.
ejbcreate return type
Differences between ejbCreate() in CMP and BMP?