It's all about the answers!

Ask a question

How to access Client API from within j2ee web application


Stefan Hoffmann (14421820) | asked Sep 19 '13, 9:03 a.m.
Hi,

We're thinking about building a "classical" j2ee web application. One of the (minor) aspects of this application is to do updates to a rtc repository/workspace (with the credentials of the web application user). So we thinking about using the java api vs. scm. Java api is more powerful than scm (and much, much faster), but complexer. The scm always need a sandbox, which is even more complexer for a web application (which normally never should touch the file system).

- So if we use the java api, how can we integrate it into a multiuser webapplication?
- Can we hold multiple rtc logins to the rtc server (some sort of one ITeamRepository object per web user session) in the jvm?
- Is the Java API threadsafe?
- Do we have to switch to an osgi environment or is the plain api sufficient?
- Any other suggestion for a good architecture for this use case?

Thanks in advance,  Stefan

2 answers



permanent link
Kevin Ramer (4.5k9186201) | answered Sep 19 '13, 12:59 p.m.
I've been using plain java api for some time in an Jazz access request application.  Using Rational Application Developer, I have placed the required libraries under the eclipse project location:

WebAppName/WebContent/WEB-INF/lib

Exporting the war and dropping under tomcat webapps directory (for example) will unpack the war file and things work.  There may be a bit more than that, but that's where I sit now.   This particular web application can potentially connect to one of many Jazz repositories, but the login is using the same ID/password for that across the board. 

I do occasionaly see issues with threads, but its more likely my fault than the Plain Java API.



permanent link
Vijayakumar B (22610) | answered Jun 15 '15, 12:57 a.m.
Hello Ramer, i am currently working on same requirements that Stefan Hoffmann have.
when we first created as standalone app, our RTC java api was working fine, but when used along with our web application we ended with series of issues.  Last one was related to Lenient certification error.
LenientCertificationHandler was not found was the exact error. but i got no reference for that anywhere.

1) Did you encountered such issues? 
2) How did you handled the certification when java api is used in web application?
i am having the scenario like, multiple users will be using the my app, and how should we handle certification for each users.

Do anyone what is the best way to call scm related api via web application? 

Comments
Kevin Ramer commented Jun 15 '15, 7:40 a.m.

I did have to solve the use of our IBM Internal Certificate Authority which was used to obtain the server certificates.   The application would get SSL Handshake failure as the connected to Jazz application has certificates that were untrusted.  To solve I used InstallCerts  to load certificates of all the Jazz applications my web app would be connecting to.  

I used the created certificate file to put onto the lib/security/cacerts file in the Java runtime for Tomcat ( and later WebSphere )

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.