Initialising objects when server starts up

Hi,
Is there some area where we can put code so that it gets executed when the server starts up?
In our case, we wish to load some settings from a database and then save them to the application bean.
Thanks,
Tristan

if you put the code in the init() section of ApplicationBean1, the code is called the first time that a page accesses a property in the application bean. This should handle most needs. Do you need the code to be executed as soon as the server starts the app, or is the first property access good enough?

Similar Messages

  • Make unix executable start up when server starts up

    We run a HansaWorld Enterprise Server on our OSX 10.6 server and it is a unix executable that I now start from terminal.
    I've managed to make a script and added that to the Login Items for the server user account.
    This works fine, but if the server needs a restart when I'm not there, I would have to give away the login credentials to other employees that shouldn't have them.
    Is there anyway to make the Unix Executable or script run when the server starts up. Like the Mail-, OD-,etc- services does?

    I want to run the following file:
    ./Unix-executable in /Applications/Folder/

  • When server start, get "Waiting for another script to finish..." message and doesn't go anywhere.

    Hello, my engineer (Japanese) is trying to start AdobeMediaServer but he got stuck after getting "Waiting for another script to finish..." message. Any idea how to resolve this situation?
    [root@NA1SIBZDH02 /opt/adobe/ams]# ./server start
    NPTL 2.5
    chmod: changing permissions of `./tmp/': 読み込み専用ファイルシステムです
    Waiting for another script to finish...
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]# ls -l
    合計 52324
    drwxr-xr-x 15 ams  ams      4096  9月 11 17:54 Apache2.2
    -rwxr-xr-x  1 root root  1061035  9月 11 17:54 License.htm
    -rwxr-xr-x  1 root root    43374  9月 11 17:54 License.txt
    -rwxr-xr-x  1 root root    58827  9月 11 17:54 ReleaseNotes.htm
    -rwxr-xr-x  1 root root     5715  9月 11 17:54 adminserver
    -rwxr-xr-x  1 root root      871  9月 11 17:54 adobe-lq.png
    -rwxr-xr-x  1 root root     2912  9月 11 17:54 ams_icon.png
    -rwxr-xr-x  1 root root  3220552  9月 11 17:54 amsadmin
    -rw-r--r--  1 root root        6  9月 11 17:54 amsadmin.pid
    -rwxr-xr-x  1 root root 11187664  9月 11 17:54 amscore
    -rwxr-xr-x  1 root root  4331472  9月 11 17:54 amsedge
    -rwxr-xr-x  1 root root  3070840  9月 11 17:54 amsmaster
    -rw-r--r--  1 root root        6  9月 11 17:54 amsmaster.pid
    -rwxr-xr-x  1 root root     5242  9月 11 17:54 amsmgr
    drwxrwxrwx  6 ams  ams      4096  9月 11 17:54 applications
    -rwxr-xr-x  1 root root      960  9月 11 17:54 cleanup
    drwxr-x---  3 ams  ams      4096  9月 11 17:54 conf
    drwxr-xr-x  5 ams  ams      4096  9月 11 17:54 creds
    drwxr-xr-x  3 root root     4096  9月 11 17:54 documentation
    -rwxr-xr-x  1 root root 16368842  9月 11 17:54 libadbe_dme.so
    -rwxr-xr-x  1 root root   336065  9月 11 17:54 libadbe_flv.so
    -rwxr-xr-x  1 root root    59248  9月 11 17:54 libasneu.so.1
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so.2
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so.2.0.0
    -rwxr-xr-x  1 root root  1968482  9月 11 17:54 libcrypto.so.1.0.0
    -rwxr-xr-x  1 root root   162403  9月 11 17:54 libexpat.so.1
    -rwxr-xr-x  1 root root  3497472  9月 11 17:54 libfmsccme.so
    -rwxr-xr-x  1 root root  6992879  9月 11 17:54 libhds.so
    -rwxr-xr-x  1 root root   403767  9月 11 17:54 libssl.so.1.0.0
    drwxr-xr-x  2 root root     4096  9月 11 17:54 licenses
    drwxrwxrwx  2 root root     4096  9月 11 17:54 logs
    drwxr-xr-x  5 root root     4096  9月 11 17:54 modules
    drwxr-xr-x  6 root root     4096  9月 11 17:54 samples
    drwxr-xr-x  3 root root     4096  9月 11 17:54 scriptlib
    -rwxr-xr-x  1 root root     7494  9月 11 17:54 server
    -rwxr-xr-x  1 root root   300864  9月 11 17:54 shmrd
    -rwxr-xr-x  1 root root    36206  9月 11 17:54 tcSrvMsg
    drwxrwxrwx  2 root root     4096  9月 11 17:54 tmp
    drwxr-xr-x  9 root root     4096  9月 11 17:54 tools
    -rwxr-xr-x  1 root root     2411  9月 11 17:54 uninstallAMS
    drwxr-xr-x  8 ams  ams      4096  9月 11 17:54 webroot
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.<br />
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    * https://support.mozilla.com/kb/Server+not+found
    * https://support.mozilla.com/kb/Firewalls

  • Automating Database up & down when server start and shutdown in Linux

    Hi to all,
    Question:How to set in linux, whenever server is on the database up and server off the database down?
    Problem: whenever i am issue the command "chkconfig --add dbora"
    or "chkconfig --level 345 dbora on"
    The message is as follows
    service dbora does not support chkconfig.
    I use oracle 9i on Redhat linux as 3.
    please send reply as soon as possible

    http://tldp.org/HOWTO/Oracle-9i-RH8-and-RH9-HOWTO-5.html ??
    Maybe you can use this. Its probably also hidden somewhere inside manuals for unbreakable/redhat oracle linux on metalink. Dunno why they insist on NOT including this auto start/stop in installation - how hard can it be, if you know linux inside-out.... If they did, It should make them more comfortable competing with other rdbms vendors that dont object to making many such things working "out of the box" :) ..... (no pun intended)

  • Apache and My SQL won't start when server starts, error in /var/log

    OS X Server 10.4.6
    Everything looks OK, but when I restart the server, Apache does not restart.
    The var/log/system contains the following line:
    SystemStarter[965]: Apache web server (1002) did not complete successfully
    /etc/hostconfig contains the following lines:
    MYSQL=-YES-
    WEBSERVER=-YES-
    What is the standard OS X boot sequence that should start it? i.e. what script gets executed during boot?
    If I start by hand (Server Admin), it runs fine.
    _mike

    Check /var/log/httpd/error_log after a restart, it will probably have more info about what went wrong with Apache.
    Both Apache and MySQL use startupitem scripts located in /System/Library/StartupItems.
    The fact that they start up fine manually, several seconds later, probably means that some prerequisite isn't quite ready when they try to start. A quick kludge that will quite probably work would be to put like a 10 second delay in their scripts with the following line at the top of the StartService section:
    sleep 10
    Roger

  • How to avoid deleted projects being deployed when server starts

    Hi All,
    I have created some project in RAD 7 for some testing purpose with WAS 6.1.
    Now problem is I was not aware of the fact that WAS 6.1 does not work with local workspace and it shares all the workspaces. So after sometime I deleted those workspaces from Windows file system and not by opening workspace from RAD 7.
    Now whenever I create new workspace and start the server...those old workpaces haunts me by giving all exceptions about "not able to find deployment.xml file" for those EAR files.
    Does any one know how to remove those deleted projects, so that server does not try to deploy them.
    Thanks in advance.
    Abhi

    Hi,
    I am sorry to post this message here.
    Could you please tell me which forum would be most appropriate to post my query?
    I thought its related to SSL exception that's why I posted it here.
    Thanks,
    Abhi

  • How to run a servlet  at the same time when server started

    we are using tomcat server pls tell me clearly it's urgent

    Clearly you're also annoying. Fourth thread, same topic.
    http://forum.java.sun.com/thread.jspa?threadID=724541&messageID=4176289#4176289

  • Create connection when ocj4 starts

    I had set a datasource in data-source.xml.
    <data-source location="jdbc/test" class="com.evermind.sql.DriverManagerDataSource" password="tiger" xa-location="jdbc/test" ejb-location="jdbc/test" connection-driver="oracle.jdbc.driver.OracleDriver" username="scott" url="jdbc:oracle:thin:@localhost:1521:orcl" inactivity-timeout="30" name="Oracle 9i" min-connections="5" max-connections="10"/>
    Now the five connections are established when the applicatoin accesses the datasource.
    Howerver, I hope the five connection are established when server starts.
    How shuold I setup the server?

    290092,
    I couldn't ascertain, from your post, what OC4J (stand-alone) version you are using (or perhaps you are using the Oracle Application Server?), but if you have a recent version, you can either use a "startup servlet" or a "startup class" -- which is activated when OC4J starts up, and open your database connections there.
    I believe you should be able to find more detials from the OC4J Home Page at:
    http://www.oracle.com/technology/tech/java/oc4j/index.html
    Good Luck,
    Avi.

  • How to add an object in JNDI when a server starts?

    I have an integration app. The app contains EJB project. The project contains EJB which reads data from LDAP.
    My first version of EJB contains the following code:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, strProvider);
    env.put(Context.SECURITY_AUTHENTICATION, strAuth); env.put(Context.SECURITY_PRINCIPAL,strPrincipal); env.put(Context.SECURITY_CREDENTIALS,strCredentials);
    DirContext dirCtx = new InitialDirContext(env); // exception
    All connection properties are hardcoded and it is not a good practice.
    Also I can put those properties into deployment descriptor. But I am going to have some EJBs and each EJB has to have those properties into descriptors. It is not useful.
    My idea: I would like to have whatever object which is called automatically when a server starts; this object creates InitialDirContext and put the context into JNDI. All EJBs lookup the context by a name. But I don't know how to do that.
    And another question: how to change connection properties dynamically? My idea is putting the properties in XML Cache. And my object (which creates InitialDirContext) reads the properties from XML Cache. Can I handle a message that my properties in XML Cache have been changed and in this cases my object reads new properties and calls rebind() to update InitialDirContext?
    Thanks,
    Ivan

    To bind an object into the JNDI tree check the documentation here:
    http://e-docs.bea.com/wls/docs81/jndi/jndi.html#475702
    If this is to be used by all your applications that you deploy on the server check out the startup/shutdown class documentation here:
    http://edocs.bea.com/wls/docs81/ConsoleHelp/startup_shutdown.html
    Cheers
    IV

  • Initialising class when J2EE server starts

    Hi,
    I am facing a problem. I wish to instantiate a class when the J2EE/ tomcat server starts. This is similar to the property set in weblogic as
    weblogic.system.startupClass.startup = <name of ur startup class>
    Here we can specifiy the class to be instantiated during startup of server.
    Can i do something similar in tomcat/ j2ee server?
    I do not wish to use a servlet since my webapplication contains jsps and other supporting classes and my own apis.
    Thank you in adv.
    ...supriya.

    if you use ServletContext Listeners you should be ready as far as web app is concerned. Most servers I believe offer JMX integration so that you can listen for server startups. : )

  • Bind custom object in weblogic server start

    I want to bind my custom object to jndi when weblogic server start. how can i do?

    Bonjour Yiwen,
    That could easily done by registering a startup class in weblogic server that will do the binding of the object in the JNDI tree (it can also create all the subcontexts you need).
    Below is some code that works fine on WLS 5.1:
    a.. a custom object
    package StartupJNDI;
    public class CustomObject extends Object
    protected String name;
    public CustomObject ( String aszName )
    name = aszName;
    public String getName()
    return name;
    public void setName(String newName)
    name = newName;
    a.. a startup class
    package StartupJNDI;
    import javax.naming.*;
    public class Registration
    public Registration()
    InitialContext initCtx = null;
    try
    initCtx = new InitialContext ();
    initCtx.bind ( "Startup Registered Object" , new CustomObject ( "This is a void object" ) );
    catch ( Exception ex )
    ex.printStackTrace ( System.err );
    public static void main(String[] args)
    new Registration();
    a.. a startup class in weblogic.properties:
    weblogic.system.startupClass.JNDIStartupRegistration=StartupJNDI.Registration
    Please, be sure that the path to these classes is also registered in the WEBLOGIC_CLASSPATH system property (e.g. : in your startweblogic.cmd file on Windows NT).
    You can check that the object is bound in the JNDI tree through the console.
    Hope this helps,
    Cordialement,
    Etienne
    Yiwen Tian <[email protected]> a écrit dans le message : [email protected]..
    >
    I want to bind my custom object to jndi when weblogic server start. how can i do?
    [att1.html]

  • Help-Cubes are not getting started when Analytical server started in 11.1.1

    Installed Oracle Essbase Analytical server along with Shared Services, Provider Services and Integration Services thru EPM v11.1.1.3. Shared services and provider services on Windows 2003 and Essbase Analytical Services and Integration Services on UNIX/AIX. All the components got configured successfully. Copied the essbase.sec from the server which has previous version (v11.1.1.1.0) of Essbase. We have been encountering couple of problems. The first one is the applications(cubes) didn't start when the analytical server started. The second one is when trying to start using MAXL script, the applications took long time (more than 30 minutes) to start.
    Any suggestions that you may have in resolving this are appreciated. Thanks,

    In the application properties, is the box 'Start application when Essbase server starts' checked? If not, that's why they didn't automatically start. Also, once you started them manually, does it still take 30 minutes to start? Or is shutdown and startup faster now?
    Sabrina

  • Server started in RUNNING mode not showing in Startup Log File when MS Starts

    Dear all,
    When we start OSB Managed Server, server status is showing Running Status in Web logic console and it is also serving the requests. but in server Start up log file, it is not showing 'Server started in RUNNING mode' after it started.
    this behavior is only for 4 managed servers in cluster of 6 managed servers. other 2 managed servers are starting and showing the message correctly.
    please some body show some light on it as we need to fix this issue urgently.
    thanks in advance.
    pr

    Dear all,
    When we start OSB Managed Server, server status is showing Running Status in Web logic console and it is also serving the requests. but in server Start up log file, it is not showing 'Server started in RUNNING mode' after it started.
    this behavior is only for 4 managed servers in cluster of 6 managed servers. other 2 managed servers are starting and showing the message correctly.
    please some body show some light on it as we need to fix this issue urgently.
    thanks in advance.
    pr

  • Java VM hangs when I start Derby Server

    Hey everyone,
    Help will be much appreciated so cheers in advance.
    I've made a desktop app through Netbeans that runs fine within the IDE but can't get it to work from outside (unless I've connected to the server from within Netbeans first so guessing its not the app itself rather the conenction to the server?)
    I'm using Java version 1.6.0_17 and am confuzled as to why the VM hangs when I try to start the Derby server from a Batch file.
    my batch file reads:
    set DERBY_HOME = M:\Business\Registers\Lodgements Registers\LodgementsDB\Sun\JavaDB
    Path = %DERBY_HOME%\bin;%Path%
    java -jar "%DERBY_HOME%\lib\derbyrun.jar" server start
    java -jar "M:\Business\Registers\Lodgements Registers\LodgementsDB\Lodgements\dist\Lodgements.jar"
    echo "Press any key to shutdown Server"
    pause
    java -jar "%DERBY_HOME%\lib\derbyrun.jar" server shutdown
    I've checked the Derby log file and its reading
    2010-02-16 09:00:37.530 GMT : Apache Derby Network Server - 10.5.3.0 - (802917) started and ready to accept connections on port 1527
    Just running java -jar "M:\Business\Registers\Lodgements Registers\LodgementsDB\Lodgements\dist\Lodgements.jar"
    gives all the usual java.sql.SQLNonTransientConnectionException .... I gather because it can't find the database if the server isn't open.
    The only other info I have to go on is the problem reporting in Vista which states the obvious (that the Java SE binary stopped working and was closed, tagging it with an AppHangB1)
    Also, in advance, is there a more common way of starting the server from outside nettbeans (eg code) that doesn't rely on command prompt- seems daft to me not to have this (and yes I am a first time derby user, used the Toplink persistence libs throughout my code if that helps?).

    Nothing is hanging, this is a misunderstanding of how a batch file works. A batch file is processed line by line, and only when the execution of the task or program (in this case your first call to Java) returns, execution will continue on the next line. As the first call starts Derby and only completes when Derby is stopped, your batch file will not continue with the next line until you kill Derby.
    You either need to start Derby separately, inside your application or using a batch command to launch Derby in a separate process so the batch file won't wait until completion. AFAIK this can be achieved using the command START (eg START java (rest of the commandline))

  • Server start arguments ignored when starting managed server

    Hi
    We have configured a bunch of arguments for the managed server through the Admin Console in the Server->Start Arguments
    However those arguments are not picked up when we are starting the managed server.
    We are using a shell script to start the managed server using the weblogic.Admin class functionality.
    If the arguments are set in the JAVA_OPTIONS of setDomainEnv.sh, then they are picked up when starting the managed server.
    The nodemanager is configured with startScriptEnabled=true and startscript set to startWeblogic.sh.
    This is the scenario in Weblogic 10.0.0.
    Can anybody please explain why the arguments are not picked up?
    We tried the same arguments in Weblogic 10.2 and the arguments are picked up even if they are not configured in setDomainEnv.sh
    Is the difference in behavior because of the difference in versions?
    Edited by: user1030647 on Aug 29, 2010 12:26 AM

    Thanks Jay for the immediate responses.
    The thing I am worried about is it seems the behavior in Weblogic 10.0.2 seems to be in consistent with the behavior in Weblogic 10.0.0.
    In Weblogic 10.0.2, even if the JAVA_OPTIONS in setDomainEnv.sh do not include the paramaters that are set in "Server Start->Arguments", when starting the managed servers, they are picked up as can be seen from the managed server log files.
    However, in Weblogic 10.0.0, it seems that these options are not picked up when they are configured in "Server Start->Arguments". Only when they are configured in setDomainEnv.sh are they picked up.
    Do you have any info which points to this discrepancy?

Maybe you are looking for

  • HELP!! - Brand New z87gd85 no display and now no power ?

    I bought new PC 2 days back here's the config - Processor - 4770k Motherboard - MSI z87GD65 gamming GPU - MSI TwinFrozer GTX 780 gamming RAM - Corsair vengence 8gb x 2 PSU - Corsair TX 850 UPS - APC 1500va Model : BR1500 Cabinet - Corsair 400R I asse

  • How can I delete an Apple ID or email I entered accidently

    When trying to download a game I accidently typed in an incorrect email now I try to sign in and it asks for password

  • How to change data element in table?

    Hello all:       I just need to change data element for a field in some Z table. I know I can do it through SE11 but I just want to make sure if there is anything I should be aware of? Are there any other steps I should perform apart from making chan

  • Org Unit determination

    Hi, While creating sales transactions from the web shop, the org unit does not get determined in the back end CRM intermittently. The Sales Org, Sales Office, Sales Group,  Division and distribution Channel are all determined correctly, but the Org U

  • Resetting Photo Stream Problem

    I have problem resetting my photo stream on iCloud. Cant find the advance option under my email account it was replace by notification option. Any idea where can I find the advance option under iCloud.com