Sequence of startup classes and EJB deployment

The default sequence when WLS is starting is deploying EJB first and then startUpClasses. Could someone tell me if it's possible to change the sequence.
Thanks a lot in advance.

Sure have your startup class do its work and then hot-deploy the EJB.
-- Rob
Jack wrote:
>
The default sequence when WLS is starting is deploying EJB first and then startUpClasses. Could someone tell me if it's possible to change the sequence.
Thanks a lot in advance.

Similar Messages

  • 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

  • Refering to startup class in EJB

    Hi,
    In our application we send exception stacktrace as email to
    System Admin.The mails are sent from both Web App and EJB.
    The emails have to be buffered and can be sent only after a
    limit say 5 stacktraces have been reached. Also in case the
    buffer is not full,then the mail should be sent only after a
    specific time.
    To achieve this I am planning to use a Startup class and start
    a thread inside the class to wait for a specified time. The questions are:
    1)How to refer to a startup class in EJB or Web (Our
    application is deployed as an EAR)
    2) If we can refer to the startup class in EJB,is it ok to refer a thread -will
    the thread
    created by startup class be in the context of the EJB.
    Mani

    Startup classes have the following deficiences:
    - they (and all application classes they use) have to be in the system
    classpath, which makes them non-redeployable
    - they are executed only once when server starts - if your application can be
    hot-redeployed and it depends on startup/shutdown logic things can break.
    An easy workaround is to use load-on-startup servlet init() and destroy()
    methods (or 2.3 servletcontext listener) instead of startup classes - it makes
    application redeployable and portable.
    Mani <[email protected]> wrote:
    Hi,
    In our application we send exception stacktrace as email to
    System Admin.The mails are sent from both Web App and EJB.
    The emails have to be buffered and can be sent only after a
    limit say 5 stacktraces have been reached. Also in case the
    buffer is not full,then the mail should be sent only after a
    specific time.
    To achieve this I am planning to use a Startup class and start
    a thread inside the class to wait for a specified time. The questions are:
    1)How to refer to a startup class in EJB or Web (Our
    application is deployed as an EAR)
    2) If we can refer to the startup class in EJB,is it ok to refer a thread -will
    the thread
    created by startup class be in the context of the EJB.
    Mani--
    Dimitri

  • Weblogic startup class and EAR file

    Hi,
    I am using WL 8.1.5.
    I have a weblogic starup class MyStartup that implements T3StartupDef. (it does not specify package).
    I jar-ed it. And I placed MyStartup.jar file into the MyEA.ear file. And I placed that into applications dir.
    With WL Console I defined the startup class and for the ClassName specified MyStartup.
    Yet I get the java.lang.ClassNotFoundException.
    I also have a Manifest.mf file with
    Class-Path: MyStartup.jar
    Please help me solve this problem, I literally don't know what to do next.
    MB

    Hi,
    thanks.
    This seems like a completely opposite method of the depplying startup class with weblogic console.
    Does my class still need to implement T3StartupDef?
    I get this exception. And my classnotfound is still there.
    Exception:weblogic.management.ApplicationException: startup.MyStartup
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2484)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2396)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:883)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:591)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Regards,
    MB

  • 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

  • Redeploying classes and EJBs into a running, external WeblogicServer6.1 application

    Is it possible to debug, edit, compile and deploy the new class and/or EJB using
    jBuilder5 on Win2k and WeblogicServer6.1 on Solaris WITHOUT restarting the app
    server? Is there solid documentation, where? I can debug, but the 'documentation'
    concerning re-deployment on an external WLS application server is vague at best.
    For example, from Borland...."If the EJB already exists in WebLogic Server, it
    may be necessary either to use re-deploy or to remove it from WebLogic Server
    before deployment." From BEA, "...create an empty file named REDEPLOY in the directory
    where the exploded application resides. ... After copying the new files, touch
    the REDEPLOY ...."

    I think i figured this one out. Thanks to everyone who looked at it. Have yourselves a good one.
    WOO HOO

  • OC4J Server startup classes and JNDI

    Hi,
    I have been using server startup classes in standalone OC4J provided with BPEL developer install to populate data from the server.xml into the JNDI server.
    Now I am deploying the BP to 10gAS and am unable to identify the configuration files that affect the contents of the JNDI server which is accessible from BPEL.
    Can anyone advise?
    Thanks,
    Toby

    Clemens,
    What we would like to do is to lookup configuration details in OC4J's JNDI server.
    As an example, we have an ftp web service that is used for functionality not available in the FTP adapters, deleting files, executing remote commands etc.
    We need to store the details of ftp connections somewhere centrally, and jndi looks like a good option. Something slightly different we would like to do here is to be able to access the configuration details that the FTP Adapters use, but if that's not possible, seperate entries in the jndi server would be good.
    To populate the JNDI server, we have written a server startup class which loads our custom configuration details at OC4J startup.
    This works fine under the OC4J supplied with a developer install, but when we deploy our code to a full blown 10g AS we cannot access the config information.

  • Best place to put startup code in EJB deployment?

    Hi,
    I'm working on an application which involves timer services and JMX, and I'd like to ask for your opinion on how to deal with startup of those services in an EJB deployment. If you dealt with those issues before, I'd appreciate it if you could share your experiences/best practices on the subject.
    Timer services need to be started, and MBeans need to be registered with the MBeanServer, so I'd like to see how can this be done upon application deployment.
    I'm using Sun Server as an EJB server.
    Thanks,
    Mark

    Since the ejb spec doesn't define an application initialization event, the only portable way of doing this that I've heard of is to use the ServletContextListener.contextInitialized() event to send a message to an MDB within the same application. Since EJB Timers are persistent and their identity is tied to a particular application component, the MDB's onMessage method can use getTimers() to see whether the timer already exists. If not, it's the first time the application has been deployed.
    I agree the auto-creation of timers upon deployment would be a good addition to the spec :-)
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Starting up j2ee and EJB deployment tool on Windows 98

    I will start off this question with an apology if it is too stupid,
    basic, or placed in the wrong group. I am relatively new to the world
    of Java and even newer to the world of Server-side Java and EJBs.
    However, I am plugging away.
    I am using my trusty 4 year old system with Windows 98 second edition
    to dabble with Server-side Java and EJB applications. I am using
    Tomcat 4.0 as my server. When I try and start the j2ee server or the
    EJB deployment tool I get the following scrolling messages:
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Syntax error
    Syntax error
    Syntax error
    Out of environment space
    Bad command or file name
    I have tried to adjust the memory settings in the DOS window with no
    success. My question has three parts:
    1) Can these applications be run using Windows 98 and if so what are
    the exact DOS window memory settings for this?
    2) Where exactly can I find the documentation that specifies this?
    (please be specific as possible as I have read the readme.txt files
    supplied with j2ee)
    3) Should this and similar questions be posted in another
    group/section?
    I truly appreciate anyone's help with this.
    Sincerely,
    Tim

    You're going to have a lot of pain unless you upgrade to Windows 2000 or XP.
    In the mean time, set your environment size much larger (google for "Out of
    environment space") and use WinOne from http://www.cia.com.au/luke/ ...
    that's how I scraped by on Windows 98 for a while.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Tim" <[email protected]> wrote in message
    news:[email protected]..
    I will start off this question with an apology if it is too stupid,
    basic, or placed in the wrong group. I am relatively new to the world
    of Java and even newer to the world of Server-side Java and EJBs.
    However, I am plugging away.
    I am using my trusty 4 year old system with Windows 98 second edition
    to dabble with Server-side Java and EJB applications. I am using
    Tomcat 4.0 as my server. When I try and start the j2ee server or the
    EJB deployment tool I get the following scrolling messages:
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Out of environment space
    Syntax error
    Syntax error
    Syntax error
    Out of environment space
    Bad command or file name
    I have tried to adjust the memory settings in the DOS window with no
    success. My question has three parts:
    1) Can these applications be run using Windows 98 and if so what are
    the exact DOS window memory settings for this?
    2) Where exactly can I find the documentation that specifies this?
    (please be specific as possible as I have read the readme.txt files
    supplied with j2ee)
    3) Should this and similar questions be posted in another
    group/section?
    I truly appreciate anyone's help with this.
    Sincerely,
    Tim

  • Domain Class and EJB Component

    Hi,
    I have defined a set of domain classes(with get/set methods) and a set of EJB Session Beans for the business logics.
    The question is, where do I locate the domain classes?
    Create a package for it (e.g. com.mysystem.domain)?
    Or distribute it into the Session Bean packages (e.g. for account related domain classes, place it into com.mysystem.ejb.account)?
    The problem for placing it into the domain package:
    1. I have too many domain class ( >200). It's hard to maintain and perform analysis. (Imagine >200 classes in a class diagram)
    2. All session beans need to import the "com.mysystem.domain" package in order to reference the domain classes. Therefore, all session beans will have the dependency to the domain package. Is it what component based development (CBD) does?
    The problem for distribute it into the Session Bean packages:
    1. Some domain classes are heavily depends on other domain classes (e.g Address class has association relationship with the Customer class and Staff class) If I have a session bean for Staff Management(StaffBean) and Customer Management(CustomerBean), where should I put the Address class?
    1. Some domain classes are abstract classes. e.g. Person abstract class have a generalization relationship with the Customer class and Staff class. Similiar to point 1, where should I put the Person class?
    It is appreciate if anyone can clear my mind of component design.

    I have the same confusion, but I think we should place them in a separate packages , a package for each related bundle of domain objects, the logic behind this is that domain object should not know that you are using EJBs or any other technology .
    an OO expert advice is appreciated

  • Configure weblogic startup class in deployment jar

    We need to invoke a class during weblogic startup that is part of application deployment jar...
    It works if startup class is added to server classpath ( Weblogic documentation also insists that). But our startup class uses application logic and needs to be part of application jar..
    We are getting java.lang.ClassNotFoundException for the class during start up. setting LoadBeforeAppDeployments to false also does not help...
    Is there any other way to invoke a application class during weblogic startup...?
    Any help would be appreciated.
    Thanks,
    Rajasekar.

    here is the solution to this:
    in the conventional method of implementing a startup class, one needs to impletent the T3STartupDef interface and register the class as a startup class in the console / config.xml
    in this method, the startup class need not implement the T3STartupDef interface, it just needs to have a "main" method that will be called. the process of registeration is also simple, if you have an application ear.
    while making the application ear, add a weblogic-application.xml along with the application.xml. the weblogic-application.xml should contain :
    <startup>
    <startup-class>myStartup</startup-class>
    <startup-uri>myStartupArchive.jar</startup-uri>
    </startup>
    the myStartupArchive.jar should contain the startup class and all classes used by it
    also, use a "manifest" file to point to other library jars within the ear
    hope this helps someone !
    going, going, ... gone.

  • 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.

  • DataSource information in Startup Class

    Hi,
    I have a startup class and I want to access the database using jdbc and get connection
    using the datasource. In case of an EJB, the jndi name and datasource name can be
    specified in the deployment descriptor. Is there a way to specify this information
    in a startup class?
    Thanks,
    Patrick

    Hi Patric,
    You may use custom -Dmy.env.param=my.env.value when start
    weblogic. Then you can use standart Java API to access system properties.
    Regards,
    Slava Imeshev
    "Patrick" <[email protected]> wrote in message
    news:3d2d241e$[email protected]..
    >
    Hi Sree,
    Thanks. Actually, I do have a data access class which does thedatasource lookup
    and gets the connection. The startup class just calls the methods in thisclass.
    I would like to have the DSN string as an enviroment variable in thestartup class
    which can then be accessed in the data access class, something like this
    String dsn = "java:comp/env/jdbc/myds"
    Any ideas on how to achieve this?
    Thanks,
    Patrick
    "Sree Bodapati" <[email protected]> wrote:
    Hi Patrick
    here is how you do it.
    import java.util.Hashtable;
    import java.sql.*;
    import javax.sql.*;
    import javax.naming.*;
    import weblogic.common.*;
    import weblogic.jndi.*;
    public class DoSQLStartup implements T3StartupDef {
    private T3ServicesDef services;
    public void setServices(T3ServicesDef services) {
    this.services = services;
    public String startup(String name, Hashtable args) throws Exception {
    // Write your startup code here...
    Context ctx = new InitialContext();
    DataSource myds = (DataSource)ctx.lookup("myDataSource");
    Connection conn = myds.getConnection();
    System.out.println("Got connection!!!!!!!!!!!!!!!!!!!!");
    // do some db work here
    return "ok";
    hth
    sree
    "Patrick" <[email protected]> wrote in message
    news:3d2c7435$[email protected]..
    Hi,
    I have a startup class and I want to access the database using jdbcand get connection
    using the datasource. In case of an EJB, the jndi name and datasourcename
    can be
    specified in the deployment descriptor. Is there a way to specify thisinformation
    in a startup class?
    Thanks,
    Patrick

  • Startup class question

    Hi,
    I haven't used startup classes but see a need for one now, to add a JMS
    receiver of messages. We're not on WL 6.0 yet and that doesn't appear to be
    an option. Anyway, my question relates to threading. Are startup classes
    like EJB's
    in that the server will instantiate > 1 if needed?
    Thanks,
    Bill

    Bill,
    Your threading needs depend on how you are using JMS. If you are using
    asynchronous delivery then the thread is provided by the JMS runtime when it
    makes the callback on to your listener.
    If you hope to use synchronous delivery then you'll need a thread to receive
    messages. A startup class could probably start a thread (or a pool of them)
    and use them to handle synchronous messages. However I would strongly
    recommend against this.
    You might investigate Message Driven EJBs. I suspect that they will be a
    better fit for your needs than a startup class.
    Regards,
    Adam
    "Bill Ennis" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    So if there is only one instance what happens if multiple requests come in
    at the same time?
    BTW, the startup class I am working on will be for a JMS client.
    I suppose you could thread the startup class?
    Where can I find detailed info on Startup classes beyonnd what have found
    in the developers manual?
    Thanks alot,
    Bill
    "Bill Ennis" <[email protected]> wrote in message
    news:3a69eaad$[email protected]..
    Hi,
    I haven't used startup classes but see a need for one now, to add a JMS
    receiver of messages. We're not on WL 6.0 yet and that doesn't appear tobe
    an option. Anyway, my question relates to threading. Are startup classes
    like EJB's
    in that the server will instantiate > 1 if needed?
    Thanks,
    Bill

  • Info on startup classes

    Hi. I am trying to create one startup class. It is in mine classpath and I declared
    it in console. I registated it with my server but in the start up the system returns
    one java.lang.ClassNotFoundException. Is necessary to initiate some classpath specific
    for the classes of startup?
    Thanks in Advance
    jjs

    Startup classes is not described in J2EE specs, hence is handled independently by vendors and is
    very awkward.
    You can, however, create a startup servlet, that mimics a startup class and is J2EE-portable.
    Search interest.ejb; info has been posted there about this.
    Gene
    "Andreas Ebbert" <[email protected]> wrote in message news:[email protected]..
    Gene Chuang wrote:
    Yes, it needs to be in the CLASSPATH of startWeblogic.sh.Is there perhaps the posibility to define startup classes in enterprise
    applications? Or do you have to edit the config.xml by hand or by the
    console for that?
    Andreas

Maybe you are looking for