on 03-26-2007 8:26 AM
Hello Forum,
I have a question regarding JCO.Client usage.
I created a class used for managing JCO.Client creation, repository creation and closing
the open resources after usage. The class was developed to encapsulate recurring logic
of client creation and especially our logging related to it.
The class contains a method
public JCO.Client openConnection(...) {...}
The JCO.Client returned is used for creating a repository, creating a function template
and so on. It works but I'm a bit confused about usage of the methods
isAlive() and isValid()
When implementing the method openConnection I placed an assertion directly after
calling the JCO.createClient method
JCO.Client jcoClient = JCO.createClient(...);
assert jcoClient.isAlive();
Although I'm able to use the JCO.Client object returned by my method this assertion
fails - I also tried the isValid() method as assertion which fails also...
Any help would be greatly appreciated.
Best regards,
Henning Malzahn
I am using the method:
JCO.Client client = JCO.getClient( poolName);
My understainding about the JCO.createClient() and JCO.getClient() is the latter one gets a client connection from the SAP end; while the first one only creates an instance of JCO.Client which is not conected to the SAP yet.
Dennis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Dennis,
thank you for the hint. I interpreted the API doc erroneously.
The API says "Creates an instance of a client connection to a remote SAP system"
for the createClient(...) method and I thought that's a JCO.Client with an already openend
connection...
I just need the client to execute a function template. The basic tests I realized so far
are creating the (as I now know) client reference and a JCO.Repository which I use
to retreive the FunctionTemplate. Afterwards I use the JCO.Client reference to execute
the FunctionTemplate.
Although everything works as expected - Is my assumption correct that I don't need
to open a connection using the method you mentioned above if I just want to execute
the FunctionTemplate, or do I'm missing something there?
Best regards,
Henning
Hi Henning,
I'm not sure how much it will help you, just wanted to give you the link to the SAP JCo (and actually all public NetWeaver) javadocs:
https://www.sdn.sap.com/irj/sdn/javadocs
Just my 2 cents...
Cheers,
Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.