Can a session EJB be accessed by more than one client?

Hello,
I would like to have an instance of a persistent EJB which is accessible by more than one client and which will not be destroyed after usage. Apparently session beans can only be accessed by one client and are created every time they are accessed. In my case this creation is quite time and resource consuming. Is it an alternative to use an entity bean instead, even if the logic of the bean doesn't have anything to do with direct database access?
Thanks.

It seems to me that what you want is exactly a session bean will do. The EJB container is responsible to maintain a certain number instances (configurable) of your session bean and serve multiple clients at the same time. Session beans are not necessarily destroyed after serving a client. If you configure your ejb server to have a pool size of 2 to 100, then you will always have at least 2 instances (no more than 100 even there are a lot of client access) of this ejb ready to serve. The only thing not clear to me is that do you want to use only ONE instance of this bean or you don't care as long as multiple clients can access this bean's service? Since you mentioned that there is not a real database access, you can certainly use a Singleton but a 'regular' session bean with static fields should do it also if these fields will not be modified by clients.
PC

Similar Messages

  • How can a file be accessed by more than one app?

    Hi,
    I am new to iOS4 and the whole iPhone, iPod technology. I am really a windows user.
    How can a file be accessed by more than one app. In my case I want to transfer a midi file from my PC to my iPod Touch and be able to open it from a couple of Midi Players which I am evaluating - or does each Midi Player have to import the file seperately for its own use?
    Thanks,
    Sam

    It seems to me that what you want is exactly a session bean will do. The EJB container is responsible to maintain a certain number instances (configurable) of your session bean and serve multiple clients at the same time. Session beans are not necessarily destroyed after serving a client. If you configure your ejb server to have a pool size of 2 to 100, then you will always have at least 2 instances (no more than 100 even there are a lot of client access) of this ejb ready to serve. The only thing not clear to me is that do you want to use only ONE instance of this bean or you don't care as long as multiple clients can access this bean's service? Since you mentioned that there is not a real database access, you can certainly use a Singleton but a 'regular' session bean with static fields should do it also if these fields will not be modified by clients.
    PC

  • Can we use same program ID for more than one RFC scenarios

    Hi experts,
                I am working on a RFC to FILE scenario. I have created one TCP/IP connection in SM59 with a program ID. Can we use this program ID for more than one scenario. I have written code as below
    data: iquote type standard table of ZIQMD initial size 0,
          IPRODUCT type standard table of ZPMS initial size 0,
          wa_quote type ZIQMD,
          wa_PRODUCT type ZPMS.
    CALL FUNCTION 'Z_CBT_RFC_QUOTEMASTER'
      TABLES
        I_QUOTE       = iquote          .
    CALL FUNCTION 'Z_CBT_RFC_QUOTEMASTER' in background task DESTINATION
    'ID4'
      TABLES
        I_QUOTE       = iquote          .
      COMMIT WORK.
    CALL FUNCTION 'Z_CBT_RFC_PRODUCTMASTER'
      TABLES
        IPRODUCT       = IPRODUCT          .
    CALL FUNCTION 'Z_CBT_RFC_PRODUCTMASTER' in background task DESTINATION
    'ID4'
      TABLES
        IPRODUCT       = IPRODUCT          .
        COMMIT WORK.
    when i am executing the code like this. i am able to send the data to 'Z_CBT_RFC_QUOTEMASTER'  , but iam not getting data  for 'Z_CBT_RFC_PRODUCTMASTER'  interface. ID4 is the connection that i have created in SM59. with program ID as ABCD.
                  Can i use the same connection for all interfaces.Please help in this, if we can use same connection for all interfaces. then how to make changes in XI.
    Thanks in advance.
    Thanks & Regards,
    Poorna.

    Just tried this and I can confirm that my earlier understanding was correct!
    One of my colleagues confused me out and the conclusion is,
    1. You need a separate TCP IP Connection for every interface with a Unique program ID.
    Regards
    Bhavesh

  • How can I use my iPod nano on more than one computer?

    How can I use my iPod nano on more than one computer?

    Hi, China6450.
    Thank you for visiting Apple Support Communities.
    I would recommend setting up Manually manage music.  This will only allow music to be synced from the computer to the iPod nano.  Here are some helpful articles that will walk you through the process. 
    Managing content manually on iPhone, iPad, and iPod
    http://support.apple.com/kb/HT1535
    Using iPhone, iPad, or iPod with multiple computers
    http://support.apple.com/kb/HT1202
    Cheers,
    Jason H. 

  • Can I labled the same song to more than one albums? As you know, some songs are repeated in different albums.

    Can I labled the same song to more than one albums? As you know, some songs are repeated in different albums.

    You can make a copy of an existing song, then change the album, artwork and track number details. You cannot make the same physical file show up in two different albums.
    tt2

  • I have an HP Photosmart C4180 all in one printer scanner and copier, I can't figure out how to scan more than one page at a time and then send as a PDF file via email

    I have an HP Photosmart C4180 all-in-one, printer, scanner and copier.  I can't figure out how to scan more than one page?  It will only let me do one page at a time and then I have difficulty sending pages 1, 2 and 3 as one docuement.  Any ideas??
    Thank you, Jetteski

    Hello Jetteski,
    Hello Jetteski, Thanks for the post.
    Since you are running a MAC, check the below links for some excellent information on scanning.  Good Luck!
    http://goo.gl/M8Cl2
    http://goo.gl/cufK6
    http://goo.gl/OTQoR
    I work for HP but my posts and replies are my own....Thank you!

  • Just bot a macbook pro to replace one of my pc's. can't figure out how to have more than one website open at a time like explorer. Is it possible to do?

    I can't figure out how to open more than one website at a time like explorer does on a pc. would like to know if it Is possible or not.

    Tabbed browsing is the way. Go to Safari's View menu:
    and click "Show Tab Bar." When you see a link on another site you wish to open without closing the first site, simply right-click and select "Open Link in New Tab."

  • Can I install 'Cisco connect' software on more than one PC in the network?

    Can I install 'Cisco connect' software on more than one PC in the network? Do multiple installs conflict? Who did try this before?

    yes you can
    SAP

  • Can I install Adobe Creative Cloud in more than one computer with the individual plan?

    I don´t have clear about the diference between individual plan an teams. My questions are:
    Can I install Adobe Creative Cloud in more than one computer with the individual plan?
    The team plan means that I have to pay for US$70 for each computer that i want to install the creative cloud even if I am the only user?

    Hi heymarusia,
    Yes, you can install and activate Creative Cloud desktop applications on two computers, regardless of operating system, for the individual associated with the Creative Cloud membership. See the product license agreements page for more information.
    Regards,

  • Can I simultaneously configure a device to more than one task?

    Can I simultaneously configure a device to more than one task? I am trying to trigger on some of the input data. When I tried to configure the same device to more than one task, I get an error:
    Error -10408 occurred at Digital Group Config.
    Possible reasons:
    NI-DAQ LV: The specified channel is in use.
    I have attached a copy of my VI. In the first and second sequences I am using device 1.
    Attachments:
    Can_I_simultaneously_configure_a_device.doc ‏19 KB

    Hello;
    The best way to have multiple tasks running on the same DAQ device is by syncronizing those in the hardware level. What I mean by that is, to use the same clock pulse train to clock the different tasks.
    For instance, in case you want to do Analog Input and Analo Output at the same time, you can use the AI Start Scan (which is the clock pulse train that will clock the analog input task) to be routed to the AO Update clock (which is the clock that controls the Analog Output tasks of your device). You can extend that idea for counter operations as well.
    For digital operations, if you are not using one of the digital boards that support strobed operations, such as the 653x ones, you won't be able to synchronize the digital tasks with the analg tasks, s
    ince the digital ports updates through Software calls only.
    You are probably getting that error because you are trying to use the Digital Group Config.vi (or some other VI that calls the Digital Config.vi) with a board that doesn't support handshaking operations, such as the MIO ones.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Can we delegate a business object to more than one Subtypes?

    Can we delegate a business object to more than one Subtypes?
    So unless we delegate that Sub type , will the new method of that sub type  be not called from our WF?
    Edited by: kittu reddy on Nov 25, 2008 7:50 AM

    No this is not possible. I will like to know what is the business case you will require this.
    Thanks
    Arghadip

  • Can a personnel area be assigned to more than one company code?

    Hi experts,
    Can a personnel area be assigned to more than one company code?
    Regards,
    Anita George

    Yes, as Siva said it is not possible.
    Between personnel area and company code -
    many to one mapping is allowed but one to many is not allowed. That is you can map more than one PA to 1 company code but 1 PA can not be map to more than one company code.

  • Can't SSAS engines make use of more than one aggregation to answer a query?!

    I have a very simple cube (just for testing and training) . This cube contains two dimensions: [Dim Soccer Player] contains one attribute hierarchy [player name], the other dimension
    is [Dim Match Acts] contains also one attribute [Acts] which has values like fouls, goals, saves, tackles… etc. And of course a Fact that contains one measure of Just Count ... that simple ... so this cube can
    answers a question like how many goals scored by "Messi", for example ... a very simple trivial cube.
    I'm testing aggregations and their effect. so first I've designed one aggregation (Aggregation 0) on the granularity level of [Player name], then
    I run a query to get the count of ALL the[Acts] done by each [Player name] ... I've checked the SQL Profiler and I found that the aggregation was used.
    Then I cleared the cache, and I run another query, but this time to get just the number of Fouls committed by each [Player name], I checked the Profiler but the Aggregation 0 was NOT used.
    I went back to the aggregations design tab in BIDS, and I added another new aggregation (Aggregation 1) on the level of [Acts], so now I have two aggregation one on the granularity level of
    [Player name] and the second on the level of the [Acts].... I cleared the cache again and rerun the last query. NONE of the aggregation was used!
    In the third test I deleted Aggregation 1 and added [Acts] to Aggregation 0. so Aggregation 0 now on both [Player name] AND [Acts]... cleared the cache and rerun the last query. Aggregation
    0 appeared again.
    I just want to make sure (and if possible know why) the SSAS engine can't make use of and combine more than one aggregation to serve a query (point number 2), and that to design an aggregation
    that will serve a query which contains attributes from different dimensions, I have to add ALL the attributes in that query in that one aggregation, like point 3 ... is this true?!

    I think you are on the right track. You need to include all the attributes used in one query in the same aggregation (like #3) for it to be used. Example #2 works as I would expect. Queries above the grain of the agg (query by player name and an agg by
    player/act can be used) can be used. Queries below grain of the agg (example #2) can't use the agg.
    http://artisconsulting.com/Blogs/GregGalloway

  • How can i get apple tv2 to recognize more than one computer in my house

    how can i get apple tv2 to recognize more than one computer in my house, I just got it and can only find one of two computers in my home

    Same here. I have 1 ATV2 and 2 computers and each has separate iTunes accounts (mine and my wife's). The ATV menu says "computers" so I presume you can have more than 1 computer on 1 ATV. The big question is how do you set it up?

  • Can a single tax code (v5) have more than one rate of intrest?

    can a single tax code (v5) have more than one rate of intrest?..
    v5 can it have both 4 % and 5 % ??
    (v5 comes under a condition type jipc..it is used for cst in a PO)

    in that case ,(two rates)
    if i use
    function module, CALCULATE_TAX_FROM_NET_AMOUNT
    how will get correct tax amount?
    coz i will just mention
    bukrs,
    tacode,
    amount,
    currency
    in the FUNCTION MODULE..
    also can u help me find VAT CST amounts RATES for a invoice?
    if i use the above FM i get the follwoing error
    'tacode v5 not found in procedure TAXINN'
    functional guy says configuraion is right..
    pls help..
    i need to make purchase register...

Maybe you are looking for

  • Help With Cinema Display A1038

    I'm planning in getting a A1039 Cinema Display 20". But before I buy this one I want to know if this can be plugged with a Macbook Pro Unibody A1286 2009. I will really apreciated If any one can help me with this. Thanks for your help. Pepe

  • Problems with Firewire - Connecting a device to either FCP or iMovie :(

    I have been trying (without success) to get video from a MINI DV tape currently inside a Panasonic DVC30 to either my MacBook Pro (2months old) or my iMac (also about 2months old) via a FireWire cable i got of eBay for a fiver. Neither machine will r

  • Sync iphone 4 with work calendar

    How do I sync my work calendar with my iphone 4 calendar? I sync my personal email (msn) with my iphone.

  • Result position for hierarchy

    I have couple of characterstics like VP and sales rep in the rows and amount in the columns. I have chosen the option on the rows as "display as hierarchy". The result and overall result position for this hierarchy is always on the top right. Is ther

  • How to identify the no is prime or not ,no is more than 9 digit?

    how to identify the no is prime or not ,no is more than 9 digit? becaz long does not store more than 9 digit , like example long number=9876543218; // it will throw the compile time error so how to get this?