Java 是什么在Weblogic中将方法定义为幂等的?
我们使用Apache调用weblogic服务(一种SOAP Web服务)。我们正在使用ApacheWebLogicHTTP插件。如果达到最长时间,则不会重试呼叫Java 是什么在Weblogic中将方法定义为幂等的?,java,apache,weblogic,weblogic12c,Java,Apache,Weblogic,Weblogic12c,我们使用Apache调用weblogic服务(一种SOAP Web服务)。我们正在使用ApacheWebLogicHTTP插件。如果达到最长时间,则不会重试呼叫 使用SOAP-UI通过Apache调用服务 在我的webservice方法中,我模拟了1300ms的睡眠 我的httpd.conf文件中的WLIOTimeoutSecs设置设置为10秒 SOAP-UI向我返回以下错误 Failure of server APACHE bridge:</H2><P><hr&g
Failure of server APACHE bridge:</H2><P><hr>No backend server available for connection: timed out after 5 seconds or idempotent set to OFF or method not idempotent.
服务器APACHE网桥故障:没有可用于连接的后端服务器:5秒后超时,或幂等元设置为OFF或方法非幂等元。 我不确定这5秒是否是默认消息,因为我可以清楚地看到SOAPUI在10003ms内响应。所以它显然使用了我指定的10秒超时 问题是如何告诉插件哪些服务方法是独立的?Indemponent设置为ON。重试次数计算为5次(ConnectTimeoutSecs/ConnectRetrySecs又名5/1=重试5次) 我的完整Weblogic Apache插件配置:
Listen *:7001
NameVirtualHost *:7001
<VirtualHost *:7001>
KeepAlive ON
LogLevel debug
DocumentRoot "/var/www/html"
#Enables pooling of connections - Will keep connection open between PlugIn and weblogic server for 60 seconds
KeepAliveEnabled ON
#Default=20
KeepAliveSecs 60
#Default=ON - When IO timeout occurs and this is set to on it will connect to another server in the dynamic list
#Needs this setting before a failover will occur and the list to be updated.
Idempotent ON
#Default=10 - Will wait 5 seconds before a BAD server is retried again
MaxSkipTime 30
#Default=10 - Maximum time taken to obtain a response to a client request
ConnectTimeoutSecs 5
#Default=2 - Wait 1 second before attempting to connect (Sleep time)
ConnectRetrySecs 1
#MaxRetry-ies = Interval in seconds that the plugin should sleep between attempts to connect to the WLS
#Based off ConnectTimeoutSecs/ConnectRetrySecs aka 5/1 = Retry 5 times
#Default=2 (Must be > 0) - Timeout after 2 seconds if we cannot establish a connection
WLSocketTimeoutSecs 2
#Default=300 - Time is takes for the weblogic server to respond before the connection fails over to another server
#Customize this based on logic aka will be overridden on URL level
WLIOTimeoutSecs 300
#Used to query based on the ?__WebLogicBridgeConfig parameter
DebugConfigInfo ON
#Will pass the header of the request to pass through the apache server
#Default=OFF
WLProxyPassThrough ON
#Tells the plugin which requests to retry should the connection be lost
#Default=ALL
WLRetryAfterDroppedConnection ALL
#This controls whether a 503 error is returned or a failover initialized
#Default=ON
WLServerInitiatedFailover ON
<IfModule mod_weblogic.c>
<Location /mySuperDuperUrl/>
Idempotent ON
WLIOTimeoutSecs 10
SetHandler weblogic-handler
WLSRequest On
WebLogicCluster server1:123,server2:124,server3:125
</Location>
</IfModule>
Listen*:7001
名称虚拟主机*:7001
继续
日志级调试
DocumentRoot“/var/www/html”
#启用连接池-将插件和weblogic服务器之间的连接保持打开状态60秒
继续
#默认值=20
KeepAliveSecs 60
#默认值=开-当IO超时发生且设置为开时,它将连接到动态列表中的另一台服务器
#在发生故障转移和更新列表之前,需要此设置。
上的幂等元
#默认值=10-将等待5秒,然后重试坏服务器
MaxSkipTime 30
#默认值=10-获取对客户端请求的响应所用的最长时间
连接TimeOutSecs 5
#默认值=2-尝试连接前等待1秒(睡眠时间)
ConnectRetrySecs 1
#MaxRetry ies=插件在尝试连接到WLS之间休眠的时间间隔(以秒为单位)
#基于ConnectTimeoutSecs/ConnectRetrySecs aka 5/1=重试5次
#默认值=2(必须大于0)-如果无法建立连接,则2秒后超时
WLSocketTimeoutSecs 2
#默认值=300-weblogic服务器在连接故障转移到另一台服务器之前响应所需的时间
#基于将在URL级别上覆盖的逻辑自定义此
WLIOTimeoutSecs 300
#用于基于?\uuu WebLogicBridgeConfig参数进行查询
调试配置信息
#将传递请求的标头以通过apache服务器
#默认值=关闭
WLProxyPassThrough ON
#告诉插件如果连接丢失,哪些请求要重试
#默认值=全部
WLRetryAfterDroppedConnectionAll
#这控制是返回503错误还是初始化故障转移
#默认值=开
上的WLServerInitiatedFailover
上的幂等元
WLIOTimeoutSecs 10
SetHandler Web逻辑处理程序
关于
WebLogicCluster服务器1:123、服务器2:124、服务器3:125
为什么不将ConnectTimeoutSecs增加到5秒以上,并确保后端集群中的所有服务器都响应呢。幂等式不适用于服务,适用于服务器,如果将其设置为“关闭”,则来自服务器的失败请求不会转移到其他成员。我们对插件存在问题,它似乎无法连接到后端服务器。我们的监控应用程序显示,apache上的请求大约需要50秒,而服务器在400毫秒内做出响应。现在我不知道如何调试它,看看额外的时间是从哪里来的。因此,如果要建立到后端服务器的连接,则会出现问题。如果无法获得连接或服务器处于紧张状态,我希望改为尝试其他服务器。为什么不将ConnectTimeoutSecs增加到5秒以上,并确保后端群集中的所有服务器都响应呢。幂等式不适用于服务,适用于服务器,如果将其设置为“关闭”,则来自服务器的失败请求不会转移到其他成员。我们对插件存在问题,它似乎无法连接到后端服务器。我们的监控应用程序显示,apache上的请求大约需要50秒,而服务器在400毫秒内做出响应。现在我不知道如何调试它,看看额外的时间是从哪里来的。因此,如果要建立到后端服务器的连接,则会出现问题。如果无法获得连接或服务器处于紧张状态,我希望改为尝试其他服务器。