RE: java.security.AccessException with client applet
"Tim Anderson" <[email protected]>
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <[email protected]> |
You're might be running into a limitation of the http connector.
It tries to call System.getProperty() which is currently not
wrapped to catch Security exceptions. What does the stack trace
show?
You can work around this by relaxing security permissions.
Regards,
Tim
> -----Original Message-----
> From: openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> [mailto:openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]On Behalf Of
> Matthew Dalby
> Sent: Wednesday, 14 May 2003 11:28 PM
> To: openjms-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Subject: [openjms-developer] java.security.AccessException with client
> applet
>
>
> 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/Open
> JMSJndi");
>
> 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/Open
> JMSJndi");
>
> 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
>
>
> -------------------------------------------------------
> Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
> The only event dedicated to issues related to Linux enterprise solutions
> www.enterpriselinuxforum.com
>
> _______________________________________________
> openjms-developer mailing list
> openjms-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/openjms-developer
>