Executing a program when the server starts

I have developed a chat program and to run it I have type "java ChatManager".
Is there a way where this program can start automatically when I start the tomcat.
Regards,
Sharad

The chat application is a java file. I need to keep it running so that I can use it in my applet. The problem is after I start the tomcat, I have start the chat application and for this I open a new window and type "java ChatManager". Once this is done I can start using the chat applet. Is there a way, where the chat application starts automatically when the tomcat starts. Do I need to add something in the server.xml file for this.
Regards,
Sharad

Similar Messages

  • On Windows Server 2008, local account passwords are reset when the server is rebooted. Why, and how do we fix?

    We are running a commercial application on a Windows 2008 Server. After reboot, we cannot access the application because two services fail to start. The reason they fail to start is that the passwords to the local user accounts tied to those services have
    either been deleted or reset to a different value. In order to restart the application, we must reset the passwords of these two local accounts, then stop and restart all the application's services.  According to the application's maker, the accounts
    must be local.
    My colleague believes the passwords are being deleted or reset as a result of a global domain policy.  Is this likely?
    Assuming my colleague is correct, is there anything we can do locally to prevent these passwords from being deleted or reset when the server reboots?  If not, what is the most granular change we can ask our AD adminstrators to make to the policy, so
    that these local accounts are not touched at reboot.
    Thanks.

    Hello,
    have you configured the accounts to have the permission "Log on as a service"? I have seen that this is not given to the account and therefore the service fails to start.
    Best regards
    Meinolf Weber
    MVP, MCP, MCTS
    Microsoft MVP - Directory Services
    My Blog: http://blogs.msmvps.com/MWeber
    Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    Twitter:  

  • 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

  • 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

  • Error NL-00051 when the listener starts up

    Hi,
    I'm getting an error when the listener starts up on my NT4 system. I have Oracl 8.0.4 running and for some reason I get:
    NL-00051: internal error code, arguments: [302], [1], [], [], [], [], []
    Does anybody know why this is happening. The listener no longer works and the DB's are out of use.
    Any help would be appreciated.
    Thanks,
    Mark Willems

    bash-2.05$ oerr nl 51
    00051, 00000, "internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s
    ], [%s]"
    // *Cause:  This is the generic internal error code for NPD program
    // exceptions. This indicates that a process has encountered an
    // exceptional condition.
    // *Action: Report as a bug - the first argument is the internal error number
    // The second argument is the "emfi" (err msg file index).

  • Start deployed applications when J2EE Server starts

    Hi experts,
    This is my problem.
    I've updated my Netweaver 04s Developer Workplace from SPS1 to SPS10.
    The problem I have is that when I start my J2EE Server via MMC, the applications (j2ee,ear,webdynpro,...) I deployed don't start.
    If in my Visual Administrator I go to server->services->deploy most of them are not started. I can start them manually, but that's not a solution...
    I suppose there are any possibities to set this applications to start when the server is started.
    Any ideas?
    Thanks a lot.
    Alberto.

    Hi Alberto
    If you can start the services manually w/o problems, then maybe you can try to change the startup mode to 'always' so that the service is started automatically. You should be able to check this via Configtool. Switch to the 'configuration editor' mode and go to cluster_data -> server -> cfg -> services. Look for the service and make click on the propertysheet. Usually you can modify the startup mode there.
    I hope this helps.
    Regards,
    Désiré

  • A premature end-of-message was encountered--an incoming data stream was interrupted when the server expected to see more data

     I am getting this error when try to transfer data from an hosted database.
    An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "While reading current row from host, a premature end-of-message was encountered--an incoming data stream was interrupted when the server expected to see more data. The host program may have terminated. Ensure that you are using a supported client application programming interface (API).".
    How can I work around this?
    This is a simple data flow from a SQL 2005 table using SQL 2008 SSIS. going to a SQL 2008 table
    ThanksSQL Server MVP http:\\sqlblogcasts.com\blogs\simons

    You can still keep the NVARCHAR computed column in the table, but you cannot use MAX for the length, just use a fixed size and it will work like a charm (i.e. convert the whole result of the computation to NVARCHAR(4000)).
    Laurent.

  • Since upgrading to Yosemite I am getting frequently "safari can't open the page (blank) because the server unexpectedly dropped the connection this sometimes occurs when the server is busy. wait and then try again"

    Since upgrading to Yosemite on my iMac I am frequently getting "safari can't open the page (blank) because the server unexpectedly dropped the connection this sometimes occurs when the server is busy. wait and then try again". This is with both a WiFi and Ethernet connection. The server is working fine from other devices using WiFi onto it such as iPhones, iPads, MacBook (which is also on Yosemite) so don't believe its an issue with the server.
    I am also noticing page load very slowly when this problem is not occurring.

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled in OS X 10.9 or earlier, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

  • How to show  an error Page in Weblogic when the server is down

    Hi ,
    I heard that every container has the facility to show an error page when the server is down and (when the request has arrived at that time ).
    Please tell me how to configure this in BEA weblogic ??
    Thanks .

    Hi,
    From my understanding weblogic dose not provide the thing which you are asking for, reason is given below.
    - An application is deployed only on managed server one (MS-1)
    - Now if the request comes to the server (MS-1) when it was running and then for some reason MS-1 goes down then weblogic server would be able to send any response back to the client as its down.
    - Hence nothing can be done as the request object is been lost when the server goes down or even cant redirect to an error page as for doing that too the server has to be up and running.
    However there are other way round which can help you overcome this issue as shown below
    - Use Clusters with few managed servers in it which gives you high availability and load-balancing.
    - Use any web servers like Apache in front of weblogic servers.
    Using the above things you can also use customized HTTP Error Responses with error-page element in web.xml and create your own error pages which can be re-directed for the web server side also. For more information go through the below links
    Topic: Customizing HTTP Error Responses
    http://download.oracle.com/docs/cd/E13222_01/wls/docs92/webapp/configurejsp.html#wp157884
    Topic: error-page
    http://download.oracle.com/docs/cd/E13222_01/wls/docs81/webapp/web_xml.html#1017571
    Topic: ErrorPage
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/plugins/plugin_params.html#wp1155425
    Hope above information helps you.
    Regards,
    Ravish

  • Bluetooth no longer loads automatically when the computer starts

    I have the Bluetooth Stack version 2.01.21.1. It was working fine. When the laptop booted up, the bluetooth mouse was automatically connected.
    All of a sudden the icon no longer appears automatically in the system tray and so I have to manually connect the mouse each time
    It is still listed in the startup menu on the desktop and it is still checked in startup in the msconfig.
    How do I fix this?
    Thanks in advance

    I have just gotten off the phone with a microsoft tech who actually seems to have fixed this somewhat
    He went to start/run to get to services.msc.
    He chose "SSDP Discovery Services" which "enables discovery of
    UPnP devices on your home network" and DISABLED it.
    Go figure
    The BT icon now appears in my system tray and starts up automatically when the computer starts.
    I say somewhat because It still disconnects if left idle for a long period, which it did not do previously, but at least it is there when I log on.
    I want to mention that I have a Dell, not a Toshiba (did not realize this forum was for Toshiba laptops rather than Toshiba software) but perhaps
    you will find this information useful.
    Also, at http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx you will find an autorun tool that lets you fix what is or is not
    in the startup menus. It seems to work better than using msconfig which on my laptop was not making a difference as to what started up and what did not.
    It is meant for IT professionals so I would not mess with it too much. However if you just check or uncheck in the startups for the BT manager you will
    not do any damage.

  • I have been dealing with crashing and freezing issues on my iMac for 6 months.  A supervisor has been assisting me but the issue is not getting fixed.  The computer was under when the issues started.  He wants to get us a new computer but is not allowed.

    Our iMac was under warranty when it began freezing and or crashing.  I have spent several hours on the phone with a supervisor and had the machine in 2x.  We have also had a repair done in our home.  The problems persist.  We feel apple owes us a new computer.   Help!!!

    Do you have a written record of your attempts to get it repaired?  When you took the machine "in" for repairs, did you take it to an Apple Store or to an Apple Authorized Reseller or Repair Facility, and do you have copies of invoices or statements showing what repairs were made?  If the answers are yes, you need to be persistent in attempting to get a new computer.  Ask to talk to the supervisor's supervisor to "escalate" the complaint to a higher level.  Get copies of all your repair information and send a letter to the Apple Customer Service people in California and ask them for help.
    If your iMac was under warranty when the problems started and the problems have not been resolved, your position should be that the problems should still be fixed or the computer replaced even though the warranty may have expired in the interim.  Do you live in the US?  If yes, your home state has a Consumer Protection agency.  File a complaint with them and ask for their assistance in mediating and/or resolving the matter.

  • Folder Redirection policy is not applied to a user, when the server target is changed, but works after resetting the windows profile.

    Folder Redirection policy is not applied to a user, when the server target is changed. 
    After server target is changed via group policy, when user login  (roaming profile)first time, the the new server target has not been applied, instead it's pointing to the old folder redirection path.
    But if we reset the windows profile (roaming ), the new folder redirection works, can you please specify a solutions that the new folder redirection works when the user login for the first time. so it reduce the time on resetting users profile.
    it seems that we need to delete the old folder redirection path from the user profile (roaming user profile) via group policy or similar solutions..
    Many Thanks

    >   But when the specific users login they all get the same error, it
    Is the old server removed from the domain? Seems so - or some other
    authentication related issue, hard to tell from here...
    > seems that the roaming user profiles still keeps the old server details,
    Yes - if you change redirection targets, FR moves content from old to
    new, and only if this ends sucessfully, it will update the redirection
    target.
    Make the old redirection target accessible to the user and you'll be fine.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • On the iPhone, when the server rejects the email address and it sits in the outbox, why doesn't it automatically resend when the server is fixed?

    On the iPhone, when the server rejects the email address and it sits in the outbox, why doesn't it automatically resend when the server is fixed?

    Hi Razmee,
    Thanks for your response.
    The mail server worked when I originally set it up and continued to work for months afterwards.
    What would make the outgoing mail server not be set up correctly after all that time?
    Thanks again.

  • Problems when the server is down

    When the server is restarted after a task is assigned, this task saves its state
    (claimed). After that, when I try to mark that task as completed, the server says
    that the conversation id is not found. Is that a Bug? or how can I fix that problem?
    Thank you

    The process doesn't finish because it's waiting for a task complete event.
    "Raja" <[email protected]> wrote:
    >
    i face this problem frequently. I believe the archival and Purging process
    of the
    WL integration archives and purges the Process Instance Info for those
    instances
    that are completed or Terminated. But i could see the tasks created by
    these instances
    left behind. If a user does any operation on these tasks result is the
    "Conversion
    Id not found exception". Iam not sure if this is a bug or is it by design.
    "David Uribe" <[email protected]> wrote:
    When the server is restarted after a task is assigned, this task saves
    its state
    (claimed). After that, when I try to mark that task as completed, the
    server says
    that the conversation id is not found. Is that a Bug? or how can I fix
    that problem?
    Thank you

  • TS1702 Safari has just stopped opening PDF docs, it shows the message that I get on my PC when the server is unavailable etc.  Foxbrowser opens them fine.  Thanks  I.M.

    Safari has just stopped opening PDF docs, it shows the message that I get on my PC when the server is unavailable etc.  Foxbrowser opens them fine.  Thanks  I.M.

    Hello kmanthie,
    I just sent you a private message. If you are not sure how to check your forum messages, this post has instructions.
    I worked on behalf of HP.

Maybe you are looking for

  • Can't open pdf attachment on Palm TX with Adobe For Palm download

    I downloaded Adobe for Palm OS (v. 3.0) to open email pdf attachments, but am getting error message: Attachment (not supported in this version) winmail.dat So can not open any pdf attachments. Tried getting mail via VersaMail and via m.comcast.net -

  • Trouble copying videos to ipod

    when i connect my ipod to my computer, it updates my songs fine, but but it wont put my new videos on. i dont get an error message or anything, i just look in my videos on my ipod and they arent there... i know they're the right format, because i eve

  • Error in Mondrian

    I downloaded Tomcat 5.0 and j2sdk1.4.2_05 and installed both of them on my system. Tomcat starts running properly and runs the index file. But when I try running some jsp pages I get the " org.apache.jasper.JasperException: Unable to compile class fo

  • How to set up an iTunes account for my new ipad?

    How to set up an iTunes account for my new ipad?

  • Fetching resultSet

    What is the use of fetching a ResultSet? and how can we implemnet it?,