Hi,

the ejb spec prohibits accessing resources like sockets from an ejb. (it
might work, but you are almost certain to get lots of unrecoverable
resources, since the beans will constantly be swapped in and out of use,
while they have resources in use.)

I believe the official way to do this kind of communication is to use jms,
now made easier since there is a jca resource adapter for jbossmq for your
ejbs to use to send messages.

So, your ejb would get a connection to the message queue, and send the data
to the queue.

Outside the container, (I think this can be either on the ejb machine or
the cgi machine, or indeed somewhere else), a small java program reads the
message queue and sends data to the cgi machine through sockets.

Come to think of it, you could (I think) also write a simple jca resource
adapter that doesn't support transactions that just sends data over
sockets.

I haven't implemented anything like this myself, please let me know if I am
wrong.

Thanks
david jencks


On 2001.05.04 06:00:14 -0400 Ulli Hoffmann wrote:
> Hello,
> 
> the idea is to send data to another URL (different server), which is
> running
> cgi scripts for processing that data. I'm able to connect with running a
> simple Java class, but it doesn't work from within the JBoss Server.
> 
> First lines of error:
> java.security.AccessControlException: access denied
> (java.net.SocketPermission www.xxx.com resolve)
>         at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java
> :272)
>         at
> java.security.AccessController.checkPermission(AccessController.java:399)
>         at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
> 
> 
> So I suppose there are some adjustments necessary regarding
> security/socket
> access etc. Couldn't find anything that specific in the manuals
> available.
> 
> Can somebody help?
> 
> Tx and regards,
> Ulli
> 
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 


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

Reply via email to