How long load-on-startup servlet stays in weblogic6.1 sp2

does anybody know how long a load-on-startup servlet exists (before
          gets destroyed) in weblogic6.1 sp2. What i want is in load-on-startup
          servlet, I want to schedule a java.util.Timer and when application
          gets undeployed, i want to cancel that timer. if load-on-startup
          servlet exists for the whole application life span then i could do
          timer.cancel() on the destroy method of load-on-startup servlet.
          any suggestion?
          thanks in adv,
          soumik
          

You can simply use ServletContextListener instead - that way you do not
          have to worry if (or when) WebLogic decides to destroy the servlet.
          soumik <[email protected]> wrote:
          > does anybody know how long a load-on-startup servlet exists (before
          > gets destroyed) in weblogic6.1 sp2. What i want is in load-on-startup
          > servlet, I want to schedule a java.util.Timer and when application
          > gets undeployed, i want to cancel that timer. if load-on-startup
          > servlet exists for the whole application life span then i could do
          > timer.cancel() on the destroy method of load-on-startup servlet.
          > any suggestion?
          > thanks in adv,
          > soumik
          Dimitri
          

Similar Messages

  • Load on startup servlet and references

              Weblogic 6.1 SP2
              No jars specified in the classpath. A Singleton is located in a utility.jar file
              inside a .ear file.
              If I create a Singleton from a load on startup servlet, how long will the singleton
              be around? I know that if I undeploy the application, the singleton will be destroyed
              since the classloader is unloaded. However, if I never undeploy my application,
              will the Singleton always be around? Does Weblogic keep a reference alive to
              this Singleton forever?
              Please provide some more details on this!
              Thanks.
              Dan
              

              Dan Baumbach wrote:
              > So, because the startup servlet has a static reference to the singleton, the servlet
              > will never be garbage collected?
              Correct.
              >
              >
              > What if there's a class that is not a singleton, but there are static methods.
              > How would garbage collection work in this case?
              >
              A class object is not an instance object. If the class object has been loaded by the
              classloader, it will not be unloaded or garbage collected, regardless of whether or not
              it has static methods. If an instance of a class is instatiated on the heap, and a
              reference to that object is placed in a static member of its associated class object,
              also referred to as a class member, then the instance will not be garbage collected.
              >
              > Thanks.
              > Dan
              >
              > William Kemp <[email protected]> wrote:
              > >The jvm will not garbage collect an object that has a static reference
              > >to it. Which is how
              > >I am assuming you have implemented the singleton.
              > >
              > >Bill
              > >
              > >Dan Baumbach wrote:
              > >
              > >> Weblogic 6.1 SP2
              > >> No jars specified in the classpath. A Singleton is located in a utility.jar
              > >file
              > >> inside a .ear file.
              > >>
              > >> If I create a Singleton from a load on startup servlet, how long will
              > >the singleton
              > >> be around? I know that if I undeploy the application, the singleton
              > >will be destroyed
              > >> since the classloader is unloaded. However, if I never undeploy my
              > >application,
              > >> will the Singleton always be around? Does Weblogic keep a reference
              > >alive to
              > >> this Singleton forever?
              > >>
              > >> Please provide some more details on this!
              > >> Thanks.
              > >> Dan
              > >
              

  • "load-on-startup" servlet configuration

    Dear All,
    I am trying to load a servlet "SettingServlet" at the startup of the application, the configuration I am using inside the web.xml file is as following:
    <web-app>
         <servlet>
         <servlet-name>SettingsServlet</servlet-name>
         <servlet-class>com.myPack.SettingsServlet</servlet-class>
         <init-param>
         <param-name>fichierConfig</param-name>
         <param-value>D:/tomcat41/webapps/init.conf</param-value>
         </init-param>
         <load-on-startup>5</load-on-startup>
         </servlet>
    </web-app>
    It seems that the "SettingsServlet" servlet is not started at the startup.Even it's started in the tomcat window I am getting something like
    (SEVERE: Parse error at line......column...:Element type ....not declared ..)
    and that for the servlet-name, parma-name,servlet-class, init-param...etc
    Do I missed something in the configuration?, please tcheck the few lines above. because Simply I got stuck ! ,,,,,Please help me to fix it, I am waiting for you reply guys.
    Thanks and Regards,
    kifwet

    Take a look at the header of your web.xml file, the part about:<!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd"> And go check the dtd for your version.
    Some versions are very picky about the order of parameters.
    Hope this helps.

  • How long can lync video call stay active?

    I tried to setup 2 client and wanted to see how long they can keep active with the video call
    The 2 clients are Linux UBUNTU 12.xxx + ICA 13.1; Lync server/client 2010
    I connect to 2 different desktops from the 2 clients, video call one between each other
    It kept alive for about 2-3 hours, and then the video call is terminated by itself with message e.g. "the user has no response"...... the desktop connections are fine
    I tried at least 3 times and it is always the same result
    Any idea if this is one of the lync limitation e.g. video call can only stay alive for 2-3 consecutive hours?

    There is no hard set limit.  The video call could potentially go on indefinitely assuming no outside (ex: network or client issues) interference.
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications
    This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How long should my ipod touch stay in rice for?

    i left my ipod in my hoodie when it got washed and it still works how long should i put it into rice for?

    I would leave it in for a week and periodically change the rice.

  • How long do you have to stay away to be treated like a new customer?

    Comcast offers these great deals to new customers, but won't do anything to try to retain loyal customers who are sick of their bills increasing. Right now I am paying $30 more per month for internet only than a new customer would pay for the same internet speed, plus local channels and HBO. Customer service won't do anything to help, other than offer to downgrade my internet speed. How long do I have to not be a customer to be treated the way they treat new customers?

    shannons1-
    I apologize for the delayed response. I have sent you a private message regarding your concerns.
    In order to view the private message:
    Click on my name (Comcastcares) and click on "Private Message Me”. 
    At the top of each Forum page you will see a small envelope 
    This is the icon for Private Messages, referred to as ‘PM’s’. A Private Message is a way to communicate in private, to another User, Moderator, or Administrator out of public view in the Forums.
    The gray envelope icon will have a number next to it if you have any new messages waiting. 
    To open a PM to read it, double click on the envelope. If you click on the white envelope a window will open with tabs for your Private Message Inbox, Sent Messages, Friends, Ignored Users, and Compose new Message. You can also access this area by clicking on the Username in a Thread or post. By default, Private Messages are enabled. You can disable this feature in My Settings>Preferences> Private Messenger.

  • How long the messages in SXMB_MONI stay ?

    Hi All,
    In SXMB_ADM, the following parameter is set DELETE PERSSIT_DURATION for ASYNC messages for 21 days,
    but still I am able to see the ASYNC messages in SXMB_MONI which are more then 50 days old,
    how is this possible ? we do not do any archiving of messages,is there any other parameter which
    rules the duration of messages in SXMB_MONI...
    Please suggest me....
    The second issue is we are able to see July month messages for all the interfaces except for one interface,
    and now the consultant is asking me the reason for it...
    Thanking you in adance.
    Our server version is XI 3.0 (SP19)
    Regards
    Sonali

    Hi Sonali,
    The messages in SXMB_MONI gets archived and deleted when you schedule the archiving and deletion jobs.
    These jobs can be scheduled for each interface.
    I think the archiving and deletion jobs are running for a particular interface for which you are not able to see the messages.
    You can check if the archiving and deletion jobs are running using transaction SM37. The jobs will run with name ARCHIVE and DELETE
    Check in SXMB_ADMIN if the interfaces and retention periods are set for archiving.
    Best Regards
    Raghu

  • How long should my iphone 5c stay charged?

    My iphone 5c does not stay charged for 24hrs. I have to charge it twice a day. When I had the iphone 4, I only charged it once every 24hrs. I've taken it back to the store twice now, and it's still loosing it's charge very quickly.

    Please get the iPhone iOS 4 user guide.

  • Can't get Servlet to Load On Startup

              I am trying to get a servlet to run at startup, and I have put the xml below in WEB-INF/web.xml to make this happen, but it is not working. The servlet does not run at startup.
              Anybody have any idea what the problem is?
              <servlet>
                   <servlet-name>Cocoon</servlet-name>
                   <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
                   <init-param>
                        <param-name>properties</param-name>
                        <param-value>./WEB-INF/cocoon.properties</param-value>
                   </init-param>
                   <load-on-startup/>
              </servlet>
              <servlet-mapping>
                   <servlet-name>Cocoon</servlet-name>
                   <url-pattern>*.xml</url-pattern>
              </servlet-mapping>
              ALSO, The servlet in this case is the Cocoon servlet, and the reason I am trying to get it to run at startup is because in my application I am calling it from another servlet, instead of through a direct call to an *.xml file, and so it requires a direct call to Initialize the Cocoon Engine. So, if anyone knows anything about how to solve this problem, that would also be helpful.
              Thanks.
              Harris.
              

              Thank you!
              That worked.
              Ruslan Bilorusets <[email protected]> wrote:
              >Harris,
              >
              >Please, try to specify a value for the <load-on-startup> element. It looks like a bug in our code.
              >
              >So,
              ><load-on-startup>1</load-on-startup>
              >should do the trick.
              >
              >Thanks,
              >-ruslan
              >
              >harris wrote:
              >
              >> I am trying to get a servlet to run at startup, and I have put the xml below in WEB-INF/web.xml to make this happen, but it is not working. The servlet does not run at startup.
              >>
              >> Anybody have any idea what the problem is?
              >>
              >> <servlet>
              >> <servlet-name>Cocoon</servlet-name>
              >> <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
              >> <init-param>
              >> <param-name>properties</param-name>
              >> <param-value>./WEB-INF/cocoon.properties</param-value>
              >> </init-param>
              >> <load-on-startup/>
              >> </servlet>
              >> <servlet-mapping>
              >> <servlet-name>Cocoon</servlet-name>
              >> <url-pattern>*.xml</url-pattern>
              >> </servlet-mapping>
              >>
              >> ALSO, The servlet in this case is the Cocoon servlet, and the reason I am trying to get it to run at startup is because in my application I am calling it from another servlet, instead of through a direct call to an *.xml file, and so it requires a direct call to Initialize the Cocoon Engine. So, if anyone knows anything about how to solve this problem, that would also be helpful.
              >>
              >> Thanks.
              >> Harris.
              >
              

  • HT1212 How long does an ipod stay disabled?

    How long does an iPod touch stay disabled?

    As long as it says on the screen. If it also says connect to iTunes then yo have to restore via iTunes to regain use of the iPod
    Disabled
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • How long should Printer stay on

    Hi I have an HP Officejet Pro 8500A e-All-in-One Printer, and I was wondering how long does it need to stay on.  Because I noticed that if I leave it on over night, and if I use it the next day it won't work.  And I have to actually go and unplug it from the wall because the power button is frozen. Do I need to turn it off every night before I go to bed, or should this not be happeneing?

    It's perfectly safe to leave your Powerbook on indefinitely, provided that it's connected to AC power, and it's given plenty of airspace around and particularly underneath it to enable it to cool itself as needed.
    What sort of download are you embarking on, that's going to take several days? If I were you, I'd certainly look for an alternate way of obtaining the file(s) rather than expect my internet connection to hold up without interruption for that long.

  • Once an updated image, photo, text is sent into the cloud, and it connects with the other devices, how long does it stay in the cloud?

    I've updated my iPhone4 with IOS5, and both my MacBook Pro and iMac with Lion.  If I wish to use iCloud or Cloud, and want to share with other devices something like a note on the iPhone, with my iMac, say for editing reasons; once the item gets to the other device(s), how long does the shared item stay in the cloud?  And, can it be removed to free up space or is it always there in whatever version?

    Poulton-le-Fylde, UK
    Do I have a choice as to what actually gets transferred into the cloud or does it take what it wants?  What if I don't care to share particular data with another device, does the cloud take it anyway?

  • How to load a java class when application is at first time browsed.

    Hi
    How can i load a simple java class on application startup.
    For servlet it could be done using "load on startup" tag in web.xml
    but how could the same be achieved for a simple java class.
    Thanks

    Hi
    Code is given below....
    package com;
    import java.io.IOException;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class Test {
    Test()
         HttpServletRequest request=null;
         HttpServletResponse response=null;
         RequestDispatcher requestDispatcher = request.getRequestDispatcher("a.jsp");
         try {
              requestDispatcher.forward(request,response);
         } catch (ServletException e) {
              System.out.println("success");
              e.printStackTrace();
         } catch (IOException e) {
              System.out.println("success 1");
              e.printStackTrace();
         finally
              System.out.println("success 2");
         System.out.println("success 3");
    }Web.xml :
    <servlet>
            <servlet-name>simple</servlet-name>
            <servlet-class>com.Test</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
      <servlet-mapping>
          <servlet-name>simple</servlet-name>
          <url-pattern>/init.do</url-pattern>
        </servlet-mapping>Error Trace :
    org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /DispatcherTest threw load() exception
    java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class com.Test with modifiers ""
         at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
         at java.lang.Class.newInstance0(Class.java:344)
         at java.lang.Class.newInstance(Class.java:303)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
         at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1069)
         at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1162)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1304)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
         at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
         at java.lang.Thread.run(Thread.java:595)

  • How long is boot up time?

    I just installed mac... (NOT on a PC)
    It is at the light gray screen with the dark gray apple and the gray spinner. It is looking pretty gray
    It has been "booting" for a while, and how long is the startup on first boot for tiger?
    mitch9654

    Then off hand I'd say the installation failed. Here's a suggestion.
    Repartition and reformat your hard drive as follows:
    Extended Hard Drive Preparation
    1. Boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger or Leopard.)
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area. If it does not say "Verified" then the drive is failing or has failed and will need replacing. SMART info will not be reported on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID (for Intel Macs) or APM (for PPC Macs) then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    When formatting has completed quit DU and return to the installer. Now do a new install. Unless there's a hardware issue this should get you working.
    BTW, since your question relates to Tiger (I think) you should post in the Tiger forums instead of the Panther and earlier (namely, here.) Not a big deal for now, but in the future.

  • load-on-startup problem

    Hai all,
    I want to run a servlet on start up
    i did following
    1) Add following to web.xml
    <servlet>
    <servlet-name>Schedular</servlet-name>
    <servlet-class>com.abc.xyz.Schedular</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    2) copied the file to com.abc.xyz
    but when i restarting iam getting following errror
    Cannot load Servlet name
    my java files shown below....am around it
    import java.util.Timer;
    import java.util.TimerTask;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Schedular extends HttpServlet {
    Timer timer;
    public Schedular(int seconds) {
    timer = new Timer();
    timer.schedule(new RemindTask(), seconds*1000);
    class RemindTask extends TimerTask {
    public void run() {
    System.out.println("hai !");
    timer.cancel(); //Terminate the timer thread
    public void init(ServletConfig config) throws ServletException {
         super.init(config);
    System.out.println("About to schedule task.");
    new Schedular(5);
    System.out.println("Task scheduled.");
    public void service(HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException
                   System.out.println("servee.");
    }

    In web.xml, you say the servlet class is com.abc.xyz.Schedular but your servlet isn't in the package.
    You need to add the following to your servlet...
    package com.abc.xyz;Hope this helps,
    JEB

Maybe you are looking for