Re: [jboss-dev-forums] [PicketBox Development] - JBoss AS7: Security : Running under a Java Security Manager
by Sven-Jørgen Karlsen
Sven-Jørgen Karlsen [https://community.jboss.org/people/svejk.rpl] commented on the document
"JBoss AS7: Security : Running under a Java Security Manager"
To view all comments on this document, visit: https://community.jboss.org/docs/DOC-17431#comment-9606
--------------------------------------------------
Hi, thanks for the article. I tried this to get 7.1.1.Final to boot up with a policy file, using a rule like the following:
...
grant codeBase "file:${jboss.home.dir}/jboss-modules.jar" {
permission java.security.AllPermission;
};
...
Moving on to the interesting part, applying rules to my deployment, I couldn't formulate an URI to adress the correct deployment unit in the codeBase attribute. E.g:
rules like:
grant codeBase "file:${jboss.home.dir}/standalone/deployments/policy-rebel-0.0.1-SNAPSHOT.war" {
permission java.util.PropertyPermission "*", "read,write";
};
didn't apply. But a general rule without codeBase, works. I suspect this might have something to do with VFS. So the question is: how do you address a deployment unit in codeBases of policy grants?
Sven-Jørgen
--------------------------------------------------
12 years, 11 months
[JBoss AS 7 Development] - Exception in thread "main" javax.naming.NameNotFoundException: RemoteConnectionFactory -- service jboss.naming.context.java.jboss.exported.RemoteConnectionFactory
by emre nakilcioglu
emre nakilcioglu [https://community.jboss.org/people/emrenak] created the discussion
"Exception in thread "main" javax.naming.NameNotFoundException: RemoteConnectionFactory -- service jboss.naming.context.java.jboss.exported.RemoteConnectionFactory"
To view the discussion, visit: https://community.jboss.org/message/720877#720877
--------------------------------------------------------------
Hello
I am trying to reach a JMS queue defined in Jboss 7.1.
However when I try to send a message, I am getting the exception while looking up for the connection factory. My code is as below:
Properties props = new Properties();
String JBOSS_CONTEXT="org.jboss.naming.remote.client.InitialContextFactory";;
props.put(Context.INITIAL_CONTEXT_FACTORY, JBOSS_CONTEXT);
props.put(Context.PROVIDER_URL, "remote://localhost:4447");
props.put(Context.SECURITY_PRINCIPAL, "usecase2");
props.put(Context.SECURITY_CREDENTIALS, "123456");
ic = new InitialContext(props);
*ConnectionFactory connectionFactory = (ConnectionFactory)ic.lookup("RemoteConnectionFactory");*
Queue queue = (Queue) ic.lookup("jms/queue/useCase");
And the exception is as below :
INFO: JBoss Remoting version 3.2.2.GA
Exception in thread "main" javax.naming.NameNotFoundException: RemoteConnectionFactory -- service jboss.naming.context.java.jboss.exported.RemoteConnectionFactory
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:177)
at org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:124)
at org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:70)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
What could be the reason ? Any help is appreciated.
Regards
-emre
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/720877#720877]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 11 months