2009-02-19

Working with two WebLogic domains on the same machine

If, like me, you have from time to time to work with two domains,

here are some tips which may help :)

 

Change the debug port

 

Well, that seems obvious, but if you have several servers, each one will have to use a different http port,

a different https port, but also a different debug port (assuming you're in development mode).

I figured out that only a few people know how to SIMPLY change the debug port.

Just add the line "set DEBUG_PORT=XXXX" in your startup script.

Ex :

 

@ECHO OFF

@REM WARNING: This file is created by the Configuration Wizard.
@REM Any changes to this script may be lost when adding extensions to this configuration.

SETLOCAL

set DOMAIN_HOME=D:\BEA_ROOT\user_projects\domains\9\sample
SET DEBUG_PORT=8956
call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %*

ENDLOCAL

 

And that's it.

But wait a minute, a debug port is of course useful, but especially with an IDE !

Then, you will have to configure it because it's also listening on the default port.

I won't talk about JDev because I'm not working with it yet. I'll talk about Workshop.

If you take the server configuration in the "Java EE" view, you'll see something like that :

 

image

 

With a debug port nowhere to be seen.

In fact, you'll have to switch to the Debug View.

And in the debug pane, right-click on your server (it has to be running).

 

image

 

And then you'll be able to change that "hidden" option :)

 

image

 

Change the admin console cookie name

 

If  you're using Firefox, you may have noticed that it is hard to work with two WebLogic administration consoles at the same time.

It comes from the fact they share the same cookie and then each action on one console will log you out from the other one.

If I'm not mistaken it's possible to change that name only in the 10.3. To do so, go on the domain page.

 

image

 

And then click on the "Advanced Section" at the bottom of the page, and you'll see :

 

image

 

If you have two domains, changing only one cookie name will be sufficient :)

 

Another tip for developers

 

Personnally, I find the development feature that consists in an auto-lock for editing really annoying.

If you want to use your IDE to deploy, you may have a message telling you that the deployment can't

be done since an editing session is in progress. I gave a tip based on WLST to stop editing,

but finally, I guess it's better to desactivate this feature.

To do so :

 

image

 

And then :

 

image 

 

Desactivate "Automatically Acquire Lock and Activate Changes".

You're now good to go develop :)

 

No comments: