Hey

Ian McCallion wrote:
> > Forgive my ignorance - I'm relatively new to this - but if an Enterprise
> > Bean is forbidden from doing IO or accessing external resources, how is it
> > possible to implement Bean-Managed Persistence? In this case, the Entity
> > Bean is responsible for storing and restoring its own state in some
> > arbitrary store ( which could be just a file, not necessarily an RDBMS ) -
> > that would be rather difficult without doing IO!
>
> The restriction is on use of non-transactional flat file I/O. JDBC is allowed.

What Ian really mean to say ;-) was that there is no magic that allows
JDBC to not abide to the restrictions, but usually the JDBC driver
(and/or DB) is not packaged with the EJB application, which allows it to
do I/O (=not the same *CLASSLOADER* as the EJB app! Is it clear now?).
If the DB is inprocess (as I believe InstantDB is), then the driver/DB
must use doPrivileged or they'll choke on SecurityExceptions. If they do
network calls (as most JDBC drivers do), then they're off the hook
because of that as Permission checks are only done on all callers on the
stack.

/Rickard

--
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684

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