Hi there Nit(h)a, That is very much possible but the only thing is that u have to start the 1st server as the default and the 2nd one as the managed server....u can start managed servers and for that u get a seperate .cmd/.bat file ...just have a look at those.. Bye Sahil
Hi sandy, Thats cool , I didn't know this was possible and am going to try it too. Exactly which parameter in the .cmd script tells WebLogic that it is the default, or managed server? Best Regards, Matt [This message has been edited by Matt Midcap (edited February 16, 2001).]
Hi there Guys, I am sorry was not here for a very long time but Now i am back. OK Nitha I am attaching the script of the managed startServer file and u can go thru it. This file shud be placed in the domain that u are going to start as the managed domain/server. Bye' Sahil p.s: Matt, are u gonna gimme a promotion if u are impressed ;-) This script can be used to start Managed WebLogic Server. @rem JAVA_HOME - Determines the version of Java used to start WebLogic Server. This variable must point to the root directory of a JDK or JRE installation. See the WebLogic platform support page Start of Script : cd ..\.. set JAVA_HOME=<jdk> if not exist lib\weblogic.jar goto wrongplace goto checkJRE :wrongplace echo startWebLogic.cmd must be run from the config\SysEng directory. 1>&2 goto finish :checkJRE @dir %JAVA_HOME%\lib > nul if errorlevel 0 goto runWebLogic echo. echo The JRE wasn't found in directory %JAVA_HOME%. echo Please edit the startWebLogic.cmd script so that the JAVA_HOME echo variable points to the root directory of your Java installation. goto finish :runWebLogic if "%1" == "" goto checkEnvVars if "%2" == "" goto usage set SERVER_NAME="%1" set ADMIN_URL="%2" goto startWebLogic :checkEnvVars if "%SERVER_NAME%" == "" goto usage if "%ADMIN_URL%" == "" goto usage set SERVER_NAME="%SERVER_NAME%" set ADMIN_URL="%ADMIN_URL%" goto startWebLogic :usage echo Need to set SERVER_NAME and ADMIN_URL environment variables or specify echo them in command line: echo Usage: startWebLogicManaged [SERVER_NAME] [ADMIN_URL] echo for example: echo startWebLogicManaged managedserver1 http://localhost:7001 goto finish :startWebLogic echo on set PATH=.\bin;%PATH% set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar "%JAVA_HOME%\bin\java" -hotspot -ms64m -mx64m -classpath %CLASSPATH% -Dweblogic.Domain=<domain_name> -Dweblogic.Name=%SERVER_NAME% "-Dbea.home=<drive/bea>" -Dweblogic.management.server=%ADMIN_URL% "-Djava.security.policy==<wl_home>/lib/weblogic.policy" -Dweblogic.management.password=%WLS_PW% weblogic.Server goto finish
Nita there is another way of doing it by creating per server properties and starting each server on different ports. Here you go. This is the simplest procedure for a Solaris computer: ----------------------------- 1: Install WebLogic. Let's say the WL installation folder is: /wls/weblogic/ we'll call that: WL_HOME/WLS_HOME/ It contains the default server instance folder /wls/weblogic/myserver/ we'll call that: WL_HOME/WLS_HOME/myserver/ ----------------------------- 2: Make some copies (as many as you need) of the default server instance folder with different names, you'll have: WL_HOME/WLS_HOME/myserver/ WL_HOME/WLS_HOME/server_1/ WL_HOME/WLS_HOME/server_2/ ... WL_HOME/WLS_HOME/server_n/ ----------------------------- 3: Locate the general properties file /wls/weblogic/weblogic.properties (we'll call it: WL_HOME/WLS_HOME/weblogic.properties) and make a copy of it into EACH of the individual server instance folders; you'll end up with: WL_HOME/WLS_HOME/weblogic.properties WL_HOME/WLS_HOME/myserver/weblogic.properties WL_HOME/WLS_HOME/server_1/weblogic.properties WL_HOME/WLS_HOME/server_2/weblogic.properties ... WL_HOME/WLS_HOME/server_n/weblogic.properties ----------------------------- 4: In EACH server instance's properties file WL_HOME/WLS_HOME/server_i/weblogic.properties set per-server values to all the properties specific to the individual server; at least: weblogic.system.listenPort=PORT_i weblogic.password.system=PWD_i weblogic.system.SSLListenPort=SSLPORT_i plus everything else it should need individually, that is, all the things that make that single server instance different from all the others (connection pools, ACLs, EJB auto deployments and so on) Do NOT modify the file WL_HOME/WLS_HOME/myserver/weblogic.properties (it's a backup copy of the default settings) ----------------------------- 5: In the GLOBAL properties file WL_HOME/WLS_HOME/weblogic.properties cancel or comment out all the properties that have been individually set for all the individual server instances; at least: weblogic.system.listenPort weblogic.password.system weblogic.system.SSLListenPort ----------------------------- 6: Locate the default server's startup script /wls/weblogic/startWebLogic.sh (we'll call it: WL_HOME/WLS_HOME/startWebLogic.sh) and make a copy of it (in the same folder) for EACH of the new individual server instances; you'll end up with: WL_HOME/WLS_HOME/startWebLogic.sh WL_HOME/WLS_HOME/startServer_1.sh WL_HOME/WLS_HOME/startServer_2.sh ... WL_HOME/WLS_HOME/startServer_n.sh ----------------------------- 7: In EACH server instance's startup script WL_HOME/WLS_HOME/startServer_i.sh set values to the properties: weblogic.home=WL_HOME/WLS_HOME (where WL libraries and global files are) weblogic.system.home=WL_HOME/WLS_HOME (where the GLOBAL weblogic.properties is) weblogic.system.name=server_i (where the PER-SERVER weblogic.properties is) weblogic.system.listenPort=PORT_i weblogic.system.SSLListenPort=SSLPORT_i with the -D option, as in: $JAVA $JAVA_OPTIONS -ms64m -mx64m -classpath $JAVACLASSPATH -Dweblogic.class.path=$WEBLOGICCLASSPATH -Dweblogic.home=$WL_ HOME/$WLS_HOME -Dweblogic.system.home=$WL_HOME/$WLS_HOME -Dweblogic.system.n ame=server_i -Djava.security.manager -Djava.security.policy=`pwd`/weblogic. policy -Dweblogic.system.listenPort=PORT_i -Dweblogic.system.SSLListenPort= SSLPORT_i weblogic.Server ----------------------------- 8: If you need individual per-server security policies, also duplicate and customize the default policy file WL_HOME/WLS_HOME/weblogic.policy (just like you did with weblogic.properties in steps 3 to 5) and specify the corresponding property in each startup script with the -D option -Djava.security.policy=`pwd`/server_i/weblogic.policy ----------------------------- 9: Obviously, when you deploy and use your EJBs or JSPs or applications, you must make sure that you specify the right individual server's parameters (name, user, password, port, paths and everything else).
And that's all; obviously, there are better ways to achieve this configuration, but this is the simplest one and is good enough for a basic development environment; you might need to tune some more properties to suit your specific requirements. On a WinNT computer, the procedure should be more or less the same, the main difference being: instead of .sh script files, you'll have to edit .cmd script files.
I am also running multiple instances of weblogic and I have notice that occasionally I will get cross-pollination when I am watching the logs. The logging that should be written to WL_A will instead be written to WL_B. Ultimately, if it's going against separate databases it could potentially create an Object Not Found exception. Has anyone else run into this problem before. - Note I am using different ports for each instance of WL.
Just to add my 2 cents, with WLS 6.0/6.1 it's recommended to have one server running as the adminstration server, hosting no apps; and to have other instances running as managed servers that you install the applications on. The managed servers don't even have to be on the same machine as the admin server.
It's never done THAT before. Explain it to me tiny ad: