The
EJB 2 Spec (10.8.3 - Special case: Unknown primary key class) says that in cases where the PrimaryKeys are generated automatically by the underlying database, the bean provider must declare the findByPrimaryKey method to return java.lang.Object and specify the Primary Key Class as java.lang.Object in the Deployment Descriptor.
In this case, the Container must generate the Primary Key value when the entity bean instance is created (and before ejbPostCreate is invoked on the instance.) When defining the Primary Key for the Enterprise Bean, the Deployer using the Container Provider's tools will typically add additional container-managed fields to the concrete subclass of the entity bean class.
Is WebSphere 5.x currently able to facilitate this and if so, how in WSAD? In other words, what's the path of least resistance to accommodate autogen'd PKs that are being created in DB2 8.1? I'm already familar with the
patterns around this, but they seem heavy handed for something so simple. Worst case I could use UUID pattern if need be, but I was hoping WebSphere has support similar to WLS 8.1.
Thanks!