Saturday Jan 31, 2015

Create RESTful Services and deploy to Oracle Java Cloud Service with Netbeans by Andreas Koop

clip_image002In preparation to one of my DOAG 2014 talks „Java WebApps and Services in Oracle Cloud" I created a new trial account for Oracle Java Cloud Service (http://cloud.oracle.com) two weeks ago. Now was the time to create a RESTful Service and deploy it to the cloud and make it accessible to public. 

Last time I tried the Oracle Cloud I used exclusively JDeveloper, this time I made my experience with Netbeans. From my point of view Netbeans has pretty good support for generating RESTService from Database tables. In a couple of minutes it is possible to create CRUD Operations and make it accesible by a REST endpoint. No matter what content type you prefer, by using JAXB XML and JSON content types are both automatically available.

Prerequites

Step 1: Create an Oracle Java Cloud Service trial account (fee less for 30 days)

Step 2: Download and install Netbeans Version 8.01 (http://www.netbeans.org)

Step 3: Make sure to install the Oracle Cloud plugin (1.5)  in Netbeans

Step 4: Download and Install (just unpack) Oracle Java Cloud  Service - Saas Extension SDK (release 14.1.12.0 Find it here.

Step 5: Next add your Oracle Cloud account as Cloud Provider to Netbeans (Goto „Services" Tab and provide your cloud account details)

Step 6: Add a WebLogic Service Instance under ‚Services Tab', so you are able to test the RESTService locally prior to deploying to Oracle Cloud. (I am not going into detail in this post for that task)

Step 7: Make sure to deploy your DB Schema objects plus data into Oracle Database Cloud Service (when subscribing to Java Cloud Service you will get the DB Service as well). See in my previous posts for more details.

HowTo develop RESTService with Netbeans

Everything is setup for cloud deployment. Now let's create a simple REST-Service on top of the HR  DB Tables EMPLOYEES and DEPARTMENTS.

Step 1: Start Netbeans, Create new Project Wizard from Type „Maven / Web Application"

Step 2: Enter your desired groupId, ArtefactId etc. Read the complete article here and get the presentation here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Friday Dec 27, 2013

Setup WebLogic 12c environment with Vagrant and Puppet by Andreas Koop

For one of my presentations at DOAG 2013 I wanted to play around and checkout new features with the latest WebLogic version 12.1.2. To save some time and get experienced in some of the cool DevOps tools I gave a try for Vagrant and Puppet to setup a fresh new WebLogic 12c machine.

BTW: All this is possible due to the impressive work Edwin Biemond has done in the last weeks and month (Checkout his powerful puppet modules  here) plus the Vagrant based provisioning script of Matthew Baldwin. (Checkout his recent blog post about that   here).

To give you a better overview of what I am going to do I created a simple diagram:

I am running the following test drive on Mac OS 10.8.5

Prerequisites
On your host system make sure the following tools are installed

      1) Oracle VirtualBox 4.3


      2) Vagrant 1.3.5


    3) git

Before going on just open 'Terminal' and check if the command line tools are available.

Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Tuesday Aug 06, 2013

WebLogic Application redeployment using shared libraries – without downtime by Andreas Koop

Environment Oracle WebLogic 10.3.6

Use Case An application that depends on custom shared libraries needs to be redeployed without downtime. That means without interrupting the availability of the application to existing and new clients. Since production redeployment is not available for libraries we need to think about a different approach.

Precondition A shared library (as war) is deployed (state: active) and targeted to - for simplicity say - AdminServer with the following version settings:
Extension-Name: enpit-common-war-lib
Specification-Version: 1.0
Implementation-Version: 1.0.4

An application references that library in its weblogic.xml in the following way:
<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app.xsd"
xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
  <library-ref>
       <library-name>enpit-common-war-lib</library-name>
  </library-ref>
</weblogic-web-app>

The library is referenced without any version information. That means it will reference the highest available deployed library version. That application is successfully deployed and also targeted to AdminServer. Its state is active. It is working correctly, accesses Java classes in the shared library.

Problem Trying to deploy the existing library (not changing the version information) once again java weblogic.Deployer -adminurl t3://eden.local:7001 -username weblogic -password welcome1 -upload -library -targets AdminServer -deploy -source enpit-shared-lib-war.war
results in the following error:
Cannot undeploy library Extension-Name: enpit-common-war-lib, Specification-Version: 1, Implementation-Version: 1.0.4 from server AdminServer, because the following deployed applications reference it: enpittestcommons-reflib.war

Solution Trial 1 We change the MANIFEST.MF of the Shared Library that has to be redeployed to
Implementation-Version: 1.0.5   (the deployed one has 1.0.4).

Lets see what happens. Read the article here.

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Tuesday Mar 12, 2013

Deploying ADF Applications into the Oracle Cloud using JDeveloper by Andreas Koop

In this post I am going to show how to deploy Oracle ADF Applications into the Oracle Cloud using JDeveloper.

Prerequisites / Environment
You should have the following at your hands.

  • JDeveloper (JDEVADF_11.1.1.6.0CLOUD_GENERIC_121118.1600.6229)
  • Oracle Cloud Java Service (which includes the database cloud service as well)
  • Oracle Database (HR Schema)
  • Having deployed the DB Objects and Data (HR.EMPLOYEES and HR.DEPARTMENTS) as described in the previous post.

Note: In its current stage Oracle Java Cloud Service runs WebLogic Server 10.3.6 with the appropriate Runtime ADF 11.1.1.6. Deployment of ADF 11gR2 Applications is currently not supported. Beside this limitation some ADF Features are not supported on the Oracle Cloud. According to the Oracle Cloud Documentation it is not supported to use the following ADF features. Read the full article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

BlogTwitterLinkedInMixForumWiki

Search

Archives
« July 2015
SunMonTueWedThuFriSat
   
11
30
31
 
       
Today