Wednesday, July 15, 2015

WebLogic Application Deployment & Shared Library

In an enterprise application deployment scenario, there are many cases where some libraries are used/referenced by multiple applications. It would indeed be a bad design to include such common libraries with every application deployed on the WebLogic server. Not only does it prevent redundancy of resources on the server, it also consumes valuable space & deployment time - especially when the libraries are huge.

WebLogic server offers the shared library concept using which EARs, JARs, EJBs and WARs can be shared across applications in a WebLogic domain.

Let us now see how to package and deploy a shared library in WebLogic server;

Step 1: Create a folder structure as shown below

Step 2: Copy all the libraries (in this case JAR files) that you would want to share across applications to the lib folder under WEB_INF
Step 3: Create a file under META_INF folder by name "MANIFEST.MF"
Step 4: Contents of the MANIFEST.MF file are shown below

Manifest-Version: 1.0
Specification-Title: CommonJars
Specification-Version: 1.0
Implementation-Title: CommonJars Implementation
Implementation-Version: 1.0
Implementation-Vendor: Oracle
Extension-Name: CommonJars

Step 5: From the root folder location, execute the following command to generate a WAR file

jar -cvf sharedlib.war *.*

Step 6: Now, login to Oracle WebLogic console, choose "Deployments" and deploy the generated WAR as a shared library - steps with screenshots below

Use same name for setting in Name filed as Extension-Name:  in MANIFEST.MN.

Tuesday, July 14, 2015

Oracle ADF Logger in 12c

Configure ADF Logger 12c

Oracle ADF 12c has very good error or exception logging mechanism. You have to define logger for your class or package and handler using em.
Open logging.xml file stipulated at loc : <Middleware_home>/ Oracle_Home\user_projects\domains\XXX_domain\config\fmwconfig\servers\AdminServer
Add logger to this file as below,

<logger name=<class name or package name> level='FINEST' useParentHandlers='true'>
Note: use full qualified class and package name and set appropriate logger level
In EM, go to Log configuration for your application,
Create you handler as below,

Provide specific logger for you handler as below;
Set appropriate logger level as you defined in your logger.
Add your logger name that you have created in Logging.xml file.

And verify you logs in file or EM.

Friday, June 26, 2015

Creating RCU for ADF Development

Creating RCU for ADF Development
Creating the Rcu for ADF development 
Once the ADF Development  had  been installed then we can start the RCU  for the database
before start configuration of the domain .. The RCU will create the seeded schema which will be used for the different services of the middleware
We had used 12c database with the Oracle Linux six for this Practice 

Step 1
Navigate to the middle ware home and from the oracle_common and bin and start the rcu

Step 2
Click next to proceed to the next page

Step 3
There are three options which gives more flexibility for a person to run
[1]system load and product load   only run by the user who has the dba privileges
[2]Prepare Scripts for System Load -- it will create the script which contains all the schema  we need to provide the script to the person who has the sysdba privileges and execute the script
once the system load is done by the dba then the non dba can run the product load  
in this practice we are selecting the system Load and Product load

Step 4
Provide the database credentials for
Host name :Host name of the database Server
Port           :Database Port Number
Service Name: Database Service name
User name   : SYS
Password    :SYS password for the database [while creating the database for the adf create the orapw<instance_name> password for the sys] to connect remotely 
Role             :SYSDBA

Once  the database details are provide the prerequisite check start it process and all the prerequisite check is successful click ok to proceed 

Step 5
Select the necessary components which is need to be installed 

Step 6
Provide the password for sachems which is newly created 

Step 7

Step 8
Click the Create Button to Create the Schema for the Database

WebLogic 12c server setup

Installing and Configuring ADF development in weblogic 12c 
In this practice we will go through the installing the ADF and configuring the Domain for the web logic 
Step 1
Start the installer  as the java -jar fmw_infra_121200.jar to install the ADF development it will install the web logic ..or if the web logic is already installed you can extend it

Step 2
Provide the Oracle Middle ware Home Location for the Installation

Step 3
Select the Installation type if it is the dev instnace select the fusion Middle ware infrastructure with examples

Step 4
Once the Prerequisite check's had been completed successfully then proceed to the next step


Check the installation summary and save the response file

Step 6

Once all the installation Process had been completed successfully then Proceed to next step

Once the summary page click finish to finish the installation

After completing the installation now we need to proceed to creation of the RCU for the ADF development follow the steps in this post for creating the rcu
After RCU creation we need to configure the weblogic Domain

Configuring  Domain in weblogic 12c
We need to run the to start the weblogic Domain Configuration

Creating New Domain in weblogic 12c for the ADF Development
Step 1
Click the create New Domain to start creating the new Domain and Provide the location of the New Domain to be stored 
The default of the New Domain will be MW_HOME/user_projects/domains/<Domain_name>

Step 2

Select the Templates which is used for the Domain Creation .. for the ADF we need to Select Oracle Enterprise manager,which has dependency of Oracle JRF ,and weblogic Coherence , the Base server weblogic Domain will be the default Domain template

Step 3

Specify the location of the application location for the new Domain the path will be like

Step 4

Create the master username and password for the weblogi Domain .. this user will be acting as the super user for this Domain
Name:=<Name of the Super User>
Password:=<provide the Password for the user>

Step 5
Specify the Development or Prod Mode  for the Domain

Step 6
Click the RCU for fill the data from the RCU
DBMS/Service:=Database service where the RCU had been installed 
Hostname:=Database Sever Hostname
Schema_name:=<DEV_STB> Scehma created during the Rcu
Password:=<schema password> the password specified during the rcu installation 

and click the get RCU Configuration for Username and Password 

Check the information for the installer screen after clicking the get RCU Configuration .. the test and bin is successfull proceed to next step 

Step 7
If we have the Rac database as the data source then we need to Select the tick box for the data source and then configure the data source for the RAC database .. if it is single installation database  proceed to the next page

Step 8
check all the connections after configuring with the data source 

Step 9
If you decide to  configure all  admin server and Node manager and Manged server and deployments and services then you can click all the four or you can click the admin server and Managed server's Node manager will be default configured and then deployments will be deployed according to the templates in the admin server 

Step 10
Server name:=Name of the Admin server for this Domain
Listen Address:=ALL Local address to including all the virtual address which had been specified 
Listen Port:=7001
Enable SSl:= if we have the ssl certificate and we need to login with the https then we can enable the ssl

Step 11
 Provide the Node manager username and password ..and select the Per Domain Node manager or we can configure the Node manager later after  finish the complete configuration

Step 12
Create the managed server with the necessary details 
Server Name:=Managed Server Name
Listen Address:=All Local Address 
Listen Port  :=<No of the Port where the managed server will be Listened >
Enable SSL:=tick the check box if you have the ssl certificate
SSL Listen Port:=SSL Port if SSL is enabled
Server Groups:=Select from two different server groups according to the application deployment

Step 13
Add the cluster with the cluster name [In  this cluster all the managed server will be placed] we can create multiple cluster for a domain

Step 14
Place the managed server's in the cluster  if we have multiple cluster's then place the managed server according to the Project design 

Step 15
Specify the Coherence cluster name and the listen Port If the Coherence is enabled 

Step 16
Name:=Physical Host name [or] Virtual Host name of the server
Enable Post Bind GID:=Click the tick box
Post Bind GID:=Nobody is the default value[we need to specify the Group id of the primary group which is associated with the weblogic o/s owner
Enable Post Bind Uid:=click the tick box to Enable the Post Bind UID
Post Bind UID:=Provide the User id which owner's the Web logic Binaries
Node Manager Listen Address:=Local Host
Node manager Listen Port :=5556[Default but we can give the port number according to availability]
We can create virtual ip's and virtual host name for deploying the admin server and  managed server [1]as the virtual host name are not associated with any of the physical hardware of network[Ethernet] the failure of ethernet card will not have huge effect on the virtual host names..
[2] In future we need to scale the Web logic  managed server in to another physical server it can be easily packed and unpack in the new server as the managed server are not associated with any of the physical server  

Step 17
Assign the servers to the machines as the better Practice if you have the less managed server then assign the manged server in the separate machines  IF there are multiple managed server then assign one cluster's managed server to one virtual host
In this env we have create the two managed server's and we have assigned to the two different virtual host names and admin server is assigned to the ADMINVHN virtual host name\

Step 18
We can select the library files and deploy accordingly to our necessity in this practice we have selected the auto deployment [if we tick all the four in the Step 9 then we need to deploy we have unchecked the deployment and the services in the step 9 so it will be automatically deployed as per the template and check the summary page 

once the configuration process completes the 100 % then click the next page

Step 20
Click Finish to Finish up the installation