Long-Term or Short Term Connection

I am reading the tutorial about database connection pool.(http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Resources3.html#65118) I just wonder when I should use Long-Term Connections and Short-Term Connections.
My understanding is:
1) Stateless Session Bean uses Short-Term Connection.
2) Stateful Session Bean and Bean-Managed Entity Bean uses Long-Term Connection. Is that right? Thanks.

If you mean a stateless bean will use a shorter connection than a session bean (stateless) ...then I see what you are driving at, but no ...I would disagree.
In the stateless bean you might get a connection from the pool, use it for those few methods, then release it. That is probably obvious given the nature of a stateless session bean.
However, in a statefull session bean ...even though you are letting the user hold onto the session bean for a long while ...you don't really want to assign them a permanent connection for that whole session. How many actual db queries will they make in an hour? One? Two? ...Ten? Even if that was fifty ...I think that would amount to less than a minute where the bean actually required the connection. Its an awful waste to hold it open and tied up for an hour isn't it?
Your connection management should be the same as the statless bean. When a method that interacts with the db is invoked by the client ...get a connection from the pool, use it ...and release it back to the pool when the method(s) end(s). Same with an entity bean too, I would say.
Your session bean is a business tier for business logic. Don't think it represents a solid connection to a database. It just connects when it needs to do some db stuff and then lets go of connections when its done ...immediately. The fact that it is a permanent object to the client in terms of EJB lifecycle is irrelevent to its connection to the database.
Any disputes?

Similar Messages

  • Auto Conversionn long term fixed deposit to short term fixed deposit

    Hi SAP Experrts,
    We are using CFM system and I  have the following scenario
    We invest funds in long term fixed deposit. On maturity data LTI should automatically convert STI and the balance in LTI account should get transfered to STI account. Has any one dealt with this kind of scenario, If yes please let me know how to configure this scenario in Account determination
    Thanks in Advance

    Hi,
    Like Prasad said you can do a valuation class transfer.  But this is not available in earlier releases ( I think only from EH2).
    But it would be better if we could know the business logic for such a transfer.  Why do you want to transfer to a short term FD on maturity date.  On maturity date, the long term FD gets matured and that closes the investment correct.  In case if your requirement is that the maturity amount is invested in another short term FD, then you can as well create a new short term FD transaction for the same or in case if the FD is extended for some time then you can check with the option of roll over.
    Regards,
    Ravi

  • [TRM-TM] Transfer from Long-term liab. to Short-term liab.

    When I create a long-term loan using the transaction manager, it will be posted to the long-term liab. account, but after the remaining period of a loan become shorter than 1 year, I need to transfer it from the long-term liab. account to short-term liab.
    I want to know if there is standard system function can fulfill this requirement, or someone could suggest me a solution.

    Hi,
    Yes you can do this.  You can use capital reposting - grouping/splitting of loans function for acheiving this.
    You can group this loan and transfer the remaining capital of this loan to another loan.  It is generally used for takeover of loan by a different partner, but in your case specify the same partner. 
    The Group Contract function allows you to create one contract from several contracts for accounting purposes or to transfer parts of several contracts to another contract. The outstanding capital (remaining debt) of one or more contracts is transferred either fully or in part to another contract. This is necessary, for example, when a different borrower takes on the remaining debt of a loan.
    Check this link for more info:
    http://help.sap.com/saphelp_erp60_sp/helpdata/EN/f2/99483f18e7e07fe10000000a114084/frameset.htm
    Regards,
    Ravi

  • How to automatic post the profit OR loss to short term Capital / long term

    Hi,
    How to automatic post the profit OR loss to Short term Capital gain / Long term capital gain on posting of Sales transaction ?
    Incase the inventory item is less than one year older then the difference should be posted to the G/L of Short term Capital gain, where as if the item is more than one year older then the difference should be posted to the G/L of Long term Capital gain
    Thanks in advance
    Samir Gandhi

    I don't think any logic can be used to reach your goal.  How B1 system should post in such a fussy conditions?
    In case the inventory item is less than one year older then the difference should be posted to the G/L of Short term Capital gain
    How can you identify these items?  An inventory is a moving concept like a river. It come and goes with all different ways even as to value and revalue them.
    Please follow the common sense to face reality.
    Thanks,
    Gordon

  • Are long term backups created from short term tape full + incremental?

    Does DPM use short term tape, Full + incrementals to create the long term Tape backups?
    For example, if i run a short term to tape full with incremental against a computer with a 1 week retention then run a long term recovery point every 1 week for for 4 weeks and 1 recovery point every month for 6 months.
    will all the long term RPs actually run a full backup or will they build one from the previous full plus incremental?
    My question is two fold,
    1. i am concerned about total long term storage
    2. I am concerned about time needed to complete the full backup.
    Thanks! 

    DPM doesn't support incremental backups to Tape. Tape Backups are always full.
    Regards, Trinadh [MSFT] This posting is provided AS IS with no warranties, and confers no rights. If you found the reply helpful, please MARK IT AS ANSWER. Looking for source of information for DPM? http://blogs.technet.com/b/dpm/ http://technet.microsoft.com/en-in/library/hh758173.aspx

  • DPM 2010 Short and Long Term goals

    My question is related to size restrictions.
    Our existing DPM 2010 is setup with two protections groups, System State, and a Default (file) protection group. Both are set up the same. A co worker recently had to re-create a protection group due to his negligence and deleted it without looking at how
    it was setup in the first place, since then I've been having errors in backing up to tape:
    Synchronization frequency is set to just before recovery point
    Short term goals are:
    Recovery points are at 8:00 AM, 12:00PM, 6:00PM Everyday, Express Full is 8:00PM Everyday
    Long term goals are:
    Retention range 2 weeks, Frequency Weekly (1 recovery point every 1 week for the last 2 weeks)
    Full backups are set to Saturday at 11:00 PM
    Here's the thing, we have 3x3TB external drives that, historically have been swapped out weekly (Monday mornings, using Firestreamer for tape emulation). Since the co-worker broke, and re-created the protection groups, when we view DPM Console on Monday
    morning, we see that the backup jobs are failing, the 3TB drive is full. 
    Could this 3TB drive be full due to this weekly swapping out when it is set to a retention range of 2 weeks? Obviously, it could be because the protection group actually contains that much data, but I'm trying to wrap my head around sync frequency, recovery
    points and how that works into recovery goals. 
    Any help is appreciated.

    Hi,
    Right. After the registry key is added, all new recovery points written to tape will show they expire at midnight (12:00am) on they day they expire so any tape jobs that run later that day will be able to use that tape after the expiry
    date.
    To prevent tape jobs from failing because there are no tapes available, you can also add this registry value.
    During a new tape backup or if a tape becomes full and there are no other tapes marked free, Free (contains data) or expired in the library, DPM will raise an alert to prompt for another free tape to continue backup.  The same is true during a
    restore, if the needed tape is not in the library an alert will be raised.  By Default, DPM It will wait for
    1 hour before failing the job.
    This prompting timeout can be configured by the registry entry “PromptingTimeOut” under “HKLM\Software\Microsoft\Microsoft Data Protection Manager\1.0\Prompting”
    PromptingTimeOut:REG_Dword:43200000  (dec) = 12hrs
    The Formula is   (#hrs * 1000 * 60 * 60)
    1HR =  1*1000*60*60 =  3600000  decimal
    So for each hour to wait, multiply by 3600000.
    8hrs = 28800000  decimal
    Restart the DPMRA service.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT] This
    posting is provided "AS IS" with no warranties, and confers no rights.

  • Does Best Buy have a: Defined Mission Statement? Defined Vision? Long Term/Short term objectives?

    Does best buy have, in terms of as a company: A Defined Mission Statement? A Defined Vision? A long Term and/or Short Term Objective? This is for a senior level college report. I could not find anything on your official website. Please ignore the category. It was chosen at random. Thank you

    Hi Tomas,
    Best Buy doesn't have an official mission statement per se, but you can learn about our Customer Promise by visiting our Community Relations site:
    http://www.bby.com/about-best-buy/
    This site also has information on our giving partnerships, national and community grant programs, and links to both our quarterly and annual earnings reports.
    I hope this helps!
    Aaron|Social Media Specialist | Best Buy® Corporate
     Private Message

  • DPM 2012 - stand alone drive - Short/Long term protection to tape

    We are migrating from BE to DPM 2012. I'm trying to configure DPM 2012 for both short term & long term protection - both using tape (stand alone drive). The goal is:
    Daily backups (Mon, Tue, Wed, Thu) - 2 weeks retention
    Weekly backup (Friday) - 4 weeks retention
    Monthly backup (last weekly backup) on every month - 15 m onths retention
    I've configured the short term protection for daily and weekly backups. Monthly backups are configured under long term protection. Daily and weekly backups are working as expected. However when it comes time for the Monthly, the DataSet copy jobs are failing.
    As I understand it, DPM is expecting another drive to copy the weekly backup tape.
    How I can achieve above goals ? Backup to disk is not an option.

    Hi,
    Any time DPM schedules a dataset copy job, you will need more than one tape drive, there is no way around that requirement.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Regards, Mike J. [MSFT]
    This posting is provided "AS IS" with no warranties, and confers no rights.

  • Lot Sizing for Short/Long Term

    Hello All,
    I tried the lot sizing with the short term/Longterm pattern..
    But I'm facing the following problem..
    I have maintained periodic lot sizing according to the planning calendar(Weeks from Saturday to Friday) for the first month...( Requirement date = period end)
    And for the other 2 years I have defined periodic lot sizing with Monthly lot size ( Requirement date = period end).
    But running MRP, the system Cumulates all the monthly requirement from the 2 nd period and creating the order proposal with the order end date of the months first planning calendar week. But I'm expecting the system to create the order proposal with the month's last date as the order end date .
    Whether my expectation is incorrect or any other settings to be maintained to achieve this.
    Thanks & regards,
    Mahesh

    Hello Mahesh,
    You can get the results without maintaining the planning calendar..Just change the lot size procedure WB :weekly lot size" and take out the planing calendar and maintain the settings as per below.
    In the period lot sizing procedure WB maintain the number of periods 1 for the period of short term period with weekly lot size. then in "end of the short term period" maintain the initail value " months: and define number of periods 24.
    maintain the same values for long term period i.e period 1 with period lot sizing procedure (monthly lot size).
    By doing the above you will get the weekly lot size for the first 2 years and then monthly lot size for the rest of the requirements.
    If helpful rewards your points.
    Regards
    TAJUDDIN

  • Bifurcation of Short term & Long term Gains possible in Treasury??

    Dear All,
    Can anyone please let me know whether we can bifurcate the short term and long term gains in CFM.I require the bifurcation for tax & reporting purpose.
    Please help.
    Thanks & Regards
    Ramesh Nair

    Hi Ravi:
    I ve been reading carefully what you suggest. what sap note # 1515125 implement is realy what I need for my Client about current portion of a long term debt.
    But reading this note and the related ones referred 1515126 & 732499 I really do not know wich is the solution for my client.
    The system status of my Client is EA-FINSERV 600 Level 0018 SAPKGPFD18
    The afffected releases regarding note 732499 are
    SoftwareComponent       Release            From Release     To  Release    And subsequent
    EA-FINSERV                        10                     110                   110  
    EA-FINSERV                        200                   200                    200                X
    BANK/CFM                         46C                     463_20           463_20  
    The afffected releases regarding note 1515125 & 1515126  are
    Software Component        Release             From Release    To Release   And subsequent
    EA-FINSERV                       604                      604                     604  
    EA-FINSERV                       605                      605                      605
    Obiously regarding what i mention I do not have TPM44 (is TBB4) and TPM15M
    TPM15 only hs Product Groups Securities and Loans (not OTC tx)
    At TRGC_COM_VALCL table there is no entry to set the flag "current portion of a long terms debt/assets"
    So wich is the solution in my case? I will appreciate any help
    best regards
    Claudio

  • Outstanding Long-Term & Short-Term Characteristics

    Hi all,
    In QA32 there are Number of outstanding long-term & short-term characteristics, and according the information within F1 help, only if no short-term characteristics are open, the usage decision for the inspection lot can be made. However, I have several inspection lots which have already been made UD with outstanding short-term characteristics, please refer to following screenshot:
    Danny

    Dear Danny,
    The normal standard process will not prevent you from giving UD if the result recording is done.
    For this you need to use a status profile which will mandate that the result recording has to be completed for the UD to be done.
    Regards
    GN

  • Short, medium and long term planning in SNP

    Hi,
          can somebody explain me what Short, medium and long term planning mean in SNP?
    Lets, say I have this scenario:
    If I have a product with SNP horizon of 35 days, which means that the product is planned in SNP only after 35 days from today.  Only PPDs deals with orders in these 35 days.
    I have a 3 planning books
    short term with 30 days from today
    medium term with 7 months from today and
    long term with 2 years from today.
    When I say short, medium and long term planning in SNP what exactly happens in these ?? What do users usually do in these books?
    SNP horizon is 35 days and the short term book is 30 days long, in which SNP does nothing. What's the use of this book?
    Thanks.

    When I say short, medium and long term planning in SNP what exactly happens in these ??
    Nothing much from a technical stand point.
    What do users usually do in these books?
    Check the Time Bucket Profile for the different books. The short Term Book will be in days, the mid term in weeks and the long term in months/quarters etc. The different books allows users to see the keyfigures in different time-based aggregate level.
    But if Heuristic is executed then behaviour will be different. Remember SNP Location Heuristic run uses the bucket of the data view to compute the Net Requirement and then try creating Receipts in each bucket within the time horizon of the data view using suitable master data. So if you run Location Heuristic in the short Term (daily) view then you will have many receipts one per day most likely. If you run in mid-term Weekly view then there are less number of receipts one receipt per week till 7 months. likewise for the long term view.
    SNP horizon is 35 days and the short term book is 30 days long, in which SNP does nothing. What's the use of this book?
    Maybe just to see the data. Location Heuristic run will not generate any new receipt.
    Thanks,
    Somnath

  • Short term planning & long term Planning

    Hi PP Guru's
    !  . I have scenario like this I am having many trading Plant and the requirements are collected and Sales person preparing VA31
    Scheduling agreement for 1 week ( Short term ) also for 10 weeks ( long term ). In trading plant ( planning  / delivery plant ) there
    is no master data other than material master is Maintained in SAP system 
    2  . I am having Production Plant  and  need  to address this requirement May be through SPk 40 .
       My question is How the requirement should I transfer whether i need to manually create manually PIR and copy into Production
       Plant or is there any other way to transfer the requirements from SA ( VA31 )
    3. I want to adopt planniing strategy 52 - Planning without Final assembly because my Planning of certain SFG Procured externally
       should not trigger as per my FG requirements but as per my rolling Plan for 10 weeks for which I am PR having from MRP for
       Long term procurement material which is having lead time say 2 Months I am converting PR into PO using ME59N transaction with
      weekly Lot size .
    4.  For Short term Procurement material I have lot size as TB which is having less lead time say 2 - 5 days max.
    Could you please tell me using this strategy 52 how my PIR will consume and  Reduce and in which stage . If i am doing PGI using
    641 Movement type from Production Plant and PGR using 101 movement type .
    5. For my Procurement for Long term with A class material how can I reduce my inventory may be space constraint and Cost
       Constraint how can I receive this material for my Production.
    Marks will be awarded with Max for right answer
    Regards,
    jaya

    Hi,
    Hope you know the rules of the forum too many questions in single thread is not permitted.
    kindly break them to get proper reply.

  • Short term and Long-term inspection and characteristic

    Hi all,
    In the SAP portal, they mentioned about Long-Term Inspection with Long-Term Characteristic, and Short-Term Inspectoin with Short-Term Characteristic.
    May I know what is the usage on the above and how to setup in the system?
    Thanks
    YY

    Long Term Characteristics Indicator is marked in the Control Indicators Tab of an MIC.
    Long Term Inspection is used when the Business Requirement is to do Results Recording after Usage Decision.
    In normal circumstances, i.e. Short Term Inspection, system won't allow us to do RR once UD is given.
    Best Regards,
    K. Raghavendra Nayak

  • Long term x short term characteristics

    Dear colleagues,
    Easy one.
    Where exactly to check if the characteristic to be checked is a shor term one or a long term one ?
    Regards
    Fernando Luz

    QP03->enter material->plant->enter>go to char level>select mic/char->go to control indicator--->check whether "Long term inspection is ticked" if not its short term.
    There could be another ways also but this is how we see from inspection plan.

Maybe you are looking for

  • Print Layout Designer - inconsistent output

    Hi, We have received consistent compaint from our client that the output of Print Layout Designer are inconsistent. Eg: The same PLD template is used for An invoice print out from 2 different workstation.  However, workstation A display the format pr

  • Sql reporting services stops every 24 hours for a short time then restarts

    I have noticed that recently in sccm 2012 sp1 the sql reporting services stops every morning at 7:58 am and restarts after a minute or two.  The only entry in the event logs is when it stops.  I don't see anything tied in with it that stops or starts

  • Invalid Column Index Error

    Hi all, I am trying to create a new report using 1. Crystal Report XI 2. Oracle 9i 3. A stored Procedure 4. JDBC connection. But i could not do it. Invalid Column index error is coming. Can anyone help. Thanks Saravanakumar.

  • Update Long Text of Production Order

    Hi ABAP Gurus, We want to update some information in long text automatically while releasing production order. We try PPCO0007 We found that we must update AUFK-LTEXT as 'E' then we can see long text via CO02, CO03. Without updating AUFK-LTEXT, even

  • Table-driven combination categorization

    I have a working report that has a gt_vbap internal table with only two columns; VBELN and MVGR3.  A given order (VBELN) can have multiple rows in gt_vbap for a combination of kits (a MVGR3 code is used to represent each kit) that might be bought on