We have upgrade the ITADate example to be used with
servENT v0.2.10.
We have a simple interface,
public interface IDateInterface {
public Date getITADate();
}
a very simple Implementation,
public class DateServiceImpl implements IDateInterface,
Adapter
and a client that uses the background search with the
new ClientHelper
ClientHelper ch = new ClientHelper(new URL("http://" +
machine + ":2728"));
ch.getProxy(IDateInterface.class, new String[] {
"itadate0_2_10" }, 10000, 13, this);
The deployment props is this,
applicationName=itadate0_2_10
adapter=org.dbe.demos.ita.date.DateServiceImpl
smid=itadate0_2_10
and the service is deployed successfully in the servENT.
When we run the client, there is two problems:
- Sometimes the service is not found
("org.dbe.servent.NoSuchServiceException: The service
proxy is not available"), see traces for Test1
- With no changes, we run the client again and it works
but notice in the gotProxy method, the proxy is null
Here you have log traces for all, in case you need you
can download source code from CVS
(http://dbe.ita.es/viewcvs/dbe/dev/itademos/exe_0_2_10/date/)
Thanks in advance,
ITA
==========================================================================
TRACE FOR TEST1
==========================================================================
Fri Sep 22 09:07:16 CEST 2006 TRACEALL
org.dbe.demos.ita.date.ITADateClient.main line 100 ->
------------------------------------------------
Fri Sep 22 09:07:17 CEST 2006 TRACEALL
org.dbe.demos.ita.date.ITADateClient.main line 102 ->
Testing localhost
I am backgroundsearch.run, finding proxy
ClientHelper.getProxy(...) calling getServiceInfo
Fri Sep 22 09:07:17 CEST 2006 TRACE
org.dbe.demos.ita.date.ITADateClient.test line 60 ->
Waiting...
The url is
http://193.144.228.107:2728/CLIENT/justFind?timeout=10000&hops=13&entries=itadate0_2_10|
Opening connection for justfind
log4j:WARN No appenders could be found for logger
(org.sun.dbe.ClientHelper).
log4j:WARN Please initialize the log4j system properly.
Connecting for justfind
Connected for justfind, getting is
is obtained, reading response
The content-length is 19
Response read, reading searchId
The wakeup time is 1158908847098
The content length returned from finished command is 5
Stream obtained, boolean read is false
Remaining time is 9984
End of sleep, checking if we must sleep again
The content length returned from finished command is 5
Stream obtained, boolean read is false
Remaining time is 9906
End of sleep, checking if we must sleep again
The content length returned from finished command is 4
Stream obtained, boolean read is true
Finished, get out
End of sleep, checking if we must sleep again
Out of the wait for getServiceInfo, calling retrieve
The url for retrieving is
http://193.144.228.107:2728/CLIENT/retrieve?searchId=0.16913745941881653
Connection opened
Connected
org.dbe.servent.NoSuchServiceException: The service
proxy is not available
at
org.sun.dbe.ClientHelper.retrieveObject(ClientHelper.java:521)
at
org.sun.dbe.ClientHelper.getServiceInfo(ClientHelper.java:458)
at
org.sun.dbe.ClientHelper.getProxy(ClientHelper.java:359)
at
org.sun.dbe.ClientHelper$BackgroundSearch.run(ClientHelper.java:75)
at java.lang.Thread.run(Unknown Source)
Content length is 0
No such service, throwing exception
backgroundsearch.run oooops, exception
org.dbe.servent.NoSuchServiceException: The service
proxy is not available: The service proxy is not
available setting proxy to null
Calling listener.gotProxy
Fri Sep 22 09:07:17 CEST 2006 TRACE
org.dbe.demos.ita.date.ITADateClient.gotProxy line 80
-> gotProxy! proxy -> null
Fri Sep 22 09:07:17 CEST 2006 WARNING
org.dbe.demos.ita.date.ITADateClient.gotProxy line 83
-> proxy is null
Fri Sep 22 09:07:17 CEST 2006 TRACE
org.dbe.demos.ita.date.ITADateClient.test line 66 ->
Stop Waiting!
Fri Sep 22 09:07:17 CEST 2006 TRACE
org.dbe.demos.ita.date.ITADateClient.test line 68 ->
the service does not exist
Fri Sep 22 09:07:17 CEST 2006 TRACEALL
org.dbe.demos.ita.date.ITADateClient.main line 104 ->
------------------------------------------------
==========================================================================
TRACE FOR TEST2
==========================================================================
Fri Sep 22 09:07:47 CEST 2006 TRACEALL
org.dbe.demos.ita.date.ITADateClient.main line 100 ->
------------------------------------------------
Fri Sep 22 09:07:47 CEST 2006 TRACEALL
org.dbe.demos.ita.date.ITADateClient.main line 102 ->
Testing localhost
I am backgroundsearch.run, finding proxy
ClientHelper.getProxy(...) calling getServiceInfo
Fri Sep 22 09:07:47 CEST 2006 TRACE
org.dbe.demos.ita.date.ITADateClient.test line 60 ->
Waiting...
log4j:WARN No appenders could be found for logger
(org.sun.dbe.ClientHelper).
log4j:WARN Please initialize the log4j system properly.
The url is
http://193.144.228.107:2728/CLIENT/justFind?timeout=10000&hops=13&entries=itadate0_2_10|
Opening connection for justfind
Connecting for justfind
Connected for justfind, getting is
is obtained, reading response
The content-length is 19
Response read, reading searchId
The wakeup time is 1158908877411
The content length returned from finished command is 5
Stream obtained, boolean read is false
Remaining time is 10000
End of sleep, checking if we must sleep again
The content length returned from finished command is 5
Stream obtained, boolean read is false
Remaining time is 9985
End of sleep, checking if we must sleep again
The content length returned from finished command is 4
Stream obtained, boolean read is true
Finished, get out
End of sleep, checking if we must sleep again
Out of the wait for getServiceInfo, calling retrieve
The url for retrieving is
http://193.144.228.107:2728/CLIENT/retrieve?searchId=0.16778817099797294
Connection opened
Connected
Content length is 476
Content length is not 0, reading service proxy
IS created
OIS created, reading proxy
Proxy read, it is
org.dbe.toolkit.proxyframework.ServiceProxy
Returning proxy
getServiceInfo called
getProxy, the proxy is no tnull after calling
getServiceInfo?
Creating client map
Creating workspace
Workspace created, it is
org.dbe.toolkit.proxyframework.Workspace@109a4c
serviceInterface is interface
org.dbe.demos.ita.date.IDateInterface
Creating an invoker with the workspace
Creating a dynamic proxy
backgroundsearch.run after getProxy, proxy is null? false
Calling listener.gotProxy
Fri Sep 22 09:07:47 CEST 2006 TRACE
org.dbe.demos.ita.date.ITADateClient.gotProxy line 80
-> gotProxy! proxy -> null
Fri Sep 22 09:07:47 CEST 2006 TRACE
org.dbe.demos.ita.date.ITADateClient.test line 66 ->
Stop Waiting!
Fri Sep 22 09:07:47 CEST 2006 TRACE
org.dbe.demos.ita.date.ITADateClient.test line 71 ->
ITADate es -> Fri Sep 22 09:07:47 CEST 2006
Fri Sep 22 09:07:47 CEST 2006 TRACEALL
org.dbe.demos.ita.date.ITADateClient.main line 104 ->
------------------------------------------------