2011-03-29 86 views
1

我在調用另一臺服務器上的遠程EJB時遇到了問題。當Spring在啓動時查找EJB home時,似乎會使用JNDI環境變量。但是,當EJB方法被調用時,這些環境變量似乎沒有被使用,因此我的程序一直在調用EJB的本地服務器。Spring EJB3 JNDI環境變量問題

我使用Spring 2.5.6中,WebLogic 10.3.0和EJB3.0

我EJB Spring配置是如下:

<jee:remote-slsb id="myService" 
    jndi-name="myService#com.test.MyService" 
    business-interface="com.test.MyService"> 
    <jee:environment> 
    java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory 
    java.naming.provider.url=t3://remoteserver:7001 
    java.naming.security.principal=username 
    java.naming.security.credentials=password 
    </jee:environment> 
</jee:remote-slsb> 

有沒有人遇到過這個問題嗎?

我試圖在WebLogic 10.3.3上運行我的代碼,它工作正常。我猜Spring 2.5.6和WebLogic 10.3.0可能存在一些問題。

回答