mercoledì 23 gennaio 2013

JDeveloper: Deploy your project to an external WebLogic Server

JDeveloper by default uses it's internal WebLogic Server to deploy your projects.
When your project is completed presumably you will deploy your application to a production WebLogic Server.

In this post I explain how to create a deployment profile and deploy your project to an external WebLogic Server. I use the previously created SSXA webpage sample as reference but the procedure is the same for other applications like ADF ones.

First step is optional. I will change the default web context root name to a more easy one. By default JDev assigns web context root names like "You_App_Name-Project_Name-webapp" that will be used as root folder for project, this meas that the resulting url could be not so simple to remember.





To change this name right click your Project in Application Navigator -> Project Properties -> Java EE Application and modify values as you like.



So, let's start deploying our app.

Right click your app -> Deploy -> New Deployment Profile



Select Deployment Profile -> WAR File



Choose a name for your application and click OK twice on settings screens to use default settings.

Go to Application -> Deploy -> New Deployment Profile



Under Deployment Profile select EAR File



Under Application Assembly check your app then click OK




Click OK again to following screen to use default deployment settings.

Finally go to Application -> Deploy -> YOUR_DEPLOYMENT_NAME




Here you can choose between two deployment options:

1)Deploy to EAR file to be manually deployed to an external WebLogic Server

2)Configure an external WebLogic Server to allow JDeveloper to perform all tasks for you.

Option 2 is for sure the faster one just select Deploy to an Application Server and you will be prompted to configure an external WebLogic for deployments.



In this post though I will follow option 1 performing a manual deploy.

Select Deploy to EAR



Your EAR packaged application will be created somewhere on your hard drive, if you open Deployment tab in the bottom screen of JDev you will see a log containing where the file has been saved.

In my case my saving location is

C:\JDeveloper\mywork\Test_SSXA\deploy\application.ear

Login to your WebLogic Server that probably will have an URL similar to this:

http://weblogicserver_ip_address:7001/console

Click Deployments -> Lock & Edit -> Install


Click upload your file

In Deployment Archive select your EAR file then click Next



Click Next -> Next, then select the target you are deploying the application to: select AdminServer and click Next, choose a different name, if you like to, for your app then click Next -> Finish

Click Activate Changes



Return to Deployment page, select your application, click Start -> Service all requests




At this point your application will start servicing requests.

Go to:


http://weblogicserver_ip_address:7001/You_App_Name-Project_Name-webapp/appName/index.html

In my case:

http://10.0.0.4:7001/testSSXA/DemoSSXA/index.html


That's all!!

Nessun commento:

Posta un commento