Order of starting startup classes

I am using WLS 4.5. Is there a way to tell the server in which order to
start the startup classes?
I have tried putting them in certain order in the properties file, but that
certainly does not
do it. Any other tricks?

per the WLS 4.5.1 documentation you can start the classes in a specific
order by putting them in the same line in the properties file separated by
commas.
e.g.
virtual class name= class A, class B, class C
Read the part on start up classes in the doc on the WebLogic properties
file.
farnaz <[email protected]> wrote in message
news:8i5nph$ifu$[email protected]..
I am using WLS 4.5. Is there a way to tell the server in which order to
start the startup classes?
I have tried putting them in certain order in the properties file, butthat
certainly does not
do it. Any other tricks?

Similar Messages

  • Cannot start Startup class in WL6.0

    Hi, I have a question regarding the startup class with WL6.0. here is the config.xml:
    =================================================================
    <StartupClass
    Arguments="connectionFactory=javax.jms.QueueConnectionFactory,queue=com.lasso.email.emailQueue"
    ClassName="com.lasso.service.mail.StartupEmailSender"
    FailureIsFatal="true" Name="EmailSender" Targets="localserver"/>
    <StartupClass Arguments="" ClassName="com.lasso.util.StartupLoad"
    FailureIsFatal="true" Name="StartupLoad1" Targets="localserver"/>
    <Security Name="lassov2" PasswordPolicy="wl_default_password_policy" Realm="wl_default_realm"/>
    ================================================================
    Here is what I got after start weblogic server 6.0:
    ================================================================
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <WebLogic Server started>
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <ListenThread listening
    o
    n port 80>
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <SSLListenThread listenin
    g on port 443>
    <Jul 9, 2001 1:50:35 PM CDT> <Error> <Performance Pack> <Unable to load performa
    nce pack, using Java I/O.
    java.lang.ThreadDeath
    >
    <Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer> <ListenThread.run()
    fa
    iled: java.lang.ThreadDeath>
    <Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer> <The WebLogic Server
    i
    s no longer listening for connections. You should probably restart it.>
    <Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <Server shutdown has been
    requested by system>
    <Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <The shutdown sequence has
    been initiated.>
    <Jul 9, 2001 1:50:58 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '0' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '1' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '2' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '3' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '4' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    : '5' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
    ==============================================================
    What can I do to start those StartUp classes successfully?
    Thanks.
    Alan Zhang

    Seems like your startup class is generating error that causing wl to
    shutdown. This is because you told wls that you don't want it to start if
    your startup class fails (FailureIsFatal="true" ).
    Take a look at your startup calss and see why is it failing...
    .raja
    "Alan Zhang" <[email protected]> wrote in message
    news:[email protected]...
    >
    Hi, I have a question regarding the startup class with WL6.0. here is theconfig.xml:
    =================================================================
    <StartupClass
    Arguments="connectionFactory=javax.jms.QueueConnectionFactory,queue=com.lass
    o.email.emailQueue"
    ClassName="com.lasso.service.mail.StartupEmailSender"
    FailureIsFatal="true" Name="EmailSender" Targets="localserver"/>
    <StartupClass Arguments="" ClassName="com.lasso.util.StartupLoad"
    FailureIsFatal="true" Name="StartupLoad1" Targets="localserver"/>
    <Security Name="lassov2" PasswordPolicy="wl_default_password_policy"Realm="wl_default_realm"/>
    ================================================================
    Here is what I got after start weblogic server 6.0:
    ================================================================
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <WebLogic Serverstarted>
    >
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <ListenThreadlistening
    o
    n port 80>
    <Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <SSLListenThreadlistenin
    g on port 443>
    <Jul 9, 2001 1:50:35 PM CDT> <Error> <Performance Pack> <Unable to loadperforma
    nce pack, using Java I/O.
    java.lang.ThreadDeath
    >
    <Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer><ListenThread.run()
    fa
    iled: java.lang.ThreadDeath>
    <Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer> <The WebLogicServer
    i
    s no longer listening for connections. You should probably restart it.>
    <Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <Server shutdown hasbeen
    requested by system>
    <Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <The shutdownsequence has
    been initiated.>
    <Jul 9, 2001 1:50:58 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '0' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '1' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '2' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '3' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '4' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    : '5' for queue: 'default'' stopped.>
    <Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
    ==============================================================
    What can I do to start those StartUp classes successfully?
    Thanks.
    Alan Zhang

  • Startup classes order

    How can I ensure the execution order of startup classes?? I want to run startupclass1
    before startupclass2..

    Dimitri,
    Upon second glance at my reply, I noticed I "mis-spoke" part of it. We want
    the system administratord who control the directories to be able to change the
    values in config.xml, not have control over the properties files.
    We could use a higher priority startup-servlet for that, but then our system
    administrators would have to edit the deployment descriptors of those servlets,
    rebuild them, and redeploy them (and then the server has to be restarted anyway
    to force all the deployed component to pick up the new values).
    It just strikes me that the startup class provides this functionality much
    more elegantly. They can just change the startup parameters in the console and
    restart the server.
    Jason
    "Jason Titus" <[email protected]> wrote:
    >
    Dimitri,
    Thanks for this information. Here are the details of my situation.
    I am trying to set some values in the startup class that all applications
    can
    me use of, by putting them in a singleton. Currently we are using the
    following
    values: a directory from which configuration files can be read, a directory
    into
    which output files can be put.
    The reason for this is that we are keeping our properties files out
    of the
    components so the components don't have to be rebuilt when we move from
    test to
    integration to production. We can simply get a different version of
    the properties
    files from configuration management as part of the deployment process.
    This also
    lets us expose just the properties files to the system administrators
    who impact
    those directories.
    With this scheme in place, my servlet initialization can configure
    itself by
    loading its specific property file from the directory passed to the startup
    class
    based on the config.xml. Once it has the configuration, it can access
    the database
    and cache application general data before the first request is placed
    to the servlet.
    Does that sounds reasonable?
    Jason
    Dimitri Rakitine <[email protected]> wrote:
    I think that startup classes are executed after applications etc are
    deployed and
    right before server starts servicing client requests.
    Why do you need startup classes at all? load-on-startup servlets are
    a much nicer
    replacement, which solves lots of problems associated with startup classes.
    Jason Titus <[email protected]> wrote:
    According to this document, you should be able to set a startup deploymentorder
    for your startup classes.
    I have a servlet that is also initialized at startup, which seems
    to
    always get
    initialized before the startup class methods are called. I've triedchanging
    both the deployment order for the startup class in the console, aswell as the
    servlet deployment descriptor value its priority. I can't get thestartup to
    go first.
    Any suggestions?
    Thanks for your help.
    Jason
    "Michael Girdley" <[email protected]> wrote:
    Check this out:
    http://e-docs.bea.com/wls/docs61///////ConsoleHelp/startupclass.html
    Michael Girdley
    BEA Systems
    Learning WebLogic? Buy the book:
    http://www.learnweblogic.com/
    At Amazon:
    http://www.amazon.com/exec/obidos/ASIN/0130911119/learnweblogic/103-6817548-
    3834229
    "Rajan" <[email protected]> wrote in message
    news:[email protected]...
    How can I ensure the execution order of startup classes?? I want
    to
    run
    startupclass1
    before startupclass2..
    Dimitri

  • Startup class (weblogic.system.startupClass) ordering

    I have several classes in weblogic 4.5.1. that startup via
    weblogic.system.startupClass
    Unfortunately, I have found that I cannot control the ordering in which
    these
    classes are started. In fact, the startup ordering seems completely
    independent of the the ordering of these commands in
    weblogic.properties.
    Is it possible to control the startup ordering? Thanks in advance for
    your help!
    -hjk

    How is this done in weblogic 6.0 ?
    Thanks
    Kalpesh
    "Michael Girdley" <[email protected]> wrote:
    http://www.weblogic.com/docs51/admindocs/properties.html#startup
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    Hyung-Jin Kim <[email protected]> wrote in message
    news:[email protected]..
    I have several classes in weblogic 4.5.1. that startup via
    weblogic.system.startupClass
    Unfortunately, I have found that I cannot control the ordering in which
    these
    classes are started. In fact, the startup ordering seems completely
    independent of the the ordering of these commands in
    weblogic.properties.
    Is it possible to control the startup ordering? Thanks in advance for
    your help!
    -hjk

  • Ordering startup classes

    I am using startup classes to initially populate my JNDI tree with
    values (Strings) and LinkRefs (to other server JNDI trees).
    * How can I control the order in which the startup classes are invoked?
    Some of my startup classes place values in the JNDI tree. Other startup
    classes take those values and do other things with them. I want to make
    sure the value setters and run before the value users. WLS 5.1 had this
    capability. I don't see it in 6.0
    * How can I get some startup classes to be invoked before EJBs are
    loaded and others to be invoked after EJBs are loaded? I need to setup
    my LinkRefs before the EJBs attempt to build the java:comp/env local
    environment for the EJBs. Other times I need to promote the EJBs Home
    references outside the server. I believe that startup classes only run
    after the EJB instantiations based on 5.1 experience.
    thanks
    jim

    Jim and Joe,
    For the First Question I believe there is a better way of doing with
    making your Startup classes Invoked in the order You wanted and also make
    them J2EE complaint..
    Make your startup classes as start up servlets by registering them in
    web.xml as startup servlets(<load-on-startup>).
    While registering a startup servlet remeber that the element can have a
    optional element. The optional contents of these element must be a positive
    integer indicating the order in which the servlet should be loaded. Lower
    integers are loaded before higherintegers.
    If you need more explanation let me know, I can provide you example on the
    same.
    Kumar.
    jim stafford wrote:
    I am using startup classes to initially populate my JNDI tree with
    values (Strings) and LinkRefs (to other server JNDI trees).
    * How can I control the order in which the startup classes are invoked?
    Some of my startup classes place values in the JNDI tree. Other startup
    classes take those values and do other things with them. I want to make
    sure the value setters and run before the value users. WLS 5.1 had this
    capability. I don't see it in 6.0
    * How can I get some startup classes to be invoked before EJBs are
    loaded and others to be invoked after EJBs are loaded? I need to setup
    my LinkRefs before the EJBs attempt to build the java:comp/env local
    environment for the EJBs. Other times I need to promote the EJBs Home
    references outside the server. I believe that startup classes only run
    after the EJB instantiations based on 5.1 experience.
    thanks
    jim

  • Error when starting opmn with custom startup class

    I'm trying to use jaxb 2.0 classes in my custom oc4j startup class, but when I try to start the container the following error is produced in the logs.
    Exception in thread "OC4J Launcher" java.lang.IllegalAccessError: tried to access class javax.xml.bind.ContextFinder from class javax.xml.bind.JAXBContext
    Can anyone provide some guidance?
    Regards,

    It seems I trying to use jaxb 2.x classes but oas 10.1.3.5 uses jaxb 1.0. Is there anyway to get this to work with jaxb 2.x? The error message I'm receiving now is
    Exception in thread "OC4J Launcher" java.lang.NoSuchMethodError: javax.xml.bind.JAXBContext.newInstance([Ljava/lang/Class;)Ljavax/xml/bind/JAXBContext;
    and if I use the JAXBContext.newInstance("package", this.getClass().getClassLoader());
    I get this:
    javax.xml.bind.JAXBException: Unable to locate jaxb.properties for package mil.usmc.mol.mbeans
    10/02/23 13:03:08 at javax.xml.bind.ContextFinder.searchcontextPath(ContextFinder.java:205)
    10/02/23 13:03:08 at javax.xml.bind.ContextFinder.find(ContextFinder.java:149)
    10/02/23 13:03:08 at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:281)
    Brett

  • Startup Classes w/ Arguments and Startup Order

    Hi,
    I know we can control the order of startup classes by specifying them in a
    comma delimited list like this:
    weblogic.system.startupClass.a=class1,class2,class3
    Now what if class1 and class2 have several startup arguments that I need to
    pass??? I would hate to think that I'll have to write my own startup
    manager just to do this one simple thing?
    So... if anyone knows how to specify startup arguments AND control the order
    of startup classes please let me know...
    Thanks in advance,
    Stephen Earl
    SmartPoint, Inc.

    Hi Don,
    I've attempted to mirror the functionality of the Weblogic startup system
    with no success. Basically I have an xml document specifying the startup
    specifications much like the WL startup system (ie. Description, ClassName,
    Args). To mirror the WL system I apparently need access to StartupThread
    which, like most other WL classes, is undocumented and unexposed for use.
    How would you suggest implementing such functionality??? Considering that
    I'd like to have similar functionality to the current system (ie.
    T3StartupDefs, RMI Servers, etc.) how can I and any other BEA customer
    achieve this short of rewriting the startup mechanism???
    Stephen Earl
    SmartPoint, Inc.
    "Don Ferguson" <[email protected]> wrote in message
    news:[email protected]...
    I have looked over the source code for startup classes and how thearguments
    are processed, and I'm afraid I don't see any mechanism to accomplish what
    you want, i.e., to specify the order that startup classes are executed,
    and provide names-value pairs that are associated with each class.
    You might have to come up with your own mechanism for associating
    arguments with startup classes.
    Anne-Katrin Schroeder-Lanz wrote:
    well, if you absolutely must have identically named args for each class,
    then you're stumped. should you be able to extract any kind of support
    from
    BEA here, I'd appreciate a notification, since we've got the sameproblem to
    deal with.
    happy hacking, anne
    Anne-Katrin Schroeder-Lanz
    Development
    memIQ AG
    T: +49-89-45639-19385
    F: +49-89-45639-33-385
    mailto:[email protected]
    "Stephen Earl" <[email protected]> wrote in message
    news:[email protected]...
    OK... and now say that I have a startup argument called RETRIES. This
    argument needs to be 10 for startup class A and 20 for startup class
    B.
    Now
    way I can see to handle this situation.
    BEA... I've logged a production 3 case regarding this issue and have
    not
    even received an initial response from support. Hello... Hello...
    Steve...
    "Anne-Katrin Schroeder-Lanz" <[email protected]> wrote in message
    news:[email protected]...
    hi,
    just use the startArgs as documented on the list of startup classes
    and
    pass
    a collective list of args, e.g.:
    weblogic.system.startupClass.<logical_name>= xxx.yyy.Foo,
    xxx.yyy.Bar
    weblogic.system.startupArgs.<logical_name>= arg4Foo=some_value,
    arg4Bar=another_value
    hth,
    cheers, anne
    Anne-Katrin Schroeder-Lanz
    Development
    memIQ AG
    T: +49-89-45639-19385
    F: +49-89-45639-33-385
    mailto:[email protected]
    "Stephen Earl" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I know we can control the order of startup classes by specifying
    them
    in
    a
    comma delimited list like this:
    weblogic.system.startupClass.a=class1,class2,class3
    Now what if class1 and class2 have several startup arguments that
    I
    need
    to
    pass??? I would hate to think that I'll have to write my own
    startup
    manager just to do this one simple thing?
    So... if anyone knows how to specify startup arguments AND controlthe
    order
    of startup classes please let me know...
    Thanks in advance,
    Stephen Earl
    SmartPoint, Inc.

  • Controlling Startup Class Order / w/ Parameters

    Hi,
    The ability to control the order of startup classes that have parameters is
    a huge piece of functionality that is missing from WLS 5.1. It it still
    missing from 6.0???
    Steve...

    Hi,
    use a JSF PhaseListener and check teh request in the after restore or befiore apply request phase
    Frank

  • Null argument for startup classes when managered server starts

    Hi Everyone,
    We have a Weblogic 10.3.5 clustering environment. the environment seems to work fine. I am able to have the servers (both Admin and Managed) and deployed applications running without any problems. However, I just notice that, every time when I start the Managered servers, I got the following information in the system log. It appears that they are start-up classes, but with null argument. Are they normal or not?
    Thanks in advance,
    John
    ####<Feb 22, 2012 11:28:27 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928107258> <BEA-000256> <Invoking oracle.dms.wls.DMSShutdown.main(null)>
    ####<Feb 22, 2012 11:28:27 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928107769> <BEA-000256> <Invoking oracle.ias.cache.Shutdown.main(null)>
    ####<Feb 22, 2012 11:40:08 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928808600> <BEA-000256> <Invoking oracle.jrf.wls.JRFStartup.main(null)>
    ####<Feb 22, 2012 11:40:08 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928808682> <BEA-000256> <Invoking oracle.security.jps.wls.JpsWlsStartupClass.main(null)>
    ####<Feb 22, 2012 11:40:08 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928808790> <BEA-000256> <Invoking oracle.core.ojdl.weblogic.ODLConfiguration.main(null)>
    ####<Feb 22, 2012 11:40:17 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928817314> <BEA-000256> <Invoking oracle.jrf.AppContextStartup.main(null)>
    ####<Feb 22, 2012 11:40:17 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928817318> <BEA-000256> <Invoking oracle.as.jmx.framework.wls.spi.StartupListener.main(null)>
    ####<Feb 22, 2012 11:40:17 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928817432> <BEA-000256> <Invoking oracle.j2ee.ws.server.WebServiceServerStartup.main(null)>
    ####<Feb 22, 2012 11:40:17 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928817492> <BEA-000256> <Invoking oracle.ias.cache.Startup.main(null)>
    ####<Feb 22, 2012 11:40:17 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928817493> <BEA-000256> <Invoking oracle.dms.wls.DMSStartup.main(null)>
    ####<Feb 22, 2012 11:40:18 AM EST> <Info> <Management> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928818207> <BEA-141278> <Java entropy configuration is: System property "java.security.egd= null"; JRE's java.security file property "securerandom.source= file:/dev/urandom"; Blocking Config= false; JDK version= 1.6.0_26; Operating System= Linux.>
    ####<Feb 22, 2012 11:40:48 AM EST> <Info> <WebLogicServer> <entwl2u-vm.co.pinellas.fl.us> <Pinellas1uCluster1MS2> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329928848987> <BEA-000256> <Invoking oracle.security.audit.ajl.loader.JEEAuditLoader.main(null)>

    Hi John,
    This is Ok. Those are just info messages. Thery are not warnings or errors, so nothing to worry about.
    If the classes are invoked with null arguments and no exception is thrown, then is means that the class is able to have a null argument, so nothing to worry about again.
    Regards,
    Cris

  • Sleeping thread that was started by startup class: wakes up on jsp compiler run

    Hello,
    I've ecountered the following unexpected behaviour:
    A class defined as a WL startup class creates a thread in the startup() method. This
    thread then calls the Thread.sleep method.
    So far so good.
    Now each time an updated JSP is accessed by a browser, this JSP gets recompiled by
    the JSP compiler (so far so good, nothing to do with the startup thread), and each
    time this happens, the above mentioned thread wakes up as if his time were up. (Output
    is "TestStartupThread: Woken up: timer timed out", see code below)
    Anybody know anything??
    Code of startup class ( = thread class) listed below.
    Dirk
    import java.util.Hashtable;
    import weblogic.common.*;
    public class TestStartupThread extends Thread implements T3StartupDef, T3ShutdownDef
    private static TestStartupThread testThread = null;
    /** controls running of thread, will be set to false when server shuts down
    private static volatile boolean runThread = true;
    public void setServices(T3ServicesDef t3def) {  }
    public String startup(String s, Hashtable ht) {
    testThread = new TestStartupThread();
    testThread.start();
    return "ok";
    public String shutdown(String s, Hashtable ht) {
    runThread = false;
    testThread.interrupt();
    return "ok";
    public void run() {
    while (runThread) {
    try {
    System.err.println("TestStartupThread: now going to sleep");
    Thread.sleep(1000*60*60);
    System.err.println("TestStartupThread: Woken up: timer timed out");
    } catch (InterruptedException ie) {
    System.err.println("TestStartupThread: Woken up by InterruptedException");

    Looks like a good use for WL time services.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Brian Dowd" <[email protected]> wrote in message
    news:[email protected]...
    >
    I am getting exactly the same problem, but I did something
    similar (to this & mine) in WL 4.5.1 and it worked OK.
    About the best solution we can come up with is to test the time
    before and after wake up, if the time is less then go back
    to sleep for the new amount of time ...
    Does anyone know how to properly do this in WL 5.1 ?
    I notice this thread is a bit old ....
    "Dirk Rehberger" <[email protected]> wrote:
    Hello,
    I've ecountered the following unexpected behaviour:
    A class defined as a WL startup class creates a thread in the startup()
    method. This
    thread then calls the Thread.sleep method.
    So far so good.
    Now each time an updated JSP is accessed by a browser, this JSP gets
    recompiled by
    the JSP compiler (so far so good, nothing to do with the startup thread),
    and each
    time this happens, the above mentioned thread wakes up as if his time
    were up. (Output
    is "TestStartupThread: Woken up: timer timed out", see code below)
    Anybody know anything??
    Code of startup class ( = thread class) listed below.
    Dirk
    import java.util.Hashtable;
    import weblogic.common.*;
    public class TestStartupThread extends Thread implements T3StartupDef,
    T3ShutdownDef
    private static TestStartupThread testThread = null;
    /** controls running of thread, will be set to false when server shuts
    down
    private static volatile boolean runThread = true;
    public void setServices(T3ServicesDef t3def) {  }
    public String startup(String s, Hashtable ht) {
    testThread = new TestStartupThread();
    testThread.start();
    return "ok";
    public String shutdown(String s, Hashtable ht) {
    runThread = false;
    testThread.interrupt();
    return "ok";
    public void run() {
    while (runThread) {
    try {
    System.err.println("TestStartupThread: now going to sleep");
    Thread.sleep(1000*60*60);
    System.err.println("TestStartupThread: Woken up: timer timed
    out");
    } catch (InterruptedException ie) {
    System.err.println("TestStartupThread: Woken up by
    InterruptedException");

  • Problems with Deployment, Startup classes and MBeanHome

    Hello,
    we have the following problem: How to initialize our application
    correctly???
    We are using MDBs as message consumers but have to guarantee the order of
    incoming
    messages. Due to a shortcoming in the JMS implementation (Order of
    redelivered messages
    is not guaranteed before WLS 8.1!!!) we are using a singleton class to keep
    the health state
    of the different message queues within the application (controlling whether
    the MDBs are
    supposed to proceed with processing or to discard any incoming messages).
    Thus the MDBs
    have to access this singleton, what implies latter has to be initialized
    prior to the application
    deployment. That's what we are using a startup class for, which is marked to
    be loaded before
    appplication deployment...
    Fortunately the according bug is fixed with WLS 7.0.2.0, so the class is
    loaded, but we are
    not able to access the MBeanHome interface (We like to register MBean to
    provide
    adminstrative access to the health state)!!!
    javax.naming.NameNotFoundException: Unable to resolve
    'weblogic.management.home.localhome' Resolved: 'weblogic.management'
    Unresolved:'home' ; remaining name 'home.localhome'
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    So when is the MBeanServer started???
    Before application deployment??? After??? Is there any way to tell WLS not
    to load the startup
    class before the MBeanServer is available respectively the MBeanHome is
    accessible via JNDI
    but before application deployment???
    Any hints are welcome!!!
    Regards,
    CK

    this seems like a bug. the mbeanhome should be available for lookup in
    startup classes. also posting to system management newsgroup.
    "Carsten Kaiser" <[email protected]> wrote in message
    news:[email protected]..
    Hello,
    we have the following problem: How to initialize our application
    correctly???
    We are using MDBs as message consumers but have to guarantee the order of
    incoming
    messages. Due to a shortcoming in the JMS implementation (Order of
    redelivered messages
    is not guaranteed before WLS 8.1!!!) we are using a singleton class tokeep
    the health state
    of the different message queues within the application (controllingwhether
    the MDBs are
    supposed to proceed with processing or to discard any incoming messages).
    Thus the MDBs
    have to access this singleton, what implies latter has to be initialized
    prior to the application
    deployment. That's what we are using a startup class for, which is markedto
    be loaded before
    appplication deployment...
    Fortunately the according bug is fixed with WLS 7.0.2.0, so the class is
    loaded, but we are
    not able to access the MBeanHome interface (We like to register MBean to
    provide
    adminstrative access to the health state)!!!
    javax.naming.NameNotFoundException: Unable to resolve
    'weblogic.management.home.localhome' Resolved: 'weblogic.management'
    Unresolved:'home' ; remaining name 'home.localhome'
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    So when is the MBeanServer started???
    Before application deployment??? After??? Is there any way to tell WLS not
    to load the startup
    class before the MBeanServer is available respectively the MBeanHome is
    accessible via JNDI
    but before application deployment???
    Any hints are welcome!!!
    Regards,
    CK

  • Weblogic Startup Class does not run as Windows Service

    If you know the answer, plase send me an email at [email protected]
    I'm running a weblogic startup class that starts a Thread. I need to
    run a batch program that should be running as long as WebLogic is
    running (to process new orders).
    It works fine when I run WebLogic (5.1 SP8) from a script, but causes
    problem when I'm running it as a Windows Service. It calls the
    startup class, however, the startup class never spawns the Thread
    class.
    Following is excerpts from different components:
    =============================================================
    *** weblogic.properties ***
    weblogic.system.startupClass.pdfCreatorStart=WebLogicStartupPdfCreator
    *** WebLogicStartupPdfCreator.java ***
    public class WebLogicStartupPdfCreator implements T3StartupDef {
    public String startup(String name, Hashtable args) throws
    Exception {
    Thread t = new ProductionPdfBatchRunner();
    t.start();
    return "success";
    *** ProductionPdfBatchRunner.java ***
    public class ProductionPdfBatchRunner extends Thread {
    public void run() {
    try {
    //work being done here
    this.sleep(30000);
    catch (InterruptedException ie) {               
    catch(Exception e) {
    e.printStackTrace();
    =============================================================
    Thanks for any help

    Hi,
    Ok. Few suggestions.
    1. Can you review the SAP note:
    552286  Troubleshooting for the SAP Web Dispatcher
    2. When you said: "web dispatcher does not get started ", what error you got ? Can you be more details here ?
    3. Please check the trace file dev_webdisp" that generated in the work directory. If the log entries is not abvious, increase the trace level to 2 or 3, and reproduce and re-check the trace file.
    4. What is the output of the command "sapwebdisp -v"
    5. How about sapwebdisp.pfl ? Are those settings correct ?
    Hope this helps.
    Regards,
    Vincent

  • Startup Classes and JMS - Suggestions Please!

    I'm in serious need of having several resources initialized before beans
    start handling requests.
    I tried implementing a Weblogic Startup Class, and it works fine - as long
    as it's the first thing
    to run! -- the problem is, when my Message Driven Beans deploy, if there are
    messages waiting
    for them in their durable subscriptions, they immediately start
    processing... then about 30 seconds
    later Weblogic (6.0sp1) gets around to starting my startup class. If I put
    code in each MDB that
    kicks off the initialization when they are invoked I still run into
    problems, because my initialization
    takes a LONG time (more than 2 minutes) - so I end up with lots of
    transaction rollbacks... which
    are very annoying and clutter up the log files, and scare customers of the
    product.
    Is there anyway to make a startup class/servlet/something that runs and
    completes before any
    other processing occurs?
    Thanks,
    James

    Yes, Startup servlet has the same problem - it doesn't 'startup' until after
    jms messages are already being delivered. :( aside from this, there are
    class loader issues -servlet space and ejb space are not the same...
    Thanks though,
    James
    "minjiang" <[email protected]> wrote in message
    news:[email protected]...
    Hi, did you ever try startup servlet? not startup class?
    mj
    James House wrote:
    The only problem with creating a base class to extend is the fact that
    Java only supports single inheritance, -- and I'm already inheriting...
    >>
    I've been involved with many projects that use WLServer, and in
    almost every one of them, there has been a need for a startup class
    that fires before the server starts handling requests.... strange that
    I'd be the only one to need this, when the need has recurred so often.
    James
    "Raja Mukherjee" <[email protected]> wrote in message
    news:[email protected]...
    James,
    If you have common initialization tasks to be shared by multiple MDBs,
    I
    would create an abstract class (a.k.a BeanAdapter class) where you canhave
    all your initialization logics and have your MDB extend from it.
    I am not convinced that the Startup class needs to run first. In fact,
    I
    have the same view that Startup class should run last. My only wishlist
    for
    startup class was that I should be able to specify order, which isaddressed
    in 6.1.
    I am also getting the feeling from different posts that MDB deploymentwould
    have a re-try logic in 6.1, which I am beginning to look into. Check
    (or
    post) in JMS news group.
    .raja
    "James House" <[email protected]> wrote in message
    news:[email protected]...
    Thanks for the help... I like the pattern you pointed me to better
    than
    anything else... ... but in all cases (your method, Gene's, and whatI'm
    currently doing) I still have to put some code in every MDB that
    I deploy... : (
    Put in a good word for me there at BEA and convince the appropriate
    developer that startup classes should run first!
    James
    "Raja Mukherjee" <[email protected]> wrote in message
    news:[email protected]...
    James,
    There are several ways to solve your problem. I normally use
    setMessageDrivenContext to do all my initialization. There are two
    types
    of
    initialization that I have performed here, first, reading theconfiguration
    file and then load some utility classes in specific order. The
    problem
    with
    the second was that you will have to use synchronized block
    w/HotSpot
    2.0
    to
    keep the order, which is ok. I don't use static block to do the
    initialization, instead use an init() metod. Hopefully you got the
    idea.
    Recently, Gene Chuang created a pattern which esentially does the
    same
    and
    I
    liked the pattern because it was a nicer way of doing what I
    needed to
    do.
    I
    have changed all my examples to customer to use the new pattern.
    You
    can
    find it in
    http://theserverside.com/patterns/thread.jsp?thread_id=7270.
    The
    only think I do not use of this pattern is
    initializeEveryContextSwap()
    method. I am not convinced yet that I would need it (of course
    that
    might
    change over the time).
    Hope this helps, and thanks Gene.
    .raja
    "James House" <[email protected]> wrote in message
    news:[email protected]...
    Ok... here's some more detail:
    The application is largely JMS based, and most of my Session
    EJBs
    are
    invoked only my Message Driven Beans.
    I have a large set of properties that need to be read from a
    config
    file,
    and stored somewhere "globally". I also have a number of
    utilities
    that
    need to get "warmed up" before I start doing any real processing(before
    I start receiving messages from the JMS Topics). These
    utilities
    take
    a
    long time to warm up (a long time being about 45-60 seconds) -
    because
    they are loading hundereds of classes, and creating variousconnections
    to external resources.
    Currently I'm creating a Singleton object that reads the
    configuration
    file
    name from an environment property, and it then parses the file,
    and
    starts
    configuring all of these utilities. Since the "Startup Class"
    didn't
    work
    (weblogic invokes it after I'm already receiving messages), I
    put
    code
    at
    the beginning of all of my MDB's onMessage() methods that calls
    the
    singleton's "getInstance()" method - which synchronizes on alock
    object,
    and does all of it's work.
    I don't like this solution because:
    1- I have to put code in EVERY message-driven bean that I
    create -
    if
    I
    forget one, everything is broken.
    2- I have to increase the transaction time out of the entire
    server
    to
    be over 60 seconds since the beans hang that long while theconfiguration
    is
    happening.
    It seems very obvious that a "Startup Class" should be invoked
    after
    the
    server has come completely up, but before it starts listening
    for
    requests -- isn't the whole point of a "startup class" to getthings
    ready
    that need to be done as soon as the server comes up? but alas,
    the
    person
    who designed this at BEA apparently didn't agree with me on this
    point!
    Any suggestion on better solutions would be greatly appreciated.
    James
    "Raja Mukherjee" <[email protected]> wrote in message
    news:[email protected]...
    You can do it this way, but I would not recommend it, unless
    that's
    the
    only
    way to attack the problem at hand. But that's just me.
    I have seen this problem with multiple clients and in most
    cases
    there
    is
    a
    better way to handle it. If James give us a little more
    information
    on
    what
    type of configuration is he talking about and some background
    of
    his
    application, we as a group can think and may be able to come
    up
    with
    some
    idea.
    .raja
    "Joel Nylund" <[email protected]> wrote in message
    news:[email protected]...
    you could wrap the starting of weblogic in your own class
    and do
    initialization
    there. You have to be careful because of the way weblogic
    classloaders
    work, but
    you may be able to do what you want. Weblogic is just a java
    class,
    so
    you
    can
    start your class, then once your done initializing, just
    call
    weblogic.Server.main
    -Joel
    James House wrote:
    I'm in serious need of having several resources
    initialized
    before
    beans
    start handling requests.
    I tried implementing a Weblogic Startup Class, and it
    works
    fine -
    as
    long
    as it's the first thing
    to run! -- the problem is, when my Message Driven Beans
    deploy,
    if
    there
    are
    messages waiting
    for them in their durable subscriptions, they immediately
    start
    processing... then about 30 seconds
    later Weblogic (6.0sp1) gets around to starting my startupclass.
    If
    I
    put
    code in each MDB that
    kicks off the initialization when they are invoked I still
    run
    into
    problems, because my initialization
    takes a LONG time (more than 2 minutes) - so I end up with
    lots
    of
    transaction rollbacks... which
    are very annoying and clutter up the log files, and scarecustomers
    of
    the
    product.
    Is there anyway to make a startup class/servlet/something
    that
    runs
    and
    completes before any
    other processing occurs?
    Thanks,
    James

  • Oc4j startup classes

    I am trying to create a startup class for my Oc4j container. I have created a new class with all the required code. However when I come to update my server.xml config file like so:
    <startup-classes>
    <startup-class classname="MyStartupClass" failure-is-fatal="true">
    <execution-order>0</execution-order>
    </startup-class>
    </startup-classes>
    The container on initialisation says that the class cannot be found. I have also tried giving the fully qualified package name as the class name i.e. com.blah.blahh.MyStartupClass. However still no success.
    I have placed the startup class in the .jar file in the .ear file which I have deployed to the /application dir.
    Anyone know why this is happening and how I can get the container to find my startup class?

    My container starts fine now with the startup class in place.
    The startup class simply makes some calls to a third party job scheduling library.
    However, when I try to invoke a job, I get the following error:
    core.JobRunShell - Job Manual.Job1 threw a JobExecutionException:
    org.quartz.JobExecutionException: javax.naming.NamingException: Not in an application scope - start Orion with the -userThreads switch if using user-created thread
    However when i start the OC4J container up, I do include this flag.
    i.e. java -jar oc4j.jar -userThreads
    Anyone have any idea what is going on?

  • Startup class  load sequence?

    Hi there,
    Do I have control over the load sequence of the startup classes? I
    need to make sure one class start before the other. I add the one needs to
    be start first before the other one in config.xml, but Weblogic always load
    the other one first. Why?
    Thank you

    WLS 6.1 supports deployment order in which
    you can set the order for each deployments
    see 6.1 docs
    Kumar
    Chi-Ming Yang wrote:
    OK!
    Thank you
    I tried. The trick works for WLS 6.0 with SP2.
    Funny thing is that WLS loads names start with "Z" before "A".
    Thank you
    >
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]..
    What I'm saying is that WLS 6.0 might work with the class name trick (Ihaven't
    tried it) but I would not use it even if it worked for me since somethingas
    simple as a hash code change in a JDK version might break the order youdesire.
    In 6.1 there might be a way to do that but I don't know what it is.
    --dejan
    Chi-Ming Yang wrote:
    Are you saying only WLS 610 will work with the class name trick?
    I am using WLS 6.0. Bad luck!
    >
    "Deyan D. Bektchiev" <[email protected]> wrote in message
    news:[email protected]..
    There was a posting that said that if you name you classes for example
    Class1
    Class2
    the Class1 would always be loaded before Class2 but the sure thing is
    to
    create
    only one startup class that loads the real startup classes in the
    order
    you
    want them to be loaded.
    Maybe in 6.1 BEA has took care of this but in 6.0 you just cannot (the
    why
    is
    left for the BEA developers to answer).
    --dejan
    Chi-Ming Yang wrote:
    Hi there,
    Do I have control over the load sequence of the startup
    classes?
    I
    need to make sure one class start before the other. I add the one
    needs
    to
    be start first before the other one in config.xml, but Weblogic
    always
    load
    the other one first. Why?
    Thank you

Maybe you are looking for

  • System Monitoring / Administration asking for logon id

    Each time I click on, "System Monitoring / Administration" in DSWP, a dialog box pops up asking me for a username and password. I've tried using the local system admin password, SAP*, my own SAP logon id, the J2EE_ADMIN user, etc.. but the dialog box

  • SED is not appearing in accounting document

    Hi Friends, Excise has been captured with J1IEX , there i can able to see all the valus in part II tab like AED, BED, SED and Total ECS, but when i check in accounting document SED is missing, becoz of this RG23A II is printing wrongly, but when i ch

  • Infected files found in mail data base.

    Greetings to everyone, A few days ago, ClamXav detected infected files when scanning my mail data base. One of wich was a phishing kind of mesage, and the other was defined as a trojan. It turns out that they were mesages from 2009, by the time when

  • Freezing in Leopard, Tiger and Panther

    Hi, I'm pretty new to Macs, so excuse any of my possible ignorance. I searched in the forum, but could not find any topic specifically answering my question. I have an old eMac (1.25 ghz, 768 mb ram) I purchased from a friend. Upon my first plug in,

  • Numbering issue

    I am having an issue with numbers restarting in the middle of a list of numbered steps when I have a paragraph or figure in the middle of steps. Here's an example of what's happening. 1. My first step numbers correctly. 2. My second step numbers corr