| 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?
|
 |
 |
|
|
subject: EJB1.1 to EJB 2.0 migration
|
|
|