質問

In Weblogic 12.1.2 I can use the property RMI_TIMEOUT ("weblogic.jndi.responseReadTimeout") or RESPONSE_READ_TIMEOUT ("weblogic.jndi.responseReadTimeout") to set the timeout in my RMI connections. But in weblogic 12.1.1 they do not work (since they don`t exist).

see the api: http://docs.oracle.com/middleware/1212/wls/WLAPI/weblogic/jndi/WLContext.html

The strange thing is that RMI_TIMEOUT is deprecated in 12.1.2, but it does NOT exists IN WEBLOGIC 12.1.1, see:http://docs.oracle.com/cd/E13222_01/wls/docs100/javadocs/weblogic/jndi/WLContext.html

nevertheless, i tried both (and other properties) and none of them worked in weblogic 12.1.1 (they only worked in 12.1.2).

I can`t migrate to weblogic 12.1.2 because it needs java 7, and i cant change it right now.

Any help would be appreciated, thanks in advance.

Observation: I need to set the RMI timeout because i access an external service that sometimes does not respond, so i need my application to be independent from this other service and let it more robust.

役に立ちましたか?

解決

I found the solution.

We had to apply an weblogic patch (from weblogic 12.1.1 to weblogic 12.1.1.0.5).

In 12.1.1.0.5, i could access the RMI_TIMEOUT property. Thats why it was deprecated in 12.1.2, even if it does not exists in 12.1.1 raw version. It becomes available after the patch is applied.

# EDITED

If i use the weblogic proprietary API, the rmi timeout works in any version:

Environment env = new Environment();
env.setProviderUrl("");
env.setInitialContextFactory("weblogic.jndi.WLInitialContextFactory");
env.setRMIClientTimeout(30000L);

Context context = env.getInitialContext();

Hope it helps someone. Tiago

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top