JCA and therads

It is a well known fact that the J2EE spec (Servlets, JSP and EJB) donot allow user threads to be created. Now we have a situation where we need to call a third party API (TIBCO API) to interact with the workflow. We have analyzed that the TIBCO API internally uses threads. This would make the invocation of this API unsafe from Servlets or EJBs.
Will JCA help to avoid this problem?

Hi nareshnm,
Yes, this code might be a good candidate for TIBCO to
package as a resource adapter. In that case, it's easier to assign priveleges to the TIBCO code that allow it to act more like system code than application code. In the absence of packaging it as a resource adapter, you could put it in your application server's classpath rather than in your application(.ear) itself. That will allow you to assign the correct security permissions for the code, much like jdbc-drivers. This assumes the TIBCO code is coded with the correct doPriveleged blocks around any operations that require java security checks, so that it's possible for some of your application code to be on the stack at that time.
Hope this helps.
Regards,
Ken

Similar Messages

  • Generating the .CAP, .JCA and .EXP files.

    Hello;
    I have downloaded the java_card_kit-2_1_2 to ‘C:\java_card_kit-2_2_1", and I tried to compile HelloWorld application that shipped with its distribution. I was successfully able to compile the file HelloWorld.java, but I am having lots of problems in generating the .CAP, .JCA and .EXP files.
    I tried to follow the instructions in jcdk2.2.1 user guide, but of no use.
    This is what I am basically doing:
    _Step1) Setting my Environment Variables as follows:_
    *set JC_HOME=C:\java_card_kit-2_2_1*
    *set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_16*
    *set PATH=.;%JC_HOME%\bin;%JAVA_HOME%\bin;%PATH%*
    _Step2) Compile the java file_
    The package of HelloWorld.java is : src.com.sun.javacard.samples.HelloWorld, so to compile I use the following command line:
    *javac -g -target 1.1 -source 1.3 -classpath .\classes;..\lib\api.jar;..\lib\installer.jar src\com\sun\javacard\samples\HelloWorld\*.java*
    _Step3) Converting_
    I have the class file generated in the package folder: src.com.sun.javacard.samples.HelloWorld, I generated an .opt file as follows:
    +-out EXP JCA CAP+
    +-exportpath .+
    +-debug+
    +-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1 src.com.sun.javacard.samples.HelloWorld.HelloWorld+
    +src.com.sun.javacard.samples.HelloWorld 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0+
    Finally, the command line for conversion is:
    *set _CLASSES=%JC_HOME%\lib\apduio.jar;%JC_HOME%\lib\apdutool.jar;%JC_HOME%\lib\jcwde.jar;%JC_HOME%\lib\converter.jar;%JC_HOME%\lib\scriptgen.jar;%JC_HOME%\lib\offcardverifier.jar;%JC_HOME%\lib\api.jar;%JC_HOME%\lib\installer.jar;%JC_HOME%\lib\capdump.jar;%JC_HOME%\samples\classes;%CLASSPATH%;*
    *"%JAVA_HOME%\bin\java" -classpath %_CLASSES% com.sun.javacard.converter.Converter -config src\com\sun\javacard\samples\HelloWorld\HelloWorld.opt*
    After successfully executing all these lines, I get the following error:
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    *+error: class HelloWorld does not belong to package src.com.sun.javacard.samples.HelloWorld.+*
    conversion completed with 1 errors and 0 warnings.
    PLEASE HELP! I also tried adding -classdir to the opt file, but still did not work.
    The whole point behind this exercise is to import a javacard framework of version 1.0
    Really appreciate anyone's help! Thanks in advance.

    Thank you Shane, but my claSs file is indeed saved in "C:\java_card_kit-2_2_1\samples\src\com\sun\javacard\samples\HelloWorld"
    Now since I am running my command lines from C:\java_card_kit-2_2_1\samples, so I guess that the class directory is:
    src.com.sun.javacard.samples.HelloWorld
    Right?

  • Difference between JCA and Jco.

    Hi Guys,
    I am a little confused between JCA and JCo, I am currently working with SAP Portal 6.0 according to its specifications JCo is a depricated and suggests the usage of JCA. On the other hand when I was reading about connecting to an SAP system using java, it suggests the usage of JCo. My knowledge with regard to JCo is limited, so I was wondering if anyone could throw some light here as to what is the difference in using either of them or rather which is the prefered way about going about it.
    Thanks in advance..
    Rajitha

    I think lancea is definitely on the right track.
    Jco is typically described as the way to use SAP from Java code and to use Java code from SAP. It is a specific API for allowing SAP and external Java code to call each other.
    JCA (J2EE Connector Architecture) is a general-purpose archiecture and API for allowing external systems and J2EE apps running in an app server to work together. To get a J2EE app working with SAP would require the use of an SAP connector, written to the JCA specs. More than likely, such a connector would itself use Jco. But the J2EE application code would use the connector, not the Jco code directly.
    I hope that helps.
    - Tim (Sun Microsystems)

  • Connect to SAP R/3 using JCA and SLD

    I have read a number of articles and code samples regarding back-end connections, but none of them provided the answer which is suitable for my situation.
    I want to build a portal application which calls a simple BAPI in a SAP R/3 system.
    The only requirements are that the application has to be set up according to the MVC pattern and the model will be exposed as a webservice.
    I am using web dynpro to create the views and tie the view, the controller and the model together. The model should connect to a SAP R/3 system accessing it via single sign on.
    I want the connection properties to be easily ajustable to make the application portable to another landscape, therefore I chose JCA to set up the connection.
    FYI: The SAP back-end systems are defined in the portal system landscape and also in the system landscape directory on the XI server.
    Does anyone know a good code sample/tutorial/how-to for setting up a flexible, easy manageable connection to a SAP back-end system?

    thanks, I can get the data from SAP R/3 to crystal report.
    but still dont know how to do the second question mentioned in previous message:
    once the table I want to get the data from is a cluster, and have found the mapping data dictionary of this data cluster, which displayed in crystal report connection as well, however, the data is not what I wanted.

  • JCA and global transactions

    First of all, I do apologize but I can't find a JCA topic, so I'm positng my question here
    In my application I want to use XA transaction across the resource adapter. I read an article on the Sun forum (Connector-interest archives section) about an association between XAResource and ManagedConnection instances. Anyway, let's say for Oracle JDBC driver you already have OracleXAConnection which will give you a variable of XAResource, the similar approach is used in the JMS (XAQueueConnection, XATopicConnection). My question is what is the strategy is used for the generic resource adapter (not nessessarily JDBC-specific) to implement XAConnection in other words from my client code I want to be able to do something like this:
    ConnectionFactory ccf = (ConnectionFactory)ctx.lookup("eis/mysampleRA");
    XAConnection xaconn = ccf.getXAConnection();
    XAResource xaRes = xaconn.getXAResource();
    Connection conn = xaconn.getConnection();

    Hi,
    You would have to go through an instance of ManagedConnection.
    These instances are internal in the pooling of the appserver, but you can get
    a new instance from the adapter by calling createManagedConnection.
    Best,
    Guy
    http://www.atomikos.com -- Insure your data with TransactionsJTA

  • Jca  and  jni

    I hope some one can answer this question , as there is no much to read about JCA
    my J2EE application needs to inetgerate with some C libraries, after some investigations , I found that calling native APIs direct from the EJBs might crash the EJB container when the JNI fails, as a better solution the JCA can be used as an intermediate layer, regarding the JCA-JNI communication I have 2 questions:
    1- Is this setup EJB->JCA->JNI->C failsafe against the failure in the JNI->C part?
    2- can the JNI wrapper be hosted on a remote server other than the application server or will I need to install the application server on the same machine as the C libraries

    1) If you mean, does the app server continue running if your native code coredumps, the answer is no - This is the tradeoff you pay for speed.
    2) Yes, but you're no longer going JCA->JNI. Rather, you're going JCA->X->JNI where X is some remotable protocol.
    JCA is no magic layer - It's just a Java API between application servers and whatever library you intend to expose to your app server clients.
    God bless
    -Toby Reyelts

  • JCA and the common client interface

    Hi.
    (I may have posted this question in the wrong forum but, this seems to be the most active and more likely to atract the opinion of a few experienced developers)
    I wanted to ask the opinion of some of the more experienced developers... preferably those who have had experience integrating heterogeneous EIS/data sources into a common portal.
    This concerns Sun's JCA specification (available at: http://java.sun.com/j2ee/connector/index.jsp), particularly the CCI (common client interface) - chapter 15 - which defines a set of interfaces which EIS providers should support.
    Has anyone made any effort to upcast SAP interfaces to these 'standardised' interfaces?
    If so... are there any limitations/additional complication which other developers need to consider if they wish to employ this practice?
    If Not... Does this not defeat the objective of the JCA?

    Asalman,
    I'm quite happy the JDeveloper behaves the way it does. Why? Because in most of my scenarios I don't want to be driven in a particular direction of development. This my choice of development and I don't like tools that dictate this to me.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Jca and jms

    hi,
    i ned to impliment a jca (java connector architecture) in jms,
    help me.
    thanks

    Hi,
    You're going to need to be a bit more specific in your question.
    Why do you need to write one? Most JMS providers come with JCA adapters, and Sun have two open source JCA adapters which will work with a variety of JMS providers. Take a look at
    [genericjmsra.dev.java.net|http://genericjmsra.dev.java.net]
    [jmsjca.dev.java.net|http://jmsjca.dev.java.net]
    Nigel

  • JCA and complex protocols

    Hello,
    I'm investigating the possibility of realizing complex protocols with JCA. The resource adapter in question should handle the protocol window mechanism and buffer messages in case the window is momentarily full. I hope someone can give ideas where/how to solve the buffering and window in a decent way using the supported mechanisms of JCA 1.5.
    Kind regards,
    Tom

    Sorry, no code here. But I was curious about your question and how 'real' this capablity was for accessing legacy applications running on the mainframe. I googled on:
    jca mainframe example
    and found lots of hits (of course) and many good articles. One of the most complete articles with example code was here:
    http://www-106.ibm.com/developerworks/java/library/j-jca/

  • JCA and packaging

    I successfully deployed a JCA-compliant resource adapter but ran into trouble when trying to use it from an EJB app. It was throwing a ClassCastException when getting the connection factory class from JNDI, although the object coming from JNDI and the variable I was trying to assign it to appeared to have compatible types. The problem was that the EAR and the RAR were deployed separately, so the class of the factory bound to JNDI was loaded by a different class loader than the class in my application. Same class name (and bytecode) but different classloader means different class.
              I am looking at the various ways to work around this problem:
              1. I'm guessing that since the JNDI lookup for the factory is done within the app server (it's an explicit lookup, I'm not declaring the resource location in the session bean descriptor), it's optimized such that the object is not sent over through serialization. If I could force serialization (pass by value) somehow, this wouldn't be an issue. Is there a way to do it?
              2. Put the classes that are visible to the application (the factory, the connection and who knows what else) in the server's lib folder. I'm not too psyched about this option.
              3. Package the RAR inside the EAR (and put the shared classes in APP-INF/classes or jar them up in APP-INF/lib. This isn't optimal either, I don't like the fact that I'd have to deploy the RAR with every application.
              I'd like to know whether there are any other options and which one would be the recommended one. Am I understanding the problem correctly?
              Thanks,
              Alex

    I discovered an element in the weblogic-ra.xsd that I had previously overlooked. It's <enable-global-access-to-classes> and setting it to true seemed to solve my problem. I am surprised I wasn't able to find this piece of information by searching BEA's site and the net. There is virtually no information about this element aaside from one sentence in the resource adapter manual.

  • JCA and connection with mainframe

    hi all,
    we were trying to do a simple proof of concept of connecting java and mainframes through JCA.We searched for examples and couldn't find out any.If there is anyone who has done a simple application connecting java and mainframes could send me the code it would be of much help.my mail id is [email protected]
    thanks and regards,
    Manivannan

    Sorry, no code here. But I was curious about your question and how 'real' this capablity was for accessing legacy applications running on the mainframe. I googled on:
    jca mainframe example
    and found lots of hits (of course) and many good articles. One of the most complete articles with example code was here:
    http://www-106.ibm.com/developerworks/java/library/j-jca/

  • OSB and JCA and AQ adapter

    Hi,
    Database 10.2
    OSB 10.1.3.1
    I would like to automaticlly publish changes from databasae AQ to service in OSB.
    Is it possible to do it by creating JCA AQ adapter (deploy it t OSB as business/proxy process)
    that could listen/dequeue database AQ and invoke a business/proxy proces on OSB ?
    Or any other ideas how to force OSB to dequeue AQ itself ?
    Regards,
    Cezary

    Hi. I'm not quite sure if JCA Adapters are available in OSB 10.3.1. But in SOA Suite 11g they are. And the JCA Adapters provide you with functionality you need. You can choose between JMS Adapter and AQ Adapter. Both will poll for new messages on the configured queue and respond by pulling message from queue. You can define frequency of polling and more. So, yes, JCA Adapters are the right choice (you only need to check if they are available for your version).
    Confirmed by a colleague: In version 10.3.1 there is at least a working AQ Adapter. There seems to be a problem with the Jms Adapter in this version: it can not handle queue's with Text Message Type......
    Edited by: Baan, Jos on 19-feb-2010 9:41

  • Tranaction with KODO JCA and DAO

    Hi,Abe,
    I use KODO JCA with JBoss3.2.1.We encounter some problem with transaction.We use CMT(Container Management Transaction)provider by JBoss EJB container.
    the seniario is:
    public class SessBeanA iimplements SessionBean{
    public void method(){
    A a_new A();
    a.method1();
    B b_new B();
    b.method2();
    public class A{   _
    method1(){
    //use KODO jdo insert one record. _
    public class B{
    method2(){
    //use DAO query the record insert.
    method() inSessBeanA is configued use CMT and start new tranction when called.
    We want to keep a.method1() and b.method2() in same transaction(method1() and method2() use transaction created by method()).but unfortunately,as they use different DB connection instance(one is from KODO JDO JCA,the other is from direct JDBC),they didn't keep in same transaction.so b.method2() can't find the record insert by a.method1() because method1() hasn't commit.
    you know,as for complexity,we can't use only KODO for insert/query,we had to use other technology like DAO.Would you pls tell us how to keep KODO JDO call and our DAO call in same transaction?
    Regards,
    geduo

    Consider getting a database connection from Kodo using JDBCStoreManager,
    i.e.
    KodoPersistenceManager.getStoreManager().getConnection() or
    KodoPersistenceManager.getConnection() I think.
    Then you'll get the same connection Kodo is using and hence the same
    transaction associated with it.
    Alex.
    geduo wrote:
    This is a multi-part message in MIME format.
    ------=_NextPart_000_001D_01C3CF8B.2D85C0D0
    Content-Type: text/plain;
         charset="gb2312"
    Content-Transfer-Encoding: quoted-printable
    Hi,Abe,
    I use KODO JCA with JBoss3.2.1.We encounter some problem with =
    transaction.We use CMT(Container Management Transaction)provider by =
    JBoss EJB container.
    the seniario is:
    public class SessBeanA iimplements SessionBean{
    public void method(){
    A a=3Dnew A();
    a.method1();
    B b=3Dnew B();
    b.method2();
    public class A{   =20
    method1(){
    //use KODO jdo insert one record. =20
    public class B{
    method2(){
    //use DAO query the record insert.
    method() inSessBeanA is configued use CMT and start new tranction when =
    called.
    We want to keep a.method1() and b.method2() in same =
    transaction(method1() and method2() use transaction created by =
    method()).but unfortunately,as they use different DB connection =
    instance(one is from KODO JDO JCA,the other is from direct JDBC),they =
    didn't keep in same transaction.so b.method2() can't find the record =
    insert by a.method1() because method1() hasn't commit.
    you know,as for complexity,we can't use only KODO for insert/query,we =
    had to use other technology like DAO.Would you pls tell us how to keep =
    KODO JDO call and our DAO call in same transaction?
    Regards,
    geduo
    ------=_NextPart_000_001D_01C3CF8B.2D85C0D0
    Content-Type: text/html;
         charset="gb2312"
    Content-Transfer-Encoding: quoted-printable
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
    <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
    <STYLE></STYLE>
    </HEAD>
    <BODY>
    <DIV>
    <DIV><FONT face=3DArial size=3D2>Hi,Abe,</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2>I use KODO JCA with JBoss3.2.1.We =
    encounter some=20
    problem with transaction.We use CMT(Container Management =
    Transaction)provider by=20
    JBoss EJB container.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>the seniario is:</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
    <DIV>
    <DIV><FONT face=3DArial size=3D2>public class SessBeanA iimplements=20
    SessionBean{</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>    public void=20
    method(){</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>        A =
    a=3Dnew=20
    A();</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>       =20
    a.method1();</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>        B =
    b=3Dnew=20
    B();</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>       =20
    b.method2();</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>    }</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>}</FONT></DIV></DIV>
    <DIV><FONT face=3DArial size=3D2>public class A{    =
    </FONT></DIV>
    <DIV>
    <DIV><FONT face=3DArial size=3D2>    =
    method1(){</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>        =
    //use KODO=20
    jdo insert one record.    </FONT></DIV></DIV>
    <DIV><FONT face=3DArial size=3D2>    }</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>}</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2>public class B{</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>    =
    method2(){</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>        =
    //use DAO=20
    query the record insert.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>    }</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>}</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2>method() inSessBeanA is configued =
    use CMT and=20
    start new tranction when called.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2>We want to keep a.method1() and =
    b.method2() in same=20
    transaction(<STRONG>method1() and method2() use transaction =
    created</STRONG>=20
    <STRONG>by method()).</STRONG>but unfortunately,as they use different DB =
    connection instance(one is from KODO JDO JCA,the other is from direct =
    JDBC),they=20
    didn't keep in same transaction.so b.method2() can't find the record =
    insert by=20
    a.method1() because method1() hasn't commit.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>you know,as for complexity,we can't use =
    only KODO=20
    for insert/query,we had to use other technology like DAO.Would you pls =
    tell us=20
    how to keep KODO JDO call and our DAO call in same =
    transaction?</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>geduo</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
    <DIV><FONT face=3DArial size=3D2></FONT> </DIV></DIV></BODY></HTML>
    ------=_NextPart_000_001D_01C3CF8B.2D85C0D0--

  • JCA and Sun Connector tool

    I am trying to find the sun connector tool to develop connectors and I do not seem to find it. Any hints?
    thanks a lot!

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Andrew Buckby ([email protected]):
    I have been trying to use the SUN Deploytool to create .ear file for auto-deployment within Orion.
    There are some small differences such as the JNDI naming method. But the big problem is during auto-deployment where I get the following error:
    Auto-unpacking Error in application hello-planet-sun: Error loading package at file:/D:/temp/j2ee/home/
    applications/Hello-planet-sun/ejb-jar-ic.jar, Illegal use-caller-identity value, legal values are True and False.
    Has anyone any ideas as to which XML file tag needs ammending to get an ear to auto-deploy? Or is there a better way in which to craete an ear file?
    thanks in advance<HR></BLOCKQUOTE>
    Andrew -
    In the past there have been problems with the Deploytool from Sun as relates to Orion. I don't know if those problems have been worked out, but none-the-less I gave up on that a year or so ago. I use ant to create my ear files in practice but am currently evaluating the JDeveloper beta and thus far am reasonably impressed with the ease of use. I would give that a try if you have the bandiwdth to download it. Investigate Ant for another alternative - though you have to create your own web.xml and ejb-jar.xml files (as well as the application*.xml files). Sometimes I use the sucky tools that come with Orion (OCJ4) to help out as far as creating the related XML files and to create the ear file. Depends on my level of tolerance that particular day.

  • JCA and EJB's

    Hi, can someone help me.
    The code below is will give me a valid ConnectionFactory
    But how do I configure the connection properties.
    ConnectionFactory cf  = (ConnectionFactory) ctx.lookup("java:comp/env/edward");
    I can get a connection in two ways.
    Connection conn = cf.getConnection();
    or by adding some implementation of ConnectionSpec.
    Connection conn = cf.getConnection(connectionSpecInstance);
    ConnectionSpec is a Interface. So is there a class that implements this interface?
    or
    How do I configure the WAS. In order to use the
    Connection conn = cf.getConnection();
    B.T.W.
    ResourceAdapterMetaData  a=  cf.getMetaData();
    a.getAdapterShortDescription();
    returns "SAP Connector for Portal Connectivity Framework"
    Can someone tell me what liberies I need to add?
    Thanx already

    Thanx Guru,
    But The connector.jar is already on my build classpath. This is needed in order to use the
    javax.resource.cci.ConnectionFactory class.
    So the question remains.

Maybe you are looking for

  • Oracle/SAAJ Implementation on iAS9.0.3.0.0 - Error

    Hi, Maybe someone has been working with this stuff. In that case, you might be able to help me. I'm getting the following error in a Servlet APP, where an incoming InputStream is being molded into a SOAP W/ Attachments construct via factory.createMes

  • Trouble with titles

    I'm trying to add a title over a picture in iMovie (Picture is already in timeline viewer, using KBE). When I type the title out, and click "Preview" it will show it to me just like I want it, but when I try to drag it onto the timeline viewer it put

  • How does one get a list of messages.

    I would like to get a list of all the messages in a queue, topic or subscription but I do not want to remove them from the queue, topic or subscription. Thanks Ralph

  • Pop up message I don't understand. Anybody know what it means and why it's happening please?

    Can anyone tell me why I keep getting this please? My internet browsing is working fine so I don't get why this is happening. Please take into account my understanding of computers is just basic usage and nothing technical. Thanks!

  • Oracle Sandbox issue

    Hi, I wanted to create a custom webcenter application which is customizable by users at runtime with sandox feature enabled. And i want save all the changes done at runtime by the users as personalization as the changes must not get reflected for the