6 Replies Latest reply: Aug 14, 2009 11:58 AM by Betino RSS

    Is there any way to register code to watch weblogic 10.3 server startup?

    716618
      Hi,

      I need to start custumized different threads in weblogic 10.3 process when weblogic 10.3 admin server, nodemanager, weblogic app server starts and shuptdown. Can anybody point me right API and documentation and code examples for these? For example, when it is admin server, I started some thread when admin server starts. when it is weblogic app server, I start different thread when app server starts. Code samples are appreciated.

      Thank you in advance.
        • 1. Re: Is there any way to register code to watch weblogic 10.3 server startup?
          Anuj Dwivedi-Oracle
          You may write your own custom java program to monitor the status of weblogic resources. Just do some googling and you will find many examples for the same.

          You may use Weblogic Scripting Tool (WLST) also for the same purpose. And the another option could be to use WebLogic Server Diagnostic Framework (WLDF). For WLDF please refer -

          http://e-docs.bea.com/wlcp/wlss40/operations/wldf.html

          Regards,
          Anuj
          • 2. Re: Is there any way to register code to watch weblogic 10.3 server startup?
            717292
            The way you want in WLS is deprecated since weblogic 9.
            http://edocs.bea.com/wls/docs103/upgrade/compat.html#wp1111477
            http://edocs.bea.com/wls/docs103/programming/lifecycle.html

            The old start and shutdown class in weblogic 8, it is still supported for
            http://edocs.beasys.com/wls/docs81/ConsoleHelp/startup_shutdown.html
            • 3. Re: Is there any way to register code to watch weblogic 10.3 server startup?
              649018
              Another option here is to use SNMP. WLS sends out startup and shutdown traps automatically. Of course you will then need to have something monitoring for the trap messages.
              • 4. Re: Is there any way to register code to watch weblogic 10.3 server startup
                Betino
                One more to all suggest, You can use Startup & Shutdown Classes, Startup and shutdown classes are Java programs that you create to provide custom, system-wide services for your applications. You add the classes to the WebLogic Server class path and then configure them to load and run when a server starts or shuts down. Check [http://e-docs.bea.com/wls/docs100/ConsoleHelp/pagehelp/Corecoreclassesclassdeploymenttitle.html]

                All depend of your "custumized different threads".
                • 5. Re: Is there any way to register code to watch weblogic 10.3 server startup?
                  716618
                  Thank you for all of your answers.

                  I need to start my customized java program inside weblogic servers during weblogic server starts according to (server type such as node manager, admin server, app server, and conditions whether my program started in other weblogic servers with what parameters.

                  I need (1) to register listener to weblogic server start up, how can I do it? Where can I find Weblogic public interface docs and public api jar that I can use for my build? (2) how can I pass properties and parameters from one weblogic servers to another weblogic servers so that I can communicate these common properties into different weblogic servers that can be used in my java programs as input and output parameters?
                  • 6. Re: Is there any way to register code to watch weblogic 10.3 server startup
                    Betino
                    (1) to register listener to weblogic server start up, how can I do it?
                    You can register a listener in weblogic-aplication.xml descriptor, for example:-
                    <?xml version="1.0" encoding="UTF-8"?>
                    <weblogic-application xmlns="http://www.bea.com/ns/weblogic/90">
                    <library-ref>
                    <library-name>myLibrary</library-name>
                    </library-ref>
                    <listener>
                    <listener-class>com.myApp.weblogic.AppListener</listener-class>
                    </listener>
                    </weblogic-application>
                    Plus, in com.myApp.weblogic folder you can put a listener.properties. Check [http://edocs.bea.com/wls/docs100/programming/lifecycle.html]
                    (2) how can I pass properties and parameters from one weblogic servers to another weblogic servers...
                    Work Contexts allow developers to pass properties without including them in a remote call...
                    Check [http://edocs.bea.com/wls/docs90/secwlres/types.html#1227393], [http://e-docs.bea.com/wls/docs91/ConsoleHelp/pagehelp/Securityworkcontextpathcreatetitle.html]

                    I hope this helps, good luck !

                    Of course, this is just an idea.

                    Edited by: Betino on 14/08/2009 11:57 AM