Hello Thierry,
sorry for not being precise. This is the configuration I use:
- Restlet 2.1 snapshot JSE
- Application server A: server using Jetty, client using Apache HttpClient
- Application server B: server using Jetty
- both servers on Java 1.6.SR8.FP1 on AIX 5.3
After restarting all servers the following code hangs when it's called for a
remote host (server B) and nothing else has already established a connection
between A and B. Uncommenting client.head will establish the connection and
is used as a workaround for the moment.
Guido Schmidt.
private def perLocation(location: String, filesperlocation: Json.JArray)
= {
val uri = getRequest.getResourceRef.toString
val b = uri.indexOf("/plm")
val e = uri.indexOf("vaults/") + "vaults/".length
val f = uri.indexOf("/derivedformats")
val filesuri = uri.substring(b, e) + location + uri.substring(f)
val client = if (thisdivision == parameters("division") &&
thislocation == location) {
new ClientResource("riap://host" + filesuri)
} else {
val (remotehost, _) = config.getOrElse((parameters("division"),
location, "local"), (null, null))
new ClientResource(remotehost + filesuri)
}
val input = new StringRepresentation(Json.build(filesperlocation),
MediaType.APPLICATION_JSON, Language.ALL, CharacterSet.UTF_8)
client.setRetryAttempts(3)
// client.head
client.post(input)
}
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/If-POST-is-first-method-connection-is-not-established-tp5921068p5931153.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2698497