Monday, April 9, 2012

Creating 10.3.4 WebLogic Portal domain with different port number


Follow the steps below after Domain Configuration Wizard is completed:

1. add the following two lines in setDomainEnv.cmd with appropriate port number.
@REM Following line customized to change the port for derby
set DERBY_CMD_LINE_ARGS=-p=1529

2. Start the derby database with different port number as follows:
C:\portal-10.3.4\wlserver_10.3\common\bin\startDerby.cmd -p=1529

3. Modify database.properites with new port as follows:
derby.url=jdbc:derby://localhost:1529/weblogic_eval;create=true
derby.driver=org.apache.derby.jdbc.ClientDriver

4. Run the db script C:\portal-10.3.4\user_projects\domains\ngx_domain01\create_db.cmd

5. Modify startWeblogic.cmd as follows:
@REM Start Derby

set DERBY_DEBUG_LEVEL=0
echo #############################################################
echo DERBY_CMD_LINE_ARGS=%DERBY_CMD_LINE_ARGS%
echo #############################################################
if "%DERBY_FLAG%"=="true" (
call "%WL_HOME%\common\derby\bin\startNetworkServer.cmd" %DERBY_CMD_LINE_ARGS% >"%DOMAIN_HOME%\derby.log" 2>&1

)

6. Modify stopWeblogic.cmd as follows:
echo #############################################################
echo DERBY_CMD_LINE_ARGS=%DERBY_CMD_LINE_ARGS%
echo #############################################################
if "%DERBY_FLAG%"=="true" (
call "%WL_HOME%\common\derby\bin\stopNetworkServer.cmd" %DERBY_CMD_LINE_ARGS% >"%DOMAIN_HOME%\derbyShutdown.log" 2>&1
echo Derby server stopped.
)

7. Change the following line in config.xml for the appropriate port
jdbc:derby://localhost:1529/weblogic_eval

This is optional:
8. Change the port number in jdbc/p13nProfileDataSource-jdbc.xml folder

No comments: