Use of ThreadLocal in EJB to store Transaction id

Hi ,
I my application we need to retain the transaction id for logging . We had a facade layer which are stateless session beans . We use an EJB interceptor to get the transaction id from the request object and put it in a threadlocal . We retrive the transaction id when we log . We have done some POC and it works well .
In some cases we have call to local ejbs to demarcate the transaction boundary , for the local ebjs we call the other helper classes . Just wanted to know if the transaction id can still be retrieved from the helper classes . Any help would be highly appreciated .
Thanks,
Tirthankar

Hello Roberto,
1) Yes, but we anticipated this performance issue by switching to an external Content Server. I also remember one performance issue: when you are uploading an attachement in your session, the system will store it in a temporary table BBP_TRANSCONTENT (the content is not stored in memory). It will be definitively stored in BBPCONT only if the user saves the purchasing document (otherwise we pollute the final table).
2) You have to "migrate" old documents from BBPCONT to the new Content Repository (ex:Content Server). There is a report for that : RSIRPIRL.
Rgds
Christophe

Similar Messages

  • ADF 11, USING EJB, CALL STORE PROCEDURE, A PROBLEAM?

    ADF 11, USING EJB, CALL STORE PROCEDURE, A PROBLEAM?
    I have a store procedure:
    CREATE OR REPLACE PACKAGE BODY PK_HR1
    IS
    FUNCTION FUNC04
    RETURN CUR_RESULT
    IS
    X_CUR CUR_RESULT;
    BEGIN
    OPEN X_CUR FOR
    select mako, tenko, diachiko from kho;
    RETURN X_CUR;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END FUNC04;
    END PK_HR1;
    In the entities class, I have a NamedStoredProcedureQuery:
    @Entity
    @NamedStoredProcedureQuery(name="Kho.FUNC04",
              resultClass=Kho.class,
              procedureName="PK_HR1.FUNC04" )
    public class Kho implements Serializable {
    In session bean, i have a method
    public class SessionEJBBean implements SessionEJB, SessionEJBLocal
    public void test() throws Exception{
    try {
    //code here ...
    List<Kho> listKho = em.createNamedQuery("Kho.FUNC04").getResultList();
    System.out.println("aaaa");
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    I try running, but always show errror
    this errors:
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00221: 'FUNC04' is not a procedure or is undefined
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    Call: BEGIN PK_HR1.FUNC04(); END;
    Query: ReadAllQuery(jp.co.mfr.sgs.bean.Kho)
    help help me?

    You need to use a CallableStatement for this.
    --olaf                                                                                                                                                                                                           

  • Can I use static variable in EJB?

    Many books suggest developer don't use static variable in EJB,I want to know why?
    I know there isn't any problem if the static varibale is read only
    For writable static varible ,what will happen if I use a static Hashtable for share data
    Help me!Thank you very much!!

    Greetings,
    I know that "EJB business methods are not allowed to
    block on synchronized resources" Just where do you "know" that from?? The EJB 2.0 Specification, at least, is nowhere in agrement with this statement. If it comes from a book I would question the author's reasoning. Contractually, there's no sound basis for this. In the case of Session Beans, they have an expressedly direct and single-threaded association with a client. From a design viewpoint, it certainly seems unnecessary for a bean to "block" its one-and-only client, but to say that it "is not allowed to" do so is without merit. Entity Beans, on the other hand, are concurrently accessible. Yet, with regard to a transactional context being in effect, the container does indeed block on a bean's business methods. For the bean to do so itself is, therefore, unnecessary. Furthermore, the specification explicitly concedes that a "Bean Provider is typically an application domain expert" and "is not required to be an expert at system-level programming." (EJB 2.0 Spec. 3.1.1) From these statements alone it is reasonable to assume the above statement is meritless since the Bean Provider is not expected to even consider synchronization issues when developing a bean.
    But I'm mixed up why we could use "Hashtable" or otherApparently, because your sources are as well...
    collection classes in the EJB ,in these method many
    methods are synchronized In fact, not only "can we use" them but, with respect to multiple-row finders in Entity Beans we are [i]required to use them (or an iteration of them)! Not all Collection classes are synchronized (so called "heavy-weight collections"). As shown above, that the choice of a particular Collection class might be synchronized is of little consequence since a bean designed under strict adherence to the specification ensures that it is never concurrently writeable.
    Could someone provide a good way for this problem?
    Please Help Me!!!Regards,
    Tony "Vee Schade" Cook

  • Why use app server and EJB?

    we have a project about Component-based Library for Business Information Systems.
    We have chosen Point-Of-Sales System as the type of our system.
    why do we need to use app server and EJB?
    Hope can have replies soon. Thanks so much!
    regards
    beginning of EJB

    Well, you don't need to. You might want to because transaction management is important for point-of-sales and app server/EJB gives you that for 'almost nothing'.

  • Using a variable in SQL to store intermediate results

    I'm new to Crystal Reports, so pardon my ignorance.
    I need to write a SQL statement in Crystal Reports (Ver. 11) that uses results from a query and stores them in a variable for further use in the statement. Something like this:
    DECLARE @my_variable INT;
    SET @my_variable=
    CASE
                    WHEN DATEPART (m,{?Date})<7
                    THEN DATEPART (yyyy,( DATEADD (year,-1, {?Date})))
                    ELSE DATEPART (yyyy,( DATEADD (year,0, {?Date})))
    END
    (Where {?Date} is a date parameter)
    Is it possible to achieve this in the above form or some other form in Crystal Reports?
    Thanks

    Simple answer... When I used the variable, I marked it as a string.  There is an email address setting.

  • Using JarSettings to generate EJB client jar, but supported classes missed

    Appreciated for any comments in advance.
    I am using @jarSetting to generate EJB client jar file from workshop 9.2. The remote method of EJB has one input parameter that is defined as an interface. The interface is included in client jar, but the implementation of this interface is not.
    Please advise how I can add the implementation of this interface to client jar?
    Best Regards,
    James

    Hi James,
    I believe the algorithm for creating the client jar is to simply inspect the EJB interfaces using reflection and to include all user defined classes and exceptions that are referenced by the interfaces. In your case, it sounds like a class is not being included because it is not directly referenced by one of the EJB interfaces.
    I think the client jar creation algorithm can be described as "best effort" and unfortunately, it does not always end up including all classes needed by the client. I would recommend you add the additional classes manually using the jar tool.
    - Matt

  • When I try to sign in to iTunes, it tells me that my Apple ID has not yet been used with the iTunes Store. How do I use my account with the iTunes Store?

    When I try to sign in to iTunes, it tells me that my Apple ID has not yet been used with the iTunes Store. How do I use my account with the iTunes Store?

    Hello Daijalove97,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    Using an existing Apple ID with the iTunes Store and Mac App Store
    http://support.apple.com/kb/HT2589
    To use your Apple ID at the iTunes Store
    Open the latest version of iTunes.
    Choose Store > Sign In from the Store menu.
    Enter your Apple ID and password, then click Sign In.
    Click Review when asked to review your information.
    Enter your billing information, a credit card will be required.
    Click Continue when you're done entering your credit card and billing information.
    Best of luck,
    Mario

  • How do I have 1 apple id for the family to use in the iTunes and app store and a different apple id for iCloud and FaceTime and imessages

    how do I have 1 apple id for the family to use in the iTunes and app store and a different apple id for iCloud and FaceTime and imessages?

    See also Using your Apple ID for Apple services
    specifically the section "Using one Apple ID for iCloud and a different Apple ID for Store Purchases".

  • Hello i can  not  i use my account on the applewill   store , i hope that yu help  me with a lot of thanks and wait reply to this massege

    hello i can not i use my account  on the apple store  , i hope  that yu will  help me  with  a  lot  of thanks and wait  reply to this message

    Go through the below link.
    http://support.apple.com/kb/ts2446
    If the above link doesn't helps then contact APple support and they will help you Enable your Apple Id from their End : http://support.apple.com/kb/he57

  • I cannot figure out how to set my apple id to use: itunes (two of accounts), apps store and Itunes store. How do I make one password that will be recognixed by all these devices?

    I cannot figure out how to set my apple id to use: itunes (two of accounts), apps store and itunes store. How do I make one password that will be recognized by all these devices? My apple id is constantly not working.

    Hi Lrwill,
    If the apps that are on your son's iPad were purchased under his Dad's Apple ID, then signing your Apple ID onto the iPad will not help you with updating those apps.
    Also, if the iPad was sync'd with his Dad's iTunes library, then hooking it up to your computer/iTunes library, will require you to reset the iPad, and everything that was loaded under the other Library and Apple ID will be wiped out.
    Can you provide a little more info about what was set up under which Apple ID and what iTunes library the iPad was sync'd with?
    Cheers,
    GB

  • TS1702 We use one ID for  the Apps store for 2 iPhones. In the second profile on the Macit is impossible to update apps there is a mistake. What is the decision?

    We use one ID for  the Apps store for 2 iPhones. In the second profile on the Macit is impossible to update apps there is a mistake. What is the decision?

    This happens when you both use the same Apple ID for iMessage.  To fix this you have two choices:
    On one of the phones go to Settings>Messages>Send & Receive, tap the ID, sign out, then sign back in with a different ID.  Note: you can still share the same ID for purchasing in Settings>iTunes & App Stores; or
    On both phones go to Settings>Messages>Send & Receive and uncheck the email address(es) shown under "You can be reached by iMessage at".  Also uncheck the other phone's phone number, if present.

  • What are the uses of ThreadLocal

    Hi all,
    Can anyone give me an example on the use of ThreadLocal class. Does static methods need to be synchronised when working on ThreadLocal variables ?.
    rgds
    Antony Paul

    Hi,
    I think the documentation for ThreadLocal is pretty good:
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ThreadLocal.html
    You usually use a ThreadLocal when you have several threads that needs to have its own local data.
    /Kaj

  • Can I use a network hard drive to store my music

    This might be more of an Itunes question, but I would like to know if there is a problem using a network Hard drive to store all my music on? I'll be using 2 computers to access it, 1 computer handles my kids for there Ipods each having there own logins, and the 2nd computer for my Ipod..
    Or do I need to have one computer with 3 seperate logins.. I just want to do things the right way without violating anything.
    Thanks for your help.

    No problem with using network drive. Many do.
    Easiest when doing this from the start but can be done at any time. Some things will depends on drive. For me, only one can access drive at a time. create a folder on network drive for the library to be in. For each user on each computer map the folder on the network drive to a drive letter. Set iTunes to use this mapped drive as the library location.
    Notes to be aware of. Each user will have access to all files on network drive. Files added by one user will be accessible to other users but they must manually add them to their own library. If multiple users subscribe to same podcast there will be duplicate files of episodes in folder. If one user deletes a file from device other users will be affected if tracks was in their library.

  • Can you use a network hard drive to store your music

    This might be more of an Itunes question, but I would like to know if there is a problem using a network Hard drive to store all my music on? I'll be using 2 computers to access it, 1 computer handles my kids for there Ipods each having there own logins, and the 2nd computer for my Ipod..
    Or do I need to have one computer with 3 seperate logins.. I just want to do things the right way without violating anything.
    Thanks for your help.

    No problem with using network drive. Many do.
    Easiest when doing this from the start but can be done at any time. Some things will depends on drive. For me, only one can access drive at a time. create a folder on network drive for the library to be in. For each user on each computer map the folder on the network drive to a drive letter. Set iTunes to use this mapped drive as the library location.
    Notes to be aware of. Each user will have access to all files on network drive. Files added by one user will be accessible to other users but they must manually add them to their own library. If multiple users subscribe to same podcast there will be duplicate files of episodes in folder. If one user deletes a file from device other users will be affected if tracks was in their library.

  • I have a ipod touch 2nd generation 8gb 4.2.1 im new to itunes i made a itunes account but it says i need a payment method is there anyway i can use my paypal if not is there a way to not have to use a payment method for itunes store please help ty

    i have a ipod touch 2nd generation 8gb 4.2.1 im new to itunes i made a itunes account but it says i need a payment method is there anyway i can use my paypal if not is there a way to not have to use a payment method for itunes store please help ty

    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    Using those instructions you may also be able to select PayPal if that is allowed in your country.

Maybe you are looking for

  • Default search value for Query By Example Report

    Is there any way I can add the wildcard % as a default search value for text fields in the customization screen for a QBE report? The aim is to relieve the user from knowing that you have to input the wildcard % in the search field. Also, Is there a

  • Make-to-order. Requirement linked to Quotation and not to Sales Order

    After we have changed our Make-To-Order Materials from unvaluated sales order stock to valuated Sales Order Stock we do face a problem with the Requirement for those Sales Orders lines which are started with a Quotation. After running MRP a planned O

  • Satellite U845W-S400 - how to open-up the laptop to put in a SSD

    Hello everyone, I would like to know how to open-up the laptop to put in a SSD. It has 6 screws on the bottom and I assume some under the keyboard. I do need a guide however to know for sure where they are before I start prying things open and might

  • IMap and Google recognition when using a third part domain with forwarding

    Hi, I have iWeb and have brought a domain name from Godaddy. The Godaddy domain is set to forward to the .Mac account so I can easily edit the information with iWeb - however, I have registered the site with Google (a few weeks ago now), but it still

  • Build failed while Installing AIA Demo

    Hi, I am getting this error while Installing and Deploying AIA Demo Application. D:\Devrep\Oracle\AIAHome\samples\AIADemo\config>ant -f deployDemo.xml Buildfile: deployDemo.xml InstallDemo: [echo] [echo] /---------------------------------------------