Hi, 

I am fairly new to EJB's and I want to use CMP for the speed of development as the 
majority of tables are quite simple. There is one problem however the database (SQL 
Server) have an IDENTITY column as a primary key. This means CMP cannot create the 
object properly as it doesn't have the primary key for ejbCreate. 

So, what if all accessors, find methods etc. were implemented as CMP, but I write a 
sort of Factory stateless session bean that can create manually using JDBC. The 
advantage being that most of the logic is already working with the exception of the 
create method. The stateless session bean could even call findByPrimaryKey on the 
beans home interface and return a remote reference to the newly created entity bean. 

Is this workable? Comments and suggestions as to another way are welcome. 

Regards,

Duncan
___________________________________________________________________________
Visit http://www.visto.com.
Find out  how companies are linking mobile users to the 
enterprise with Visto.


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to