RE: how to shutdown orion app server?
You can shut it down by binding the the ApplicationServerAdministrator. /** OrionServerAdmin.java** Created on May 1, 2002, 10:55 PM*/ package com.objectparadigms.util.admin; import com.objectparadigms.util.exception.InitializationException; import com.evermind.server.administration.ApplicationServerAdministrator;import java.rmi.RemoteException;import java.util.Arrays;import java.util.List;import java.util.Properties;import javax.naming.Context;import javax.naming.InitialContext;import javax.rmi.PortableRemoteObject; / @author Michael C. Han* @version $Revision: 1.1 $*/public class OrionServerAdmin { private static final String _ORION_CTX_FACTORY = "com.evermind.server.rmi.RMIInitialContextFactory"; private ApplicationServerAdministrator _admin; private static final String _HOST_PARAM = "-h"; private static final String _PORT_PARAM = "-p"; private static final String _USERNAME_PARAM = "-u"; private static final String _PASSWORD_PARAM = "-pwd"; private static final String _ACTION_PARAM = "-action"; private static final String _STOP_ACTION = "stop"; private static final String _RESTART_ACTION = "restart"; private static String _getParam(String paramKey, List paramsList) { int index = paramsList.indexOf(paramKey); if (index == -1) { showUsage(); } return (String)paramsList.get(index + 1); } private static void showUsage() { System.out.println("Usage: OrionServerAdmin -h hostname " + "-p port -u username -pwd password " + " -action restart | stop"); System.exit(1); } public static final void main(String[] args) { if (args.length != 10) { showUsage(); } List argsList = Arrays.asList(args); String host = _getParam(_HOST_PARAM, argsList); String port = _getParam(_PORT_PARAM, argsList); String userName = _getParam(_USERNAME_PARAM, argsList); String password = _getParam(_PASSWORD_PARAM, argsList); String action = _getParam(_ACTION_PARAM, argsList); try { OrionServerAdmin svrAdmin = new OrionServerAdmin(host, port, userName, password); if (action.equals(_RESTART_ACTION)) { svrAdmin.restart(); } else if (action.equals(_STOP_ACTION)) { svrAdmin.stop(); } else { showUsage(); } } catch (Exception e) { e.printStackTrace(); } } /** Creates new OrionServerAdmin */ public OrionServerAdmin(String host, String port, String userName, String password) throws InitializationException { Properties props = new Properties(); props.setProperty(Context.INITIAL_CONTEXT_FACTORY, _ORION_CTX_FACTORY); String url = "ormi://" + host + ":" + port; props.setProperty(Context.PROVIDER_URL, url); props.setProperty(Context.SECURITY_PRINCIPAL, userName); props.setProperty(Context.SECURITY_CREDENTIALS, password); try { Context initialCtx = new InitialContext(props); Object obj = initialCtx.lookup("java:comp/ServerAdministrator"); _admin = (ApplicationServerAdministrator) PortableRemoteObject.narrow(obj, ApplicationServerAdministrator.class); } catch (Exception e) { throw new InitializationException(e.toString()); } } public void stop() throws RemoteException { _admin.shutdown("localhost", true); } public void restart() throws RemoteException { _admin.restart("localhost"); } } -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of marsSent: Wednesday, May 01, 2002 9:02 PMTo: Orion-InterestSubject: Re: how to shutdown orion app server? use the follow command killall -15 java - Original Message - From: gusl To: Orion-Interest Sent: Sunday, April 28, 2002 11:25 AM Subject: how to shutdown orion app server? Hi all, I want to know how to shutdown orion app server ??? Use kill ???(under linux)
Re: how to shutdown orion app server?
use the follow command killall -15 java - Original Message - From: gusl To: Orion-Interest Sent: Sunday, April 28, 2002 11:25 AM Subject: how to shutdown orion app server? Hi all, I want to know how to shutdown orion app server ??? Use kill ???(under linux)
Re: how to shutdown orion app server?
Hi. Make sure you remove the'deactivated="false"' for admin in config/principals.xml Lachezar. Hi, I writed one EJB and deployed it successful on Orion 1.5.4. Buti get the Exception when i test it used one client application: javax.naming.AuthenticationException: Invalid username/password for default (admin) at com.evermind._dn._mu(.:2173) at com.evermind._dn._mu(.:2009) at com.evermind._dn._es(.:1590) at com.evermind._bp._es(.:357) at com.evermind.server.rmi.RMIContext.lookup(.:106) at javax.naming.InitialContext.lookup(InitialContext.java:347) at ejbtest.Test1.main(Test1.java:24) code: Properties p = new Properties();p.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");p.put(Context.PROVIDER_URL, "ormi://211.167.71.60:23791");p.put(Context.SECURITY_PRINCIPAL, "admin");p.put(Context.SECURITY_CREDENTIALS, "123");try {Context ctx = new InitialContext(p);OrganizationsHome home = (OrganizationsHome)ctx.lookup("ejb/OrgOrganizations");Organizations remote = (Organizations)home.create();} catch (Exception ex) {ex.printStackTrace();} help me!
Re: how to shutdown orion app server?
Hi Liu, Did you run orion -install when you installed orion (or changed admin password in principals.xml)? This username/password should correspond with the username/password from the jndi.properties file of the client application Mark On Sun, 2002-04-28 at 13:02, Liu Bin wrote: Hi, I writed one EJB and deployed it successful on Orion 1.5.4. But i get the Exception when i test it used one client application: javax.naming.AuthenticationException: Invalid username/password for default (admin) at com.evermind._dn._mu(.:2173) at com.evermind._dn._mu(.:2009) at com.evermind._dn._es(.:1590) at com.evermind._bp._es(.:357) at com.evermind.server.rmi.RMIContext.lookup(.:106) at javax.naming.InitialContext.lookup(InitialContext.java:347) at ejbtest.Test1.main(Test1.java:24) code: Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.rmi.RMIInitialContextFactory); p.put(Context.PROVIDER_URL, ormi://211.167.71.60:23791); p.put(Context.SECURITY_PRINCIPAL, admin); p.put(Context.SECURITY_CREDENTIALS, 123); try { Context ctx = new InitialContext(p); OrganizationsHome home = (OrganizationsHome)ctx.lookup(ejb/OrgOrganizations); Organizations remote = (Organizations)home.create(); } catch (Exception ex) { ex.printStackTrace(); } help me! -- --o-o-- Mark Kettner http://www.fredhopper.com Amsterdam, The Netherlands Phone: +31 20 3206203 Mobile: +31 620 609 817 fax:+31 20 8848747 E-mail: [EMAIL PROTECTED], [EMAIL PROTECTED]
Re: how to shutdown orion app server?
That command seems to hang on linux 2.4.x / 1.3.1 as soon as you've deployed something. It works great on win2k, though, so I suspect the linux JVM. Under linux, I usually have to CTRL-C or kill the process. - Renaud - Original Message - From: Jesper Rasmussen [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Monday, April 29, 2002 7:22 AM Subject: SV: how to shutdown orion app server? java -jar admin.jar ormi://localhost admin 1234 -shutdown where admin is username and 1234 is password For more info: java -jar admin.jar ormi://localhost admin 1234 -help -Oprindelig meddelelse- Fra: gusl [mailto:[EMAIL PROTECTED]] Sendt: 28. april 2002 05:26 Til: Orion-Interest Emne: how to shutdown orion app server? Hi all, I want to know how to shutdown orion app server ??? Use kill ???(under linux)
Re: Re: how to shutdown orion app server?
but i can't look up my ejb,how to config it. thanks Hi. Make sure you remove the'deactivated="false"' for admin in config/principals.xml Lachezar. Hi, I writed one EJB and deployed it successful on Orion 1.5.4. Buti get the Exception when i test it used one client application: javax.naming.AuthenticationException: Invalid username/password for default (admin) at com.evermind._dn._mu(.:2173) at com.evermind._dn._mu(.:2009) at com.evermind._dn._es(.:1590) at com.evermind._bp._es(.:357) at com.evermind.server.rmi.RMIContext.lookup(.:106) at javax.naming.InitialContext.lookup(InitialContext.java:347) at ejbtest.Test1.main(Test1.java:24) code: Properties p = new Properties();p.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");p.put(Context.PROVIDER_URL, "ormi://211.167.71.60:23791");p.put(Context.SECURITY_PRINCIPAL, "admin");p.put(Context.SECURITY_CREDENTIALS, "123");try {Context ctx = new InitialContext(p);OrganizationsHome home = (OrganizationsHome)ctx.lookup("ejb/OrgOrganizations");Organizations remote = (Organizations)home.create();} catch (Exception ex) {ex.printStackTrace();} help me! = = = = = = = = = = = = = = = = = = = = = = ÖÂÀñ£¡ Liu Bin [EMAIL PROTECTED]¡¡2002-04-29 FOX.GIF Description: GIF image
Re: Re: how to shutdown orion app server?
Hi. Again. Now. The code seems correct. Except, the url, that MAY require to be of the type: ormi://localhost/Your_App_Name. If you have deployed your beans in an application, and NOT in the default APP, you HAVE to use the url with the app_name at the end. in config/server.xml application name="Your_App_Name" path="../applications/YourApp.ear"/ in properties: java.naming.provider.url=ormi://your.host.your.domain/Your_App_Name or java.naming.provider.url=ormi://localhost/Your_App_Name FOR LINUX MAINLY! in java code: p.put(Context.PROVIDER_URL, "ormi://localhost/Your_App_Name"); Then you will find your ejbs. I would sincerly offer you to look-up the name of the bean without any prefixes. It is hard to move to other app server sometimes. In your case if you have no ejb-link, ejb-ref and so on stuff, just look-up OrgOrganizations: ctx.lookup("OrgOrganizations"); Also let's note, that if you use the java:comp/* context it may not port well on different servers. Lachezar. P.S. Give ita try and write again. but i can't look up my ejb,how to config it. thanks Hi. Make sure you remove the'deactivated="false"' for admin in config/principals.xml Lachezar. Hi, I writed one EJB and deployed it successful on Orion 1.5.4. Buti get the Exception when i test it used one client application: javax.naming.AuthenticationException: Invalid username/password for default (admin) at com.evermind._dn._mu(.:2173) at com.evermind._dn._mu(.:2009) at com.evermind._dn._es(.:1590) at com.evermind._bp._es(.:357) at com.evermind.server.rmi.RMIContext.lookup(.:106) at javax.naming.InitialContext.lookup(InitialContext.java:347) at ejbtest.Test1.main(Test1.java:24) code: Properties p = new Properties();p.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");p.put(Context.PROVIDER_URL, "ormi://211.167.71.60:23791");p.put(Context.SECURITY_PRINCIPAL, "admin");p.put(Context.SECURITY_CREDENTIALS, "123");try {Context ctx = new InitialContext(p);OrganizationsHome home = (OrganizationsHome)ctx.lookup("ejb/OrgOrganizations");Organizations remote = (Organizations)home.create();} catch (Exception ex) {ex.printStackTrace();} help me! = = = = = = = = = = = = = = = = = = = = = = ÖÂÀñ£¡ Liu Bin [EMAIL PROTECTED]¡¡2002-04-29
Re: how to shutdown orion app server?
Hi, I writed one EJB and deployed it successful on Orion 1.5.4. Buti get the Exception when i test it used one client application: javax.naming.AuthenticationException: Invalid username/password for default (admin) at com.evermind._dn._mu(.:2173) at com.evermind._dn._mu(.:2009) at com.evermind._dn._es(.:1590) at com.evermind._bp._es(.:357) at com.evermind.server.rmi.RMIContext.lookup(.:106) at javax.naming.InitialContext.lookup(InitialContext.java:347) at ejbtest.Test1.main(Test1.java:24) code: Properties p = new Properties();p.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");p.put(Context.PROVIDER_URL, "ormi://211.167.71.60:23791");p.put(Context.SECURITY_PRINCIPAL, "admin");p.put(Context.SECURITY_CREDENTIALS, "123");try {Context ctx = new InitialContext(p);OrganizationsHome home = (OrganizationsHome)ctx.lookup("ejb/OrgOrganizations");Organizations remote = (Organizations)home.create();} catch (Exception ex) {ex.printStackTrace();} help me! FOX.GIF Description: GIF image