How Long Can I cache JMS Connection ?

Hi
My servlets need to send messages to queues. For speed, I am creating and caching JMS connection and queue session in the servlet's init() method. The questions are
1) Will the queue session or connection time out after a couple of days , assumimg the servlet never gets unloaded/reloaded in that period?
2)Is there a way to figure out a connection /session status before trying to create a sender and catching exceptions ?
Regards
-m

Hi,
The connections do expire after few days hence the easiest way would be to have a double check ....ie.. as you are caching the connection and when ure trying to create a session from the connection keep a try-catch to determine if the connection has expired and if yes then you can create a new connection and cache it again. Now you can use this cached connection to create the sessions .
Hope this helps
neo

Similar Messages

  • Cannot boot! Cannot charge! How long can we support for RIM?

    First of all, I am very disappointed to RIM
    From the beginning to now I have used many BlackBerry mobile phone, RIM has been rigorous work and good service. But since I used 9520, now playbook, lets me lose confidence to the RIM, this is real
    The escalation of the 668 systems, playbook can not boot, countless toss, numerous times to restart, no solution . After friends advice, finally able to boot.
    I don't know such a famous company, before the update products, why there will be such a mistake.
    Boot problem is solved, but then again, playbook does not charge, still numerous toss, numerous times to restart, power is reduced from 20% to the present 0%. until now still can not solve.
    I don't know, so rigorous style of a company, why not on major issues, the first time to give solutions for every user. Why???
    How long can we support for rim? Maybe every user heart will understand.
    Add content:
    Not charging performance:
    In addition to power has no change and in reducing, other phenomenon are exactly the same than a normal machines
    No matter how I restart the device, how to charge, all have no effect
    Try method:
    every 4 minutes hold "power+v-+v+“(three key)to restart; replacement charger plug; the mode of standby charging; continuous plug-in charger; after connecting DBS to connect the charger; continuous charging hours;
    The above methods are fellow Netizens suggestions, but no one can save my playbook.
    RIM, can you tell me how to do?

    why did not have anybody, do something?

  • I ordered a battery for my laptop because it said to replace battery soon.  How long can I let the new battery sit around as I wait for the old one to run out of more charge?

    I ordered a battery for my laptop because it said to replace battery soon.  How long can I let the new battery sit around as I wait for the old one to run out of more charge?  Will the new one become less effective if it sits around too long?

    How much capacity is remaining on your current battery?
    Check your power status
    From the  menu: Hold OPTION and click System Information... èHardware è Power
    Copy and Paste in your reply.
    The new battery will become less effective if you store it in a hot or humid environment. It should be stored at room temperature (22 C).
    Long term storage (6 months):
    Apple recommends that you store the battery with a 50% charge. If you store a battery when it’s fully discharged, it could fall into a deep discharge state, which renders it incapable of holding any charge. Conversely, if you store it fully charged for an extended period of time, the battery may experience some loss of battery capacity, meaning it will have a shorter life.
    http://www.apple.com/batteries/

  • How long can the Mini DisplayPort to VGA Adapter last?

    Hi,
    I've been using Mini DisplayPort to VGA Adapter (genuine) for a year now but not everyday. Yesterday I bought a new display that needs this adapter, so now is the time that it will be used everyday. I was wondering how long can it last (or operational hours) if it were to sit in the same place, not unplugged, with an average use of 4 hours a day?
    Thanks
    PS. This one: http://store.apple.com/us/product/MB572Z/B/mini-displayport-to-vga-adapter.

    This is impossible to predict.
    Sometime cables last a lifetime, sometimes they fail in short order.

  • How long does it take to connect to Wi-Fi the first time I use my Ipad? It's been over 30 minutes. I see that it wants to connect but it keeps on turning.

    How long does it take to connect to Wi-Fi the first time I use my Ipad? It's been over 30 minutes. I see that it wants to connect but it keeps on turning.

    It should not take very long. Up to thirty seconds tops depending on your Wi-Fi network.
    Try rebooting your Wi-Fi router. Turn off the router for 30 seconds then turn it back on. After the router completes its startup routine and indicates a good connection to the internet start you iPad again and see if it will connect.
    If you still have problems you might try connecting to a different Wi-Fi network. Maybe one at your local coffee shop or library.

  • How i can make  my own connection in java source of a jsp page

    How i can make my own connection in java source of a jsp page (How to get connection from JNDI datasource address) ?
    imagine that i have a rowset in a web page , now i want to do some operation using
    plain JDBC , so i will need a connection object.
    I tried to get one of my rowsets connection but it return null ?
    what is best way to retrive a connection from JNDI datasource that we define for our project?
    for example if i have
    myRowSet.setDataSourceName("java:comp/env/jdbc/be");
    in web page constructor
    now i want a pure connection from the same datasource ? JNDI
    Thank you

    It is not hard to get your own connection from datasource.
    in your case you need to do like the the following code.
    i provide sample to show you how to catch the exception and create an statement .
    Connection con =null;
    try{
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/be");
    con = ds.getConnection();
    java.sql.Statement st =con.createStatement();
    }catch(SQLException sqlex){
    sqlex.printStackTrace();
    sqlex.getNextException().printStackTrace();
    catch(NamingException nex){
    nex.printStackTrace();
    hth
    Masoud kalali

  • HT1390 How long can you keep a movie rental, once it's downloaded? Do u need wifi to watch it?

    How long can you keep a movie rental, once it's downloaded? Do u need wifi to watch it?

    As long as it's been fully downloaded then you shouldn't need to be online in order to watch it.
    As to how long you have to watch it, from here :
    You have 30 days from the time of rental to watch your movie, and 24 hours (in the US) or 48 hours (elsewhere) after you've started viewing to finish it. Once the rental period expires, the movie will disappear from your iTunes library.

  • How long can Apple photo books be expected to last?

    How long can Apple photo books be expected to last?  Given the type of ink and paper used, what can we expect these books to look like in 10 years?  20 years?  100 years?

    Until you spill red wine on them
    Here are the specs Apple publishes on the books
    LN

  • How long can i use the iwork beta in icloud?

    how long can i use iwork beta in icloud?

    As long as Apple continues to make it available or until they decide to charge a price for the service which you are not willing to pay.
    An earlier incarnation, iwork.com, was available from January 2009 until July 2012.  It was always free.

  • How long can Pub and Sub have loss of communication?

    We have the following clusters:
    UCCX System version: 8.5.1.11004-25
    CUCM System version: 8.6.2.22900-9
    My understanding is that UCCX cluster can loose communication for 48 hrs, then there are issues with the database? Is this correct?
    How long can a Publisher and Subscriber be out of communication before there are database problems, or a rebuild is needed?
    I have heard that more than 48 hours, a manual resync is needed. What if it is seven days?
    Does the Sub need to just be rebuilt?
    Do the same rules hold true for CUCM?                 

    Hi markala,
    As per the End User License Agreement a single purchase of retail license for Acrobat is good for 2 computers.
    If you want to install it on 3 machines you need to procure a volume license.
    Regards,
    Rave

  • How long can you revert back to the original photo after cropping?

    Is there any time limit for how long can you revert back to the original photo after cropping? Are you always able to revert back?
    Thanks.

    DAM = "Digital Asset Manager", a fancy name for a filing system.
    iPhoto keeps the original and makes one (usually much smaller) copy based on your edits. It is non-destructive in that if you crop, and later change the color, iPhoto will go back to the original and apply the corrections to get the new image, it will not simply modify the preview.
    If you want a high quality copy of the image, use the export function which allows you to specify the size and compression.

  • How long can the data in PSA be kept?

    Hello all,
    If a PSA is used for data staging, how long can/should the data be kept in it in a real-time scenario?
    Your help will be very much appreciated,
    points will be awarded too.
    Thanks
    S N

    HI ,
    It always depends on the Frequency of data load and the retention of the data in the system . Ideally we only keep 2 days of data in PSA in case of full load and then keep all the delta loads in the PSA including the Intialization Request in the PSA , so that any problem occurs we can load the data from PSA .
    But before all that u need to diccuss with ur basis team regarding space or table space . And according to that u need to keep the requests in System.
    Assign points if it helps....
    Regards,
    Vijay

  • I Did Not Upgrade to iOS 7 (Thank Goodness).  How Long Can I Continue to Use iOS 6?

    I've only been an iPhone user for a couple of years.  Up until this "upgrade" things have been fairly acceptable.  After reading all of the push-back on iOS 7 and seeing a couple of friends' phones that were upgraded, there is no way I'm upgrading.  I'm eligible for a new phone with Verizon now and before making a decision, I'm going to take some time looking at options.  My question is, how long can I use my 4s with iOS 6 installed before things stop working?  I use a couple of very serious apps on my iPhone that I need for work (weather-related) and I'd like to make sure that they are still functional while I look for options.  Any idea how long before things just stop working?  Can one go indefinitely, as long as one doesn't upgrade the apps too?    Thanks for any insight.

    You can use it as long as your apps are supported and you dont need to restore your phone. I have an iPod 4 that I cant update on and my apps are slowly becoming out of date. As apps are updated for ios 7 some updates may not be compadible with ios 6 so if you really need an app to update good luck. If you phone is broke or something and has to be restored when you restore it it will be automatically updated to ios 7.
    MACOSX24

  • I just cancled an order.How long can I receive the refund?

    How long can I recieve the refund?

    The charge you would be seeing is a "Authorization Hold" on your funds, it isn't an amount that Apple has taken out of your account, it is so they know you have adequate funds to cover the goods that you are purchasing. It can take up to a month for this "Authorization Hold" to be removed.

  • HT1657 For how long can i keep a rental movie?

    For how long can you keep a rental movies ?

    Thirty days from the day of purchase, or 24/48 hours from the time you start playing it, whichever comes first.
    (73214)

Maybe you are looking for

  • Colour shift from Snow Leopard to Lion

    I initially noticed this problem within Lion and Lightroom 4 when printing to my Epson 4800. The colour shifts to a more pinkish hue in prints done in Lion. I'd originally thought this was unique to Lightroom, but the same thing happens to the same f

  • /usr/cluster/lib/amd64/libdsdev.so.1: symbol free_rpc_args: referenced symb

    We are running SC 3.2 on AMD 64 We keep getting this relocation error: file /usr/cluster/lib/amd64/libdsdev.so.1: symbol free_rpc_args: referenced symbol not found are we missing any patch. Thanks a lot bash-3.00# scswitch -e -j ms-server ld.so.1: im

  • Where can i get MiniSap?

    Hi guys, Do you know where i can get MiniSap for my own practice and learning purpose? P/S: Sometimes after work, i would like to get access to ABAP Workbench Editor too. Does anyone know what are the tools i can use to practice my ABAP after work? T

  • Iprocurement how to view po number need purchase order number immediately

    we are configuring i procurement... when we select need po number immediately you can see the message reserve po #..... but it appears if you dont write it down at that time it is not displayed anywhere.. i would expect the user to see the requisitio

  • WAP321 clustering question

    I have two WAP321s at one of my offices.  They are in a cluster.  When an end-user connects, they do not see each WAP, they just see the cluster name unser "available wireless networks."  How does the cluster "decide" which WAP a user will connect to