Thursday, February 5, 2009

Configuring JDeveloper to use a different install | domain of weblogic

One of the cool features in JDeveloper that only gets used now and then is the ability to configure JDeveloper to use a different install of weblogic when running internally. It could also be the case you need a custom configured Domain to support your application, for example when doing buffered web services.

To configure a server connection you need to go to Tools -> Preferences -> Run then Edit Server instances.

We are going to create a new configuration, so press the New button and you should see a screen as follows (you could of course just edit the default server configuration and this would affect the entire IDE rather than on a application by application basis):

Now by default JDeveloper assumes that you are try to connect to a remote weblogic instance. So you could just define a new connection to this server, big green plus top right, and you would be ready to go at this point. For the purposes of this blog we are going to assume that you want to let JDeveloper do the management of a server on the current machine. So we tick "Let JDeveloper manage...." and provide the location of the wls_server and where the domain in placed. You do still need to create a valid connection to where the server will start up to; but you obviously wont be able to test this server connection until after you have let JDeveloper start the instance.

The final step is to configure the listener port, in most cases you should just set this to what is configured in your domain:

So you can now assign this application server instance to a particular application in jdeveloper. First bring up the properties for the application:

Then select the custom configuration that we created before. Note you can create new configurations here also; but I showed the preferences way of doing things for completeness.

Now anything you Run/Debug/Profile/Test from inside of this application will use this server instance.

6 comments:

thorick said...

Good Stuff !

For any reader's that need to setup Login UserName and Password for their WebLogic Server Domain:

In the 2nd Window shown, named "Server Instances", click on the big green "+". This will guide you through a series of windows where you can specify the User Name, Password, Domain Name, Host and Port, etc..

And you're on you're merry way !

ILya Cyclone said...

Hello Gerard,
Any ideas where can I find such option in JDev 11.1.2.2? There's no server selection in Prederences-Run menu.
Thanks.

Gerard Davison said...

Ilya,

Sorry I couldn't have been clearer, you need a Tools->Preference menu item. Then look for "Run" in the list on the left.

Gerard

ILya Cyclone said...

Hello, Gerard.
What you wrote is quite clear, but here's what I see in that menu: http://img443.imageshack.us/img443/4151/prefrun.png
I can still select a server instance for particular application in application properties but not for the whole JDeveloper.

Unknown said...

Hi. I couldn't find that option for the latest version of JDeveloper either. Could you please verify your steps for JDev 11.1.2.2. Thanks!

Gerard Davison said...

Ilya,

Sorry for the really late reply, you can now configure this by bringing up the Application Servers navigator and bringing up the properties on the "IntegratedWebLogicServer". Of course you will need to delete the domain if you want to change any of the properties.

Gerard