Results 1 to 8 of 8

Thread: Weblogic cluster URL not working

  1. #1
    Join Date
    Jul 2005
    Location
    NYC
    Posts
    26

    Default 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. #2
    Join Date
    Jul 2005
    Location
    NYC
    Posts
    26

    Default

    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


  3. #3
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    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

  4. #4
    Join Date
    Jul 2005
    Location
    NYC
    Posts
    26

    Default

    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

  5. #5
    Join Date
    Aug 2005
    Posts
    9

    Default 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?

  6. #6
    Join Date
    Sep 2004
    Location
    Toronto, ON, Canada
    Posts
    18

    Default

    Quote 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

  7. #7
    Join Date
    Aug 2004
    Posts
    2,715

    Default

    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

  8. #8
    Join Date
    Jan 2011
    Posts
    1

    Default 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"/>

Similar Threads

  1. quartz in cluster with same instanceId
    By acavalli in forum JMS
    Replies: 4
    Last Post: Mar 17th, 2009, 10:44 AM
  2. Replies: 1
    Last Post: Jan 20th, 2009, 11:50 AM
  3. Replies: 1
    Last Post: Sep 17th, 2005, 02:19 AM
  4. Replies: 2
    Last Post: May 26th, 2005, 02:30 AM
  5. broadcast application events across a cluster?
    By ctassoni in forum Architecture
    Replies: 3
    Last Post: Feb 22nd, 2005, 05:42 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •