java.security.AccessException with client applet
Matthew Dalby <[email protected]>
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello all,
I am attempting to create a client Applet using the
HTTP transport and am recieving a security exception
when attempting to establish a connection. Has anyone
successfully created an JMS client applet?
Source:
props.put(Context.PROVIDER_URL,"http://127.0.0.1:8080/openjms/OpenJMSJndi");
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.exolab.jms.jndi.http.HttpJndiInitialContextFactory");
props.put(JndiConstants.HTTP_CLIENT_URL_PROPERTY,"http://127.0.0.1:8080/openjms/OpenJMSJndi");
Context context = new InitialContext(props);
TopicConnectionFactory factory =
(TopicConnectionFactory)context.lookup("JmsTopicConnectionFactory");
if (factory == null) {
throw new RuntimeException(
"Failed to locate connection
factory");
}
TopicConnection connection =
factory.createTopicConnection();
session =
connection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
...
Stack trace:
props.put(Context.PROVIDER_URL,"http://127.0.0.1:8080/openjms/OpenJMSJndi");
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.exolab.jms.jndi.http.HttpJndiInitialContextFactory");
props.put(JndiConstants.HTTP_CLIENT_URL_PROPERTY,"http://127.0.0.1:8080/openjms/OpenJMSJndi");
Context context = new InitialContext(props);
TopicConnectionFactory factory =
(TopicConnectionFactory)context.lookup("JmsTopicConnectionFactory");
if (factory == null) {
throw new RuntimeException(
"Failed to locate connection
factory");
}
TopicConnection connection =
factory.createTopicConnection();
session =
connection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
Thanks,
Matthew M. Dalby