Announcement Announcement Module
Collapse
No announcement yet.
Weblogic cluster URL not working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weblogic cluster URL not working

    Hi

    we have the following definition for a jndiTemplate:

    Code:
    <!-- remote access to weblogic JNDI -->
        <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
            <property name="environment">
                <props>
                    <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                    <prop key="java.naming.provider.url">t3&#58;//10.23.224.22,10.23.224.23&#58;7007</prop>
                    <prop key="java.naming.security.principal"></prop>
                    <prop key="java.naming.security.credentials"></prop> 
                </props>
            </property>
        </bean>

    this template is injected to an EJB:

    Code:
    <bean id="AlertServiceEJB" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
            <property name="jndiName" value="AlertServiceWrapper"/>
            <property name="businessInterface" value="com.itp.gt.alert.ejb.AlertServiceWrapper"/>
            <property name="jndiTemplate" ref="jndiTemplate"/>
        </bean>
    The application code is obtaining a reference to the AlertServiceEJB and makes a method call.

    The problem we get is that we do not see the bean call being executed at all.

    When we change the URL from the cluster address: t3://10.23.224.22,10.23.224.23:7007

    to a url for a single server: t3://10.23.224.23:7007

    the EJB call gets executed.


    Does anyone have an idea what might be wrong?

  • #2
    Here is what we see in the log when we use the single server URL:

    Code:
    Oct-04-2005 23&#58;35&#58;32 DEBUG &#40;AbstractRemoteSlsbInvokerInterceptor.java&#58;209&#41; - Obtained reference to remote EJB&#58; ClusterableRemoteRef&#40;7641916881034384007S&#58;10.23.224.23&#58;&#91;7007,7007,-1,-1,7007,-1,-1,0,0&#93;&#58;geotrades&#58;gtserver2 &#91;-7447132962224709846S&#58;10.23.224.22&#58;&#91;7007,7007,-1,-1,7007,-1,-1,0,0&#93;&#58;geotrades&#58;gtserver1/293, 7641916881034384007S&#58;10.23.224.23&#58;&#91;7007,7007,-1,-1,7007,-1,-1,0,0&#93;&#58;geotrades&#58;gtserver2/293&#93;&#41;/293
    with the cluster URL we do not see ANY log for the bean call

    Comment


    • #3
      Afaik,
      t3://10.23.224.22,10.23.224.23:7007
      is not a valid url nor a list of valid urls.

      You may want to try
      Code:
       t3&#58;//10.23.224.22&#58;7007,t3&#58;//10.23.224.23&#58;7007

      Comment


      • #4
        Thanks for the reply,

        We use the same jndiTemplate to publish an object in the cluster JNDI and this call actually requires the cluster url in the form we use. (this is how it is specified in weblogic's docs)
        using a single server causes weblogic to complain that we publish JNDI in a non-clustered way to the cluster.

        should we use separate and use two differently configured instances of jndiTemplate?

        NY

        Comment


        • #5
          Weblogic cluster URL not working

          Does Weblogic expect to be using it's own InitialContext? Like isn't there a WLInitialContext or something that is maybe setup to parse that url differently?

          Comment


          • #6
            Originally posted by dejanp
            Afaik, is not a valid url nor a list of valid urls.
            You may want to try
            Code:
             t3://10.23.224.22:7007,t3://10.23.224.23:7007
            It is valid for WebLogic's own JNDI provider. See http://e-docs.bea.com/wls/docs81/jndi/jndi.html#467605

            Comment


            • #7
              Yes, WL does use its own InitialContext.
              Have a look at the original post. It is declared in the "java.naming.factory.initial" property of the JndiTemplate.

              Regards,
              Andreas

              Comment


              • #8
                t3://10.23.224.22:7007,10.23.224.23:7007

                t3://10.23.224.22:7007,10.23.224.23:7007 will do

                I tested this config, based on the weblogic example
                file:///C:/Oracle/Middleware/wlserver_10.3/samples/server/examples/src/examples/spring/sconfig/instructions.html?skipReload=true

                Client
                <bean id="helloWorldService" class="org.springframework.remoting.rmi.JndiRmiPro xyFactoryBean">
                <!--- niet EJB property name="jndiName" value="SimpleEJB#simple" /-->
                <property name="jndiName" value="HelloService" />

                <property name="serviceInterface" value="simple.SayHello" />

                <property name="jndiEnvironment">
                <props>
                <prop key="java.naming.factory.initial">weblogic.jndi.WL InitialContextFactory</prop>
                <prop key="java.naming.provider.url"> t3://localhost:8001,localhost:9001 </prop>
                </props>
                </property>
                </bean>

                Server
                <?xml version="1.0" encoding="UTF-8"?>
                <beans xmlns="http://www.springframework.org/schema/beans"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
                <bean name="/sayHello" class="simple.SayHelloAction">
                <property name="sayHello" ref="SimpleEJB#simple.SayHello"/>
                <property name="transactionManager" ref="transactionManager"/>
                </bean>
                <bean id="myTestService" class="org.springframework.remoting.rmi.JndiRmiSer viceExporter">
                <property name="service" ref="simpleSayHello"/>
                <property name="serviceInterface" value="simple.SayHello1"/>
                <property name="jndiName" value="HelloService"/>
                </bean>
                <bean id="simpleSayHello" class="simple.SimpleSayHello"/>
                </beans>

                Note that I had to remove
                <property name="editMBeanServerConnection" ref="editMBeanServerConnection"/>
                <property name="runtimeMBeanServerConnection" ref="runtimeMBeanServerConnection"/>

                Comment

                Working...
                X