Deploy an Oracle ALTA UI ADF Application to Oracle Java Cloud Service Dedicating More or Less One Hour of Your Time


altauideploy

This is a compilation of tutorials that aims to show how you can deploy a ready to run demo application built with the Oracle ALTA UI user interface look&feel.

You are creating a lot of infraestructure and software elements in a few clicks such as a database instance, a complete weblogic cluster ready to deploy java applications and with a load balancer on top. Provission times for OPC instances may vary from half an hour to a couple of hours more or less. You can dedicate this iddle time to prepare the next steps of the tutorial.

1-Download jDeveloper 12c from http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html

2- Download Putty from http://the.earth.li/~sgtatham/putty/latest/x86/putty.zip and create public and provate keys as stated here http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/javaservice/JCS/JCS_SSH/create_sshkey.html

3- Create a DbCS instance with “backup to both” option (needed for JCS instance creation later on). See instructions here https://apexapps.oracle.com/pls/apex/f?p=44785:112:0::::P112_CONTENT_ID:10799

4- Create storage container for JCS backup following https://apexapps.oracle.com/pls/apex/f?p=44785:112:0::::P112_CONTENT_ID:10888 or alternatively using this link https://www.dropbox.com/s/13t9gzpyqzhk2zg/BACKUP%20TO%20DBBS%20HANDS-ON.pdf?dl=0

5- Create JCS instance following this link https://apexapps.oracle.com/pls/apex/f?p=44785:112:0:::112:P112_CONTENT_ID:10021

6- Download WorkBetter Alta UI demo from http://www.oracle.com/technetwork/developer-tools/jdev/index-098948.html#alta

7- Open the application with jDeveloper and package it as EAR.

8- Deploy to JCS instance using Fussion Middleware Control

fussionmiddlewarecontrol

fmwcontroldeploy

9- Test your deployment https://<yourpublicotdip>/WorkBetterFaces/faces/index such as https://160.34.11.101/WorkBetterFaces (the link may not work in the future, demo account is being utilized courtesy of Oracle Corp)

Enjoy 😉

BPM User Tasks Assigned to Groups Doesn’t Appear in my CustomWorkListApp


Should you have adquired tasks in your BPM instances that the user didn’t released beacuse abrupt window closing or software implementaion issues/faillures maybe you are querying the BPM engine only for tasks asigned to the group or yourself (me and my group).

BPM has a default configuration of 3 days for task AutoRelease that you can change (see official documentation or https://blogs.oracle.com/soacommunity/entry/how_to_configure_oracle_soa

Anyway, a good idea is making “world class” software by giving end user as much information as possible in order to help resolve issues in a more intuitive way. In this particular case you could query the BPM engine not only for assigned tasks but others such as adquired by others, failled, etc. Is the way the standard worklist app does.

😉

WebLogic SingletonService for High Availability Scenarios: Create Logic that Runs Only in One Node of a Cluster at a Time and Fails Over Other Cluster Node when Things go Wrong or Maintenance is Needed


I recently visited a Package Delivery Company Customer (SxxR) who needed to implement a logic consisting in a background thread scanning continuously a shared directory containing acknowledgement of receipts of shipments files that must be processed and then passed to another stage.

How can we make this logic HA?

The answer is SingletonService: runs only in one of the managed servers of a cluster but it is migrated automatically if the server fails or is stopped.

INSTRUCCTIONS

Create a java Class like this:

package miapp;

 import weblogic.cluster.singleton.SingletonService;

 public class MyUniqueWorker implements SingletonService{

 public void activate() {

                    System.out.println(“***************** activate called *************”);

            }

 public void deactivate() {

                    System.out.println(“***************** de-activate called *************”);

            }

 }

Put the Class in a jar file, singleton.jar for instance

Put the following in weblogic-application.xml:

<singleton-service>

     <class-name>miapp.MyUniqueWorker</class-name>

     <name>mySingleTown ;-)</name>

     <singleton-uri>singleton.jar</singleton-uri>

</singleton-service>        

Package the jar in an ear app:

singleton6

Deploy the ear to the cluster.

Create the managed servers, machine and cluster and configure it as follows:

singleton1 singleton2 singleton3 singleton4 singleton5

TEST IT

The logic runs in one mnaged server, but if the server where it is running fails or is stopped the  execution jupms to other managed server in the cluster.

####<Jun 24, 2015 1:04:20 AM CEST> <Notice> <Stdout> <JMUGUETA-ES> <server1> <[STANDBY] ExecuteThread: ‘2’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <<WLS Kernel>> <> <> <1435100660323> <BEA-000000> <***************** de-activate called *************>

####<Jun 24, 2015 1:04:28 AM CEST> <Notice> <Stdout> <JMUGUETA-ES> <server2> <[STANDBY] ExecuteThread: ‘4’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <<WLS Kernel>> <> <> <1435100668652> <BEA-000000> <***************** activate called *************>

####<Jun 24, 2015 1:04:28 AM CEST> <Info> <Cluster> <JMUGUETA-ES> <server2> <[STANDBY] ExecuteThread: ‘4’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <<WLS Kernel>> <> <> <1435100668653> <BEA-000189> <The Singleton Service mySingleTown 😉 is now active on this server.>

Enjoy 😉

Facing NoClassDefFoundError in WebLogic 12C


IHAC who developed an Angular JS to be deployed in WLS12.1.2. Life was good until someone noticed that this application must include Oracle BPM 11g client library bpmservices11.1.1.7.jar to connect successfully to a SOA/BPM infra.

The problem is that BPM api doesn’t work in a fresh WLS12C domain you need to install OPSS services included in JRF support libraries and extend the domain. Test with the sample “bpmapitestenwls12c” app included in this blog entry. This has the following consequences:

  • You need to configure a database repository for OPSS
  • The classpath is modified substantially
  • The AngularJS application doesn’t deploy successfully

ANALYSIS USING LibConflicts SAMPLE APP AND WebLogic ClassLoader Analysis Tool (CAT)

In progress

CAT-1

SOLUTIONS

In progress

BPMAPITESTENWLS12C

https://www.dropbox.com/s/lyulkxwb96dppyv/CallejeroCompletionText.z?dl=0

LibConflicts sample app

https://www.dropbox.com/s/j32ba0s2jmyrzrd/LibConflicts.zip?dl=0

Help resources

https://www.youtube.com/watch?feature=player_detailpage&v=ArLTKapjV_8#t=306s

Oracle Developer Cloud Service for Multi Vendor Developement Ecosystem


I’m currently working in a big project for a big telco. In this project, the development phase is outsourced in several providers working on site and remote. This approach has several challenges regarding the governance of the ecosystem.

DevCS

Oracle Developer Cloud service provides the following advantages:

  • Cloud service, accessible for everyone, everywhere at any time
  • No setup costs, change CAPEX to OPEX, hourly or monthly rates. Easy to calculate the costs for each provider
  • Centralized Git repo integrated with the IDE’s jDeveloper12C, NetBeans and Eclipse
  • Centralized Maven repo
  • Builds based in Hudson but with an easy to use user interface to configure builds based in Ant and Maven, no learning curve for developers to configure Hudson or Jenkins
  • Secure, https access
  • Centralized Identity Self Service for managing users and provileges
  • Wiky pages
  • Issues tracking
  • Merge requests management and workflow
  • Deploy

For more info

Commercial: https://cloud.oracle.com/developer_service

Technical: http://docs.oracle.com/cloud/latest/devcs_common/index.html

Enjoy 😉

Upload files to Oracle Storage Cloud Service, Java basic example


Obtain connection information in your OPC subscription page:
StorageCloudBlogEntry
Download Oracle Storage Cloud SDK:
Create a java Class with the following code:

package storageupload;

import oracle.cloud.storage.*;

import oracle.cloud.storage.model.*;

import oracle.cloud.storage.exception.*;

import java.io.*;

import java.util.*;

import java.net.*;

public class UploadingSegmentedObjects {

   public static void main(String[] args) {

       try {

           CloudStorageConfig myConfig = new CloudStorageConfig();

           myConfig.setServiceName(“Storage-usoracleXXXXX”)

               .setUsername(“xxxxxxxxx@yyyyyyyyy.com”)

               .setPassword(“xxxxxxxxxxxxxxxxx”.toCharArray())

               .setServiceUrl(“https://storage.us2.oraclecloud.com&#8221;);

           CloudStorage myConnection = CloudStorageFactory.getStorage(myConfig);

           System.out.println(“\nConnected!!\n”);

           if ( myConnection.listContainers().isEmpty() ){

               myConnection.createContainer(“myContainer”);

           }

           FileInputStream fis = new FileInputStream(“C:\\temp\\hello.txt”);

           myConnection.storeObject(“myContainer”, “C:\\temp\\hello.txt”, “text/plain”, fis);

           fis = new FileInputStream(“C:\\temp\\hello.txt”);

           myConnection.storeObject(“myContainer”, “C:\\temp\\hello1.txt”, “text/plain”, fis);

           fis = new FileInputStream(“C:\\temp\\hello.txt”);

           myConnection.storeObject(“myContainer”, “C:\\temp\\hello2.txt”, “text/plain”, fis);

           List myList = myConnection.listObjects(“myContainer”, null);

           Iterator it = myList.iterator();

           while (it.hasNext()) {

               System.out.println((it.next().getKey().toString()));

           }

       } catch (Exception e) {

          e.printStackTrace();

       }      

   }

}

Test  it and enjoy! 😉

More info

Technical: http://docs.oracle.com/cloud/latest/storagecs_common/index.html

Commercial: https://cloud.oracle.com/storage