How to start RMI Server Jar on server?

Im using RMI, I have two jar files. One Server Jar which contains rmi server, registry start code and all methods which performs action on database .
I put this jar file on tomcat web-apps directory.
Another jar is containing User Interface code, which runs on client side.
for performing any action server jar needs to be run all the time and RMI Registry always needs to be started so that client can communicate with database.
How can i execute this server jar from client ?

You can't execute the server from the client. The question doesn't begin to make sense. The server has to be already running for the client to have anything to connect to. You have to organise something at the server side to start it. And putting JAR files into the web apps directory doesn't accomplish that. You could write a Servlet or a listener that starts the RMI server when it's initialised, and stops it when destroyed. If you have to run it inside Tomcat at all, which isn't necessarily a good idea.

Similar Messages

  • How to start and stop Oracle Application Server from ANT

    How to start and stop Oracle Application Server and Web application from ANT
    Thanks in Advance.
    Mani

    Hi,
    You can use: startManagedWebLogic.sh, it is in your domain directory and you have to execute it in this way
    ./startManagedWebLogic.sh managedServerName http://adminServerHost:adminServerPort
    For instance, in my case I use:
    unixserv01:/webportal/domains/appServerWeb/bin>startManagedWebLogic.sh managedServ01 http://pelma3w3per01.mesaperu.next:7001
    You have to run it on the machine where the managed server was installed.
    Best regards,
    Raúl

  • How Auto starting Physical Standby Database ( when Server Restart)

    Dear All(s)
    I have configure oracle (10.2.0) dataguard on production database, some time server restart due to power disconnectivity, i want to restard dataguard when server restart. i am using Server 2003 32bit. Guide me how i can run following commands when server restart.
    SQL> connect/as sysdba
    SQL> Startup mount;
    SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    Thanks in Advance

    i want to run these command each time when server restart.Yes, I did understand that... but what's the problem ? can't you schedule a task when the server starts ?

  • How to start new instance of Application server 6.0 sp3 on Solaris

    Hi!
    I am a new user of iPlanet Application server (ver. 6.0 sp3) for Solaris and I have problems with starting new instance of App. Server. Directory server and administration server are started during installation but application server isn't started. I've used Application Server Command Line Utilities to start server but I've got message "you must register
    the server instance via the application server admin tool". I've tried to do that but I don't know how. I've searched documentation and I haven't found what I'm looking for.I would like to know where can I find instructions for starting App. server?

    Hello,
    Start your "ksvradmin" from $IASHOME/bin/ksvradmin tool - a GUI tool and under file menu register the server instance by supplying port on which the server is running.. it is intuitive..
    Thanks
    Sudhir

  • How to start two instances of InDesign server independently?

    Hello,
    we have a multi instance InDesign server installation.
    And we are able to start two instances of InDesign server on different ports.
    But now we would like to use different plugins for different instances.
    Is it possible somehow? For example install InDesign server two times in different folders or something like that?
    Thank you in advance.

    InDesign plugin loading can be controlled via a file "PluginConfig.txt", refer to search for details.
    InDesign Server has separate configuration folders per instance/configuration.
    *If* the search path for the PluginConfig.txt falls into this folder, that would be the easiest approach.
    I don't have a server installation with me to try it out.
    Dirk

  • How to start IP Filter in DNS server

    I am using Solaris 10 x86 05/08.
    In this server sun Java Messaging server and DNS server is running.
    I want to start IP Filter to this server. I can allow allth ports that nessosary to Mail server.But although i enable the TCP/UDP 53 port to DNS we cant resolve the domain names.
    Can any one help please...

    # Block any packets which are too short to be real
    block in log quick all with short
    # Allow all traffic on loop-back
    pass in quick on lo0 all
    pass out quick on lo0 all
    # Allow ICMP
    pass in quick proto icmp all keep state
    pass out quick proto icmp all keep state
    # Allow DNS traffic
    pass in quick proto tcp/udp from any to any port = domain keep state
    pass out quick proto tcp/udp from any to any port = domain keep state
    pass in quick proto tcp/udp from any to any port = domain with oow
    pass out quick proto tcp/udp from any to any port = domain with oow
    blobk return-icmp(net-unr) in proto udp all
    block in log
    block out log

  • How to start Sun Java System Application Server 9.0

    yesterday morning i downloaded the software from sun.java.com and installed it .but i failed in starting the application server on my system(windows). i read the quick start guide and followed the steps : <From the Start menu, choose Programs => Sun Microsystems => Application Server PE 9 => Start Default Server. > the first try the message appeared in the command window is <domain listens on at least following ports for connections:[8080 8181 4848 3700 3820 3920 8686 ]> . i tried it later for several times ,but i got a same answer [b]<the domain (domain1) is already running .cli156 could not start the domain domain1> . both of the two answers are different from the message shows in the Guide . finally i failed . i hope someone can help me , i will really appreciate it .
    sent by :
    meansun

    dear skgaju,thank you very much ! but i am still in the trouble. i failed in the step http://<IP>:port/ whether i typed the port number 4849 or 4848 . and then i try to open domain.xml. but it shows [the system can not find the appointed object and something wrong when system deals with the resource : of 'http://www.sun.com/software/appserver/dtds/sun-domain_1_2.dtd' . i puzzled. could you tell me what's wrong with my machine?

  • How to start SNMP on LDAP Dir. server ? Is that runs on port 161 ?

    When I click 'SNMP' tab on configuration it says "The snmp service has been started" But when I try to stop or restart it says, "Error occured while stop/restating subagent. Check the configuration data you entered"
    Where do I check the config. data ?
    Do I need to enable somewhere snmp ???
    I want to browse the SNMP mib from our App.
    For that I'm trying to run the snmp agent on dir. server.
    any help ?
    Thanx,
    Ramesh//

    The SNMP services can be stoped from the configuration tab but that does not stop the SNMP subagent it has to be explicitly stoped if Ur running from windows machine go to the control panel and stop the services.
    If U'r running the Directory server from unix host the hostname where the master agent resides and the port no is must for the subagent to contact.
    Regarding the port no SNMP is running if Ur using unix host check the /etc/services file for the port no for SNMP services.

  • How to start developing forms with weblogic server???

    I am a beginner. I saw someone working on developer 6i and I love the ease so I come to oracle. BUT now I find this weblogic server for desktop applications (forms) too.
    1. Please recommend me a book for developing desktop applications in weblogic server.
    2. Is it possible to use Mysql as database while developing forms in weblogic server?
    Many thanks

    I am a beginner. I saw someone working on developer 6i and I love the ease so I come to oracle. BUT now I find this weblogic server for desktop applications (forms) too.You have to keep in mind that Oracle Developer Suite 6i (Forms/Reports) is over 10 years old and was primarily a Client/Server development environment. Yes, a Forms 6i application could be deployed to the web, but infrastruction has changed many times in the 10+ years since Forms 6i was introduced.
    1. Please recommend me a book for developing desktop applications in weblogic server.Are you talking about an Oracle Forms application deployed through the WebLogic application server? If so, take a look at Developing Oracle Forms Applications or Oracle9i Developer: Developing Web Applications with Forms Builder. These are older books, but they will give you the basics of Oracle Forms development. Once you have the basics of Forms Development, then you can refer to the product documentation for specifics on the particular version of Forms you are using:
    Oracle Forms 10g Online Book - Contents or <a href="http://download.oracle.com/docs/cd/E12839_01/index.htm>Oracle Fusion Middleware Documenation LIbrary</a> and select the Portal, Forms, Reports and Discoverer option.
    {quote2. Is it possible to use Mysql as database while developing forms in weblogic server?{quote
    You can use MySQL with your web app only if you are not using Oracle Forms! Oracle Forms will only communicate with an Oracle Database. There are methods available to access data from non-Oracle database, but they involved linking your Oracle Database to the non-Oracle database and accessing the data through the Oracle Database.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to start jdk1.4.2 application server

    Hello:
    am using jdk1.4.2 on fedora core 1. I need to set up my default application server that comes with j2sdk1.4.2. could any one guide me with those steps...
    my path is eg, /shan/jdk/bin
    Thanks
    Shan
    [email protected]

    There is no "default application server" in the J2SDK - that's just plain Java. Mind you, I'm not trying to be nasty here, but since you didn't know that, don't you think your e-mail address is a bit misleading?

  • How to start rmi on a computer with 2 network cards ?

    I would like to write a programm to get system informations from any linux computer connected to a network. A RMI server installed on each network computer measures the informations and send them to a RMI Client based on a central computer, where the information is stored on database.
    Each computer is identified by its IP address. This is why the IP adress is sent with the string of system informations. For instance, the information sent for a CPU measure is :
    <Computer>
    <AddIP>192.168.1.1</AddIP>
    <CPU><Frequency>500</Frequency><Brand>Intel</Brand></CPU>
    </Computer>
    In the case when a computer has two IP adresses : 192.168.1.1 and 192.168.2.64, if the computer is reached by 192.168.1.1 it should return the following string :
    <Computer>
    <AddIP>192.168.1.1</AddIP>
    <CPU><Frequency>500</Frequency><Brand>Intel</Brand></CPU>
    </Computer>
    and if reached by 192.168.2.64 :
    <Computer>
    <AddIP>192.168.2.64</AddIP>
    <CPU><Frequency>500</Frequency><Brand>Intel</Brand></CPU>
    </Computer>
    The string does not contains all IP adresses but these from which the computer was asked for a measurement. Here is the code for the RMI server :
    public class ServeurAgent {
    public ServeurAgent() {
    try {
    // we launched a RMI service for each IP address :
    LocateRegistry.createRegistry(portRMIAgent);
    // the 192.168.1.1 parameter for AgentImpl is only
         // used to generate the XML String
    Agent agent1 = new AgentImpl(192.168.1.1);
    Naming.rebind("rmi://192.168.1.1:1099/serviceRMI",agent);
    Agent agent2 = new AgentImpl(192.168.2.64);
    Naming.rebind("rmi://192.168.2.64:1099/serviceRMI",agent);
    catch (Exception e) {
    System.out.println("echec du lancement des Agents : "+e);
    public static void main(String args[]) {
    new ServeurAgent();
    We hoped that when the RMI client asked for a measurement on one IP address we could get in the XML String the same IP address, but the problem is that whatever the IP adress is asked, the XML String always contains the same IP address. For example if we ask for a measurement on the 192.168.2.64 adress we have got :
    <Computer>
    <AddIP>192.168.1.1</AddIP>
    <CPU><Frequency>500</Frequency><Brand>Intel</Brand></CPU>
    </Computer>
    instead of :
    <Computer>
    <AddIP>192.168.2.64</AddIP>
    <CPU><Frequency>500</Frequency><Brand>Intel</Brand></CPU>
    </Computer>
    Do you have any idea of what could be the problem ? Is the code correctly written ?
    Here is the code for the RMI client :
    public void mesurer(ipAdress) {
    try {
    valeur_mesures = "";
              Agent agent = (Agent) Naming.lookup("rmi://"+ ipAdress +":1099/serviceRMI");
              // valeur_mesures is the XML string
              valeur_mesures = agent.getCPUs();
    catch (MalformedURLException murle) {
    System.out.println();
    System.out.println("MalformedURLException");
    System.out.println(murle);
    catch (RemoteException re) {
    System.out.println();
    System.out.println("RemoteException");
    System.out.println(re);
    } catch (NotBoundException nbe) {
    System.out.println();
    System.out.println("NotBoundException");
    System.out.println(nbe);
    Thank you for your help.

    You may have solved it by now but your code is using the wrong variables when binding objects:
    Agent agent1 = new AgentImpl(192.168.1.1);
    Naming.rebind("rmi://192.168.1.1:1099/serviceRMI",agent);
    Agent agent2 = new AgentImpl(192.168.2.64);
    Naming.rebind("rmi://192.168.2.64:1099/serviceRMI",agent);
    Notice you are creating agents "agent1" and "agent2" but you are storing the stub of an instance called "agent".
    Otherwise, it should work so long as the names you are binding the variables to are unique and not rebound anywhere else.

  • How to start/stop network sharing??

    I would like to know how to start my mac as a server, and how to stop it from being seen by someone else in the network. I recently used a colleague's machine, and to my surprise, I was able to see my computer in the network as a server, i could access my files and it scared the beejesus out of me...any hints??
    thanks

    Check  | System Preferences | Sharing | Firewall.
    If it says "Firewall Off" then click on the Start button.
    If it says "Firewall On" then uncheck any unwanted services in the list here and also in the "Services" panel (which is all the stuff that is grayed out on the "Firewall" panel).
    If it says "Firewall On" and you don't have any services checked in the "Services" and "Firewall" panels, then we will need more info and checks to ascertain what is going on. But let's do the easy checks first.

  • Can't start RMI server using JAR file

    I found it interesting that if I start my RMI server from
    a plain directory, everything goes fine.
    But if I jar all these necessary files into a jar file,
    and start my RMI server with command below
    java -jar server.jar
    UnmarshalException and ClassNotFoundException are
    thrown to indecate that my stub class can't be found
    (which I'm sure my stub class is in jar file)
    Why is jar file so special that it can't act like
    what it originally does when it hasn't been jared?
    or I really should take care of some configuration
    before I really can run a jar file?
    thanks

    To clarify few things...
    What I don't understand is that when I convert all my
    directories and class files properly into the jar file, they
    just can't work properly.
    I don't know if it's a problem of JAR file,
    or it's RMI that make this JAR file special?
    I'll simulate my JAR file structure that listed below,
    these structure works fine when they have'nt been
    converted into JAR file.
    META-INF/
    META-INF/MANIFEST.MF
    a/b/x1.class
    a/b/x2.class
    a/b/c/Y.class
    a/b/c/Y_Skel.class
    a/b/c/Y_Stub.class
    And when I use command "java -jar server.jar"
    to run my application, ClassNotFound exception
    is thrown to indecate my stub class is not found.
    Is there anything I can do to correct this?
    thanks

  • How to Start Java RMI Server Application as Windows NT Service

    Hi!!,
    I have problem regarding the Installation of Java Application as NT Service this Java app in turn will start RMI Registry using LocateRegistry.createRegistry() at some specific port number. The Service is created successfully but i have problem regarding the Accessing of this Remote Object using Lookup() .(ie) I am able to get the RMI Registry Obj Refererce of the Java Rmi Application but couldn't able to Lookup for the Object registered to this Rmi Registry.I am not able to proceed after getting the Rmi Registry reference.
    So any help Regarding this is appreciated.
    Thanks in Advance.
    with regards,
    Ramakrishna M
    Mail: [email protected]

    Hello,
    I have started a Java RMI Server Application as NT Service using JNT (download it from www.eworksmart.com/JNT/ ).
    It is working fine.
    S. Navaneethakrishnan
    [email protected]

  • How to start and stop server?

    This is a design issue that may not belong in this forum, but bear with me, please.
    I have a stand-alone RMI server that I start thusly:
    public class StartServer {
        public static void main( String[] args )
            AppContext context = Server.getContext();
            String name = context.getProperty("dbServerRegistryName", String.class );
            String policyFile = context.getProperty("securityPolicy", String.class );
            System.setProperty("java.security.policy", policyFile );
            if( System.getSecurityManager() == null) {
                System.setSecurityManager(new RMISecurityManager());
            Registry registry = null;
            try {
                ServerImpl server = context.getObject( ServerImpl.class );
                server.initialize();
                registry = LocateRegistry.getRegistry();
                 * Use a stub when the server doesn't extend UnicastRemoteObject.
                Server stub =
                    (Server)UnicastRemoteObject.exportObject( server, 0);
                registry.rebind( name, stub );
                stdout.println("Server is ready.");
            }  catch( Throwable ex )  {
    }The server continues to run in the main thread when main() ends, which is okay I suppose.
    Now I have another class that stops it:
    public final class StopServer {
        public static void main( String[] args )
           /* Same setup code */
            try {
                Server server = (Server)Naming.lookup( name );
                if( server.pollReady() )  {
                     * Remote method requiring admin login to execute.
                     * Tells the server to quit.
                    if( server.stop( uName, pwd, delay ) )  {
    // unbind?
            }  catch( Throwable ex )  {
            System.exit( result );
        }                                       // main()
    }The crux of the question is, how should I quit once inside the running server?
        public final synchronized boolean stop ( final String uName, final String pwd, final long millis )
        throws RemoteException, InterruptedException { 
    // TODO  login
            Thread.currentThread().wait( millis );
            Thread.currentThread().interrupt();
    }The server is single-threaded in that it runs the calling thread to completion - there are no spawned or worker threads.
    Does this approach seem reasonable or is there a better technique?

    The server continues to run in the main thread when main() ends, which is okay I suppose. That's what it's meant to do.
    public final synchronized boolean stop ( final String uName, final String pwd, final long millis )
    throws RemoteException, InterruptedException { 
    // TODO  login
    Thread.currentThread().wait( millis );
    Thread.currentThread().interrupt();
    }Does this approach seem reasonable or is there a better technique?That won't stop the server, so no it's not reasonable.
    You should call UnicastRemoteObject.unexportObject(this, true). You don't need the 'millis' argument to this method.

Maybe you are looking for

  • Rebates in SAP Retail

    Hi, One of my clients wants to implement Rebates. Can you ket me know what are the various kinds of rebates that are supported by sap is retail. Some business processess / best process documents will be helpful Thanks Barry

  • *MBP is hot topic*

    I see so many 2011 Macbook Pro heat issue threads, but no resolution of what is too hot. My question is: When I set up this laptop within the hour of unboxing it and run it under stress, what figure (in celcius) should I be on the look out for? In ot

  • Urgent: create sales order in CRM 4.0

    good morning, I'have a problem, i must create a sales orders in CRM 4.0 with Bapi or Function call. I tried tu use: 1) BAPI_BUSPROCESSND_CREATEMULTI and BAPI_BUSPROCESSND_SAVE but finished with error "can't save document"; 2) 'CRMXIF_ORDER_SAVE', but

  • How can I get my ringtones

    How can I get my ringtones

  • 1 G5 2 Projectors wanting to project separately to both

    HI, My church just purchased a new G5. It is hooked up to 2 projectors for the same image output and working fine. Now they want to be able to send different images to each projector. I would like help in what we need and how to do this. Thank you fo