Somefname1 Somelname1 [https://community.jboss.org/people/mybrandnewusername] 
created the discussion

"Can't get ConnectionFactory for JMS from JNDI when using custom security 
domain"

To view the discussion, visit: https://community.jboss.org/message/808534#808534

--------------------------------------------------------------
I'm running hornet JMS and EJB on jboss-as-7.2.0.Final with my custom security 
domain. But in JMS test I can't get ConnectionFactory. When I do not use my 
security domain for remoting subsystem, JMS works fine. EJB works fine with my 
security domain.

I use standalone-full.xml for my test with several changes:

1. security realm
{code:xml}
<security-realm name="MYRealm">
    <authentication>
        <jaas name="mydomain"/>
    </authentication>
</security-realm>
{code}

2. security domain
{code:xml}
<security-domain name="mydomain">
    <authentication>
        <login-module code="my.module.MyLoginModule" flag="required" 
module="my.module"/>
    </authentication>
</security-domain>
{code}


3.  my queue
{code:xml}
<jms-queue name="DemoInfoQ">
    <entry name="jms/queue/DemoInfoQ"/>
    <entry name="java:jboss/exported/jms/queue/DemoInfoQ"/>
</jms-queue>
{code}

4. set my security realm for remoting subsystem
{code:xml}
<subsystem xmlns="urn:jboss:domain:remoting:1.1">
    <connector name="remoting-connector" socket-binding="remoting" 
security-realm="MYRealm"/>
</subsystem>
{code}

When I change security realm for remoting subsystem (4) to "ApplicationRealm" 
or nothing, JMS works. But with MYRealm my test client gives an exception, when 
I try to lookup ConnectionFactory:
{code}
javax.naming.NamingException: Failed to connect to any server. Servers tried: 
[remote://localhost:4447]
{code}

Why do I get such a strange error and how can I fix that? I expect some kind of 
security exception at least. "my.module.MyLoginModule" allows all (for test 
purpose), and (once again) EJB woks ok with my realm.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/808534#808534]

Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to