geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avin98 <avi...@yahoo.com>
Subject ActiveMQ ConnectionFactory Lookup Error
Date Thu, 03 Aug 2006 03:53:02 GMT

I have my queues defined in a geronimo-deployment plan as 

<resourceadapter>
      <resourceadapter-instance>
        <resourceadapter-name>JMSResource</resourceadapter-name>
          <config-property-setting
name="ServerUrl">tcp://localhost:61616</config-property-setting>
          <config-property-setting
name="UserName">geronimo</config-property-setting>
          <config-property-setting
name="Password">geronimo</config-property-setting>
         
<workmanager><gbean-link>DefaultWorkManager</gbean-link></workmanager>
        </resourceadapter-instance>
        <outbound-resourceadapter>

          <connection-definition>
           
<connectionfactory-interface>javax.jms.ConnectionFactory</connectionfactory-interface>
            <connectiondefinition-instance>
              <name>jms/QueueConnectionFactory</name>
             
<implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface>
              <connectionmanager>
                <single-pool>
                  <max-size>10</max-size>
                  <min-size>0</min-size>
                 
<blocking-timeout-milliseconds>5000</blocking-timeout-milliseconds>
                  <idle-timeout-minutes>0</idle-timeout-minutes>
                  <match-one/>
                </single-pool>
              </connectionmanager>
            </connectiondefinition-instance>
          </connection-definition> 

        </outbound-resourceadapter>
      </resourceadapter>

      <adminobject>
        <adminobject-interface>javax.jms.Queue</adminobject-interface>
       
<adminobject-class>org.codehaus.activemq.message.ActiveMQQueue</adminobject-class>
        <adminobject-instance>
          <message-destination-name>Queue1</message-destination-name>
          <config-property-setting
name="PhysicalName">Queue1</config-property-setting>
        </adminobject-instance>
      </adminobject>


    </connector>
  </ext-module>


I try to access the JMS resource in my servlet as

Properties p = new Properties();
            p.setProperty(Context.PROVIDER_URL, "tcp://localhost:61616");

            p.setProperty(Context.SECURITY_PRINCIPAL,"geronimo");
            p.setProperty(Context.SECURITY_CREDENTIALS,"geronimo"); 
            
            naming = new InitialContext(p);
        
        
        _factory =
            (QueueConnectionFactory)
naming.lookup("java:comp/env/jms/QueueConnectionFactory");


However by doing this .....I get the following exception:

Caused by: java.lang.IllegalArgumentException: rmiURLContext: name is not an
RMI
 URL: tcp://localhost:61616
        at com.sun.jndi.url.rmi.rmiURLContext.getRootURLContext(Unknown
Source)
        at com.sun.jndi.toolkit.url.GenericURLContext.lookup(Unknown Source)
        at com.sun.jndi.url.rmi.rmiURLContextFactory.getUsingURL(Unknown
Source)

        at
com.sun.jndi.url.rmi.rmiURLContextFactory.getObjectInstance(Unknown S
ource)
        at
com.sun.jndi.rmi.registry.RegistryContextFactory.URLToContext(Unknown
 Source)
        at
com.sun.jndi.rmi.registry.RegistryContextFactory.getInitialContext(Un
known Source)
        at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
        at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
        at javax.naming.InitialContext.init(Unknown Source)
        at javax.naming.InitialContext.<init>(Unknown Source)




-- 
View this message in context: http://www.nabble.com/ActiveMQ-ConnectionFactory-Lookup-Error-tf2043605.html#a5626428
Sent from the Apache Geronimo - Users forum at Nabble.com.


Mime
View raw message