Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Programming with JCo (SAP)

Reply
Thread Tools

Programming with JCo (SAP)

 
 
Armin Gajda
Guest
Posts: n/a
 
      08-25-2006
Hi,

I hope there is someone out there with programming experiences in SAP
over Jco.

Unfortunately I have no SAP System here to test my code with.
In the documentation is written:

------
JCO.Repository mRepository;

mRepository = new JCO.Repository("ARAsoft", mConnection);

We invoke the constructor for JCO.Repository with two parameters; the
first one is an arbitrary name, the second one either a connection pool
name or a JCO.Client object. In other words: Both connection pooling and
direct connections are supported. In (web) server applications, we
should always use a connection pool for the repository. The userid used
for the repository has to have sufficient authorizations in SAP for the
metadata access to be possible. Please read the Javadoc for class
JCO.Repository to find out which specific authorizations are required.
You can use one special userid for the repository access and one or more
"normal" userids for the actual application.
------

I have the following code I was able to test on a foreign system:


public JCO.Function getFunction(String repositoryName, String
functionName,
JCO.Client connection) {

IRepository repository =
JCO.createRepository (repositoryName, connection);

IFunctionTemplate ft = repository.getFunctionTemplate (functionName);

return ft.getFunction ();
}

To create the Repository I pass an object of type JCO.Client. I have got
this object from a pool before.

When I understand the documentation corretly I can also pass the pool to
create a Repository. Then there wouldn't be no need to handle with
JCO.Client objects.
But I can not test this and thus I want ask if someone can confirm that
this works.

And another question: Since I don't need any Client objects then, I can
not release them to the pool. Is that ok and happens implicitely, or do
I have to do something else?

--
bye Armin


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C (functional programming) VS C++ (object oriented programming) Joe Mayo C Programming 168 10-22-2007 01:00 AM
Can Your Programming Language Do This? Joel on functional programming and briefly on anonymous functions! Casey Hawthorne Python 4 08-04-2006 05:23 AM
Wireless PEAP/MSCHAPV2 client programming question Jim Howard Wireless Networking 6 07-02-2005 11:53 AM
[OFERTA PRACY] + JAVA JSP JSTL TOMCAT STRUTS DHTML JAVASCRIPT JCO ABAP + Praca zdalna ConligoSoft GmbH Javascript 1 04-21-2005 08:14 PM
systems programming versus application programming Matt Java 35 07-22-2004 08:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57