>
> I can myself think of 2 reasons:
>
> 1. Entity EJB cannot be used in those table which does not have any primary
> key.

As well as using the standard java types for the Primary Key class you can also create 
your own. These can therefore contain anything you like. So it is not important that 
you define a primary key of id, just as long as there is some way of uniquely defining 
each row.

> 2. Entity EJB cannot be used in those applications where the database can
> be changed from some other applications as well.In this case the EJB is not
> in sync with the database. ie. Entity bean will not be refreshed with the
> changes made in the database by the other application.

Again this is not an issue. I'm only used to using weblogic, but in the deployment 
descriptor there is an attribute you can set to say if the database is shared with 
other applications. (I assume this goes for all containers). If the database is shared 
the container forces a lookup before any actions are performed.

> Are these valid reasons? Are there any other constraints in using entity
> beans?

These two reasons in my humble (and a little friday after lunch in the pub) opinion 
should not stop you using EJBs.

Other reasons that do float about are to do with performance. But again I have not run 
into these problems as yet. All the benefits of transactional support and security 
that EJBs bring far out weigh the drawbacks!

regards
IV



http://www.amazon.co.uk/exec/obidos/redirect-home?tag=velloscouk-21&placement=home_multi.gif&site=amazon

===========================================================================
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