Discussion:
[openjms-developer] [ openjms-Bugs-1109259 ] Applet client connection to firewalled server
SourceForge.net
2005-01-25 18:06:22 UTC
Permalink
Bugs item #1109259, was opened at 2005-01-25 18:06
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1109259&group_id=54559

Category: client
Group: v0.7.6
Status: Open
Resolution: None
Priority: 5
Submitted By: Ken Melms (whitegold)
Assigned to: Jim Alateras (jalateras)
Summary: Applet client connection to firewalled server

Initial Comment:
When an unsigned Applet attempts to connect to a server
that has been configured to be behind a Firewall (NAT
or Port Forwarding) and the
TcpConfiguration:internalHost attribute is used - any
client connection attempt from INSIDE the firewall
fails with:

SEVERE: Can not create TopicConnection.
javax.jms.JMSException: Failed to create connection:
java.security.AccessControlException: access denied
(java.net.SocketPermission 172.18.XX.XX:3030
connect,resolve)
at
org.exolab.jms.client.mipc.IpcJmsServerStub.openConnection(IpcJmsServerStub.java:338)
at
org.exolab.jms.client.mipc.IpcJmsServerStub.createConnection(IpcJmsServerStub.java:197)
at
org.exolab.jms.client.JmsConnection.<init>(JmsConnection.java:189)
at
org.exolab.jms.client.JmsTopicConnection.<init>(JmsTopicConnection.java:81)
at
org.exolab.jms.client.JmsTopicConnectionFactory.createTopicConnection(JmsTopicConnectionFactory.java:113)
at
org.exolab.jms.client.JmsTopicConnectionFactory.createTopicConnection(JmsTopicConnectionFactory.java:10


The root cause is that an unsigned Applet may only make
socket connections to the server it came from -
otherwise an AccessControlException is raised.

org.exolab.jms.client.mipc.IpcJmsServerStub.openConnection()
only tests for "IOException" before trying the fallback
internalHost ip address - and thus the exception
bubbles up and the fallback is never used.

The solution I successfully found was to modify the
catch() clause to catch "Exception" and then attempt
the fallback 'internalHost' regardless of the cause.



----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1109259&group_id=54559
Loading...