Hi!
[EMAIL PROTECTED] wrote:
> In Chapter 1, page 9, of the Sun Enterprise Development Guide, they list some
> Programming Restrictions for Enterprise Beans. It says to avoid conflicts with
> the ocntainer services, enterprise beans are restricted from performing certain
> operations.
>
> How do you get around the following restrictions or what container services
> allow you to do the same thing?
You will find a bunch of answers to these questions in the EJB-INTEREST
mailing list archives (archives.java.sun.com).
> 1. Accessing files or directories with the java.io package. How do you access
> outside files then?
The two most common ways is to make a JDBC driver wrapper, or make your
own separate library that you bind in JNDI which the beans can lookup
and use.
Note though that if you want a scalable application using files is not a
good idea at all. Store data in databases in such a case, regardless of
what it is.
> 2. Listening on a socket, accepting connections on a socket, or using a socket
> for multicast.
You would typically do this as a JMX MBean that you plug into the
server, which can call your EJB's to do work.
> 3. Setting a socket factory used by ServerSocket, Socket, or the stream handler
> factory used by the URL class. Not sure if I really care about this.
See above.
> 4. Loading a native library. Can you use JNI in an Enterprise Bean? How would
> I call an external Windows DLL from a bean?
I think you're not allowed to load libraries, but you're allowed to call
them (I think). In any case, see 1.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]