Hi All,

I have a question regarding Creating CMP Entity EJBs.
For several of our Entities, we use a sequence number generated by our
database (Oracle) as a primary key.
The problem is that our ejbCreate() method expects a primary key when
invoked. Also, the persister generated create methods appear to be called
before even the first line of the bean's ejbCreate().

To get around this, at the controller level, we were able to create a
separate Connection, query the database for the next sequence number, close
the connection, and then call the EJBHome Create() method passing in the
sequence number.
Although it works, this approach seems very clumsy and slow.  There's got to
be a better way,
Perhaps where we don't even need a separate database connection.

I assume many of you are also using database generated sequence numbers.
Have any of you run into this same problem? Any ideas for a more elegant
solution?


Thanks,
Dan

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to