You are on page 1of 22

Day 1

=======

1)Difference between webserver and Application Server


=========================================================
1)Web server only provides env to run web application
but
Application Server provide env to run both Web App and Enterprise App.

2)Web server only provides support for web related technologies


but
Application server provide support for any technologu from Java J2EE
3)Webserver Example
==================

Apche Tomcat, CERN httpd, IIS from Microsoft, NGINX

Application Server
====================
Websphere,JBOSS,Weblogic,Glassfish,wildfly etc.

4)Web server ---->only has ---->web container


Application Server --->has --->web container + ejb container

2)Types of Java Application


=============================
1)Standlaone Application
2)Enterprise Application
a)Web Application
b)Distributed Application

3)Client Server Arch


======================
[MVC]

Controller: Accept the upcoming req from the. [eg:Servlet]

Model : It has business Logic. [eg: JDBC/Ejbs/Hibernet/Spring etc]

View: Give the result to client.[eg: JSPs]

Why Weblogic
=============
1)We can use SOA,OBIEE,OIM/OAM,EBS12,OEM13c etc. with weblogic
2)In 12c we can create multiple tenants/partitions in one domain
3)Weblogic 12c we can also run over Docer Donatiners,Private Clouds, Publiuc clouds
etc.
4)can easily create and maintain multiple domain
5)Powerfull clustering methodology to balance the load on server instance.
6)Most things are OOBX so very less configurations are required.
7)Very stable and resilient [ie.. can easily be recovered]
8)Easy to configure access level using security relams.

---->History Of Weblogic
===============================
-->In 1995 Paul Ambrose, Bob Pasker, Carl Resnikoff founded weblogic inc.
-->In 1998 BEA System acuired weblogic inc.
--->in 2008 oracle corp. acquired BEA System

------->Weblogic Versions
============================
Weblogic Tengah ---> 1997
Weblogic 3.0 ---->1998
Weblogic 4.0 -->1999
Weblogic 5.1 --->2000
Weblogic Server 6.0 -->2001
Weblogic Server 10.0 --->2007

Weblogic Server 10gR3(10.3.0)--->2008


Weblogic Server 11gR1(10.3.1) -->2009
Weblogic Server 11gR1(10.3.6) -->2010
Weblogic Server 12cR1 (12.1.1) -->2011
Weblogic Server 12cR2 (12.2.1) -->2015
Weblogic Server 14c (14.1.1) -->2020

*Weblogic VS Websphere
========================
Weblogic start up faster in prod compared to Websphere
Weblogic console is more user friendly

*Weblogic vs JBOSS
====================
-->Weblogic is by oracle but JBOSS is from Redhat
-->JBOSS is open source but weblogic is not
-->Weblogic can easily handle multiple request say > 3000 without fail but JBOSS
can't
-->Weblogic has commercial support but JBOSS yet to release 100% commercial
support.
-->In weblogic JMS CLustering Present but not in JBOSS.
-->Weblogic provides multiple way to deploy application.

Roles and Responsibilities of Weblogic Admin


==============================================
1)Install Weblogic Server
2)Configure Domain
3)Deploy application and maintain it
4)Integrating various external source
5)Troubleshoot issues
6)Performance Tunning
7)Patching
8)Upgrade

Day 2
=========

Diff between 11g vs 12C


========================
11g 12C
---- -----
-->Support JDK6,7 (from 10.3.6.0) JDK7 or higher
-->Webserver plugin is bundled with WLS Installer need to download
explicitly
-->patching: bsu utility [smart patching] opatch utility
-->no dynamic cluster Dynamic cluster
-->Servlet-->2.5 Servlet-->3.0
JSP-->2.1 JSP-->2.2 or higher
JDBC-->4.0 JDBC-->4.0
EJB-->3.0 EJB-->3.1 or higher

Various Weblogic Editions


=========================
Standard Edition[SE] --->no cluster supported
Enterprise Edition[EE] ---> [SE] + support cluster
Weblogic Suite ---> [EE] + Active Gridlink for RAC

Q)Which statement is false regarding weblogic 12c?


a)supports Java EE 6.0
b)supports Weblogic Web services 8.1 Application env
c)includes a new Maven plug-in
d)support use of annotations in resource adapter class file

Q)Which is the correct Weblogic server distribution version to download if you want
to install Weblogic server 12c to run in
64 bit mode,on a 64 bit Linux machine?
a)Linux x86 with 64 bit JVM
b)Zip distribution for Linux
c)Linux x86 with 32 bit JVM
d)Generic distribution
e)Network Installer

Installation
=============

Pre requisite
----------------
Create oracle user account , then start installation.
-->yum install oracle-rdbms-server-12cR1-preinstall -y

1)JDK 1.8.0_51
2)Weblogic 12.2.1.0

JDK
-----
installation location: /usr/java/jdk

Weblogic 12.2.1.0
-------------------
-->su -
-->mkdir -p /u01/app/oracle/product/middleware
--->unzip the weblogic installation file
--->java -jar fmw_12.2.1.0.0_wls.jar
-->Inventory location: /u01/app/oraInventory
os group : oinstall
-->Oracle Home : /u01/app/oracle/product/middleware

Note: Command to check firewall status


------------------------------------------
sudo firewall-cmd --state

Day 3
======

Creating Domain
----------------

export MW_HOME=/u01/app/oracle/product/middleware
export WL_HOME=/u01/app/oracle/product/wlserver
export DOMAIN_HOME=/u01/app/oracle/product/middleware/user_projects/domains/
iam_domain1

cd $MW_HOME/oracle_common/common/bin
./config.sh

--->Note:
Q)Where we put weblogic related external libraries needed for application?
-->$DOMAIN_HOME/lib

Q)Which file is called heart of weblogic?


--->$DOMAIN_HOME/config/config.xml

Q)What is the use of setDomainEnv.sh?


--->WHenever we start Admin/Managed Server , it calls the script to take i)the
calss path arguments
ii)the JVM
arguments.

--->good practice:
--------------

nohup <script> $

eg: nohup ./startWeblogic.sh & [[Note: press enter twice]

-->tail -f nohup.out

Day 4
======
Creating Managed Server
========================
--->goto example.com:7001/console
-->Servers
-->Lock and Edit
-->New
-->Server Name: ms1
Port : 8001
-->Activate Changes

-->cd $DOMAIN_HOME/bin
-->./startManagedWeblogic.sh ms1 example.com:7001

Boot.properties
================
cd $DOMAIN_HOME/servers/ms1
mkdir -p security
cd security
vi boot.properties
-->username=weblogic
-->password=Oracle123

Node Manager
=============
-->using node manager we can start/stop managed server from weblogic console.
-->Node manager is machine specific.
-->Shutdown Managed server
-----------------------

-->grep the respective manged server process id


-->ps -ef | grep -i <name of managed server>
Note:The process id which is being followed by long list of processes, having
a string -Dweblogic.Name ....
that first id will be the process id of managed server and need to be
killed
-->kill -9 <processid>

--->Configuring Node Manger


-----------------------

1)Configure the unix machine


http://example.com:7001/console
Lock & Edit
Machines
New
Name : LinuxMachine1
Type: Unix
Type: Plain
Listen Address:localhost
Listen Port:5556

2)Add managed servers to the machine


3)Enrolling domain with nodemanager
-->It's done with the help of wlst
[Direct Mode]
-->/u01/app/oracle/product/middleware/oracle_common/common/bin
-->./wlst.sh
-->wls:/offline> connect('weblogic', 'Oracle123', 't3://example.com:7001')
-->wls:/iam_domain1/serverConfig/> exit()
[interactive mode]
-->./wlst.sh
-->wls:/offline> connect()

Steps to enroll domain


---------------------
wls:/iam_domain1/serverConfig/>
nmEnroll('/u01/app/oracle/product/middleware/user_projects/domains/iam_domain1',
'/u01/app/oracle/product/middleware/user_projects/domains/iam_domain1/nodemanager')
wls:/iam_domain1/serverConfig/>exit()

*Editing NodeManager.properties
-----------------------------------
cd $DOMAIN_HOME/nodemanager
vi nodemanager.properties
-->SecureListener=false

*Starting Node Manager


------------------------
cd $DOMAIN_HOME/bin
./startNodeManager.sh

-->Note: go to ==>weblogic console>>Summary of Machines>>Linux


Machine1>>Monitoring>>Node Manager Status
and make sure it's Reachable.

-->Types of Node Manager: 1)Java Based : SSL,Plain


2)Shell Based : SSH,RSH

-->MSI Mode: Managed Server Indepenence Mode

Day 5
======

Customizing Weblogic Login Page


--------------------------------
-->Download apache-ant-1.9.15-bin
-->copy the zip file at /u01/app/oracle/prodcut
-->unzip apache-ant-1.9.15-bin.zip
-->rm -rf apache-ant-1.9.15-bin.zip
-->mv apache-ant-1.9.15 ant
-->set the path for ANT HOME in .bash_profile and .bashrc
export WL_HOME=/u01/app/oracle/product/middleware/wlserver
export ANT_HOME=/u01/app/oracle/product/ant
export PATH=$ANT_HOME/bin:$JAVA_HOME/bin:$PATH
-->generating the template
-------------------------
cd $WL_HOME/server/lib/console-ext/templates
ant -f build-new-laf.xml -Dname=/home/oracle/ktportconsole
-Ddir=/home/oracle/ktportconsole
-->cd /home/oracle/ktportconsole/WEB-INF
-->mkdir classes
-->cd classes
-->$JAVA_HOME/bin/jar -xf
$WL_HOME/server/lib/consoleapp/webapp/WEB-INF/lib/console.jar global.properties
-->Edit global.properties accordingly.
-->cd /home/oracle/ktportconsole
-->$JAVA_HOME/bin/jar -cf ktportconsole.war *
-->mv ktportconsole.war $DOMAIN_HOME/console-ext

Day 6
==========
Q)Which three scenarios are true about domain
a)Domain can be created using configuration wizard
b)Domain can be created using WLST
c)Domain configuration files are located in Weblogic Home Directory
d)Domain can be created based on a domain template
[1z0-599]
ANS:ABD

--->Weblogic Silent Installation


----------------------------
1)created folder structure
Login as root
[root@example /]# mkdir -p /u01/app/oracle/product/middleware
[root@example /]# mkdir -p /u01/app/oraInventory
[root@example /]# chown -R oracle:oinstall /u01/

2)created oraInst.loc
[root@example /]# vi /etc/oraInst.loc
[root@example /]# chown oracle:oinstall /etc/oraInst.loc

3)Setup central inventory location


[root@example ~]# cd /tmp/
[root@example tmp]# ./createCentralInventory1598281272037.sh /u01/app/oraInventory
oinstall

4)create response file


[oracle@example tmp]$ cd ~
[oracle@example ~]$ vi response_file

-----------------------------------------------------------------------------------
---------------------------------------------------------------
[ENGINE]

#DO NOT CHANGE THIS.


Response File Version=1.0.0.0.0

[GENERIC]

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/u01/app/oracle/product/middleware

#Set this variable value to the Installation Type selected. e.g. Fusion Middleware
Infrastructure, Fusion Middleware Infrastructure With Examples.
INSTALL_TYPE=WebLogic Server

#Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration
Manager configuration provide empty string for user name.
MYORACLESUPPORT_USERNAME=

#Provide the My Oracle Support Password


MYORACLESUPPORT_PASSWORD=<SECURE VALUE>

#Set this to true if you wish to decline the security updates. Setting this to true
and providing empty string for My Oracle Support username will ignore the Oracle
Configuration Manager configuration
DECLINE_SECURITY_UPDATES=true

#Set this to true if My Oracle Support Password is specified


SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

#Provide the Proxy Host


PROXY_HOST=

#Provide the Proxy Port


PROXY_PORT=

#Provide the Proxy Username


PROXY_USER=

#Provide the Proxy Password


PROXY_PWD=<SECURE VALUE>

#Type String (URL format) Indicates the OCM Repeater URL which should be of the
format [scheme[Http/Https]]://[repeater host]:[repeater port]
COLLECTOR_SUPPORTHUB_URL=
-----------------------------------------------------------------------------------
------------------------------------------------------------------

[oracle@example ~]$ java -jar fmw_12.2.1.0.0_wls.jar -silent -responseFile


/home/oracle/response_file

Note: in 11g we use --> -mode=silent -silent_xml=<Path to XML File>

Packing Domain and


Unpacking Domain

--------------------------------------

cd $MW_HOME/oracle_common/common/bin
./pack.sh -managed=true
-domain=/u01/app/oracle/product/middleware/user_projects/domains/iam_domain1 -
template=/home/oracle/iam_domain1.jar -template_name="iam_domain1"

unpack in new machine


=======================
-->place iam_domain1.jar at /home/oracle
cd $MW_HOME/oracle_common/common/bin
./unpack.sh
-domain=/u01/app/oracle/product/middleware/user_projects/domains/iam_domain1 -
template=/home/oracle/iam_domain1.jar

-->Start the server

Creating domain using


WLST
-----------------------------------
-->create folder structure for domain
[root@example oracle]# mkdir -p
/u01/app/oracle/product/middleware/user_projects/domains/iam_domain1
[root@example oracle]# chown -R oracle:oinstall /u01/
[root@example oracle]# exit
exit

-->create a file domain.xml


[oracle@example ~]$ vi domain.xml
-----------------------------------------------------------------------------------
------------------------
readTemplate('/u01/app/oracle/product/middleware/wlserver/common/templates/wls/
wls.jar')
cd('Servers/AdminServer')
cmo.setListenAddress('')
setOption('ServerStartMode','prod')
set('ListenPort', 7001)
create('AdminServer','SSL')
cd('SSL/AdminServer')
set('Enabled', 'True')
set('ListenPort', 7002)
cd('/')
cd('Security/base_domain/User/weblogic')
cmo.setPassword('Oracle123')
setOption('ServerStartMode','prod')
setOption('OverwriteDomain', 'true')
writeDomain('/u01/app/oracle/product/middleware/user_projects/domains/iam_domain1')
closeTemplate()
exit()
-----------------------------------------------------------------------------------
-------------------------------

-->run this file with wlst


[oracle@example ~]$ cd
/u01/app/oracle/product/middleware/oracle_common/common/bin
[oracle@example bin]$ ./wlst.sh /home/oracle/domain.xml

--->Clusters
==============
-->Cluster is a group of members[managed servers] that appears to be one, to the
end user.
-->Cluster started from Weblogic 6 onwards.

Why Cluster
=============
1)Load Balancing :
-----------------
Load must be balanced among the members of cluster.
We use Round Robin Algo to load balancing load, which distributes or circulates
load equally to all servers.
2)High Avavilibility:
--------------------
at any given point of time i have a member who can serve the request.

3)Failover :
-------------
If one member in the cluster is not responding, the request moves to next
available member.

4)Scalability :
----------------
adding or removing member to the cluster.

Types of Cluster
=================
1)Vertical Cluster
2)Horizontal Cluster [used in real time]

Day 7
=======

Q)Which feature is enabled when you start Weblogic Server with the DserverType=wlx
option?
a)JDBC
b)JCA [Java EE Conector Architecture]
c)JMS
d)EJB
e)Java EE

Ans:a)

Note:
When we start a weblogic server instance, all services are started including
-->EJB
-->JMS
-->Connector
-->Clustering
-->Deployment

-->There are 2 server type options


a)wls(Default) -->All services are started
b)wlx -->All except
EJB,JCA,JMS
-->-DserverType="wlx"

--->Mode of Communication
1)Unicast : one to one communication
2)Multicast : one to many communication

-->Dynamic Cluster
-----------------
-->When the load increases on a node/cluster, it will automatically creates new
managed server there.
-->Max no of supported managed server in dynamic cluster=8

Weblogic Day 8
==============

Deployment
--------------

--->There are 4 types of file: .jar,.war,.ear,exploded format

-->Deployment Descriptor
[annotation based programming]

--->war file : web.xml [DD]


--> ear file : i)application.xml , ii)ejb-jar.xml

-->Deployment Plan:

--->Deployment Modes: 1)Stage Mode [Default Mode]


2)NoStage Mode
3)external_stage Mode

--->Deployment States

1)NEW ---> when manages servers are not up

2)DISTRIBUTED --> here application is copied to various managed server

3)PREPARED -->

4)ACTIVE --> when your appl is started.

5)ADMIN --> some dependencies are missing

6)RETIRED -->

--->Deployment using Admin Console


-->Deployment using wlst

deploy('benefits', '/home/oracle/benefits.war', targets='Cluster1')

-->weblogic Deployer utility

Weblogic Rest APIs


=====================

Homogeous Deployment?
-->When we deploy an app to a cluster, by default the deployment is targeted to all
cluster members, this is called homogeneous deployment.

WLSDM Console
==============

Day 10
========
Weblogic Logging
------------------

logging
--------
-->Trace your total application and generate some message.
like warning message,normal info ,error message,exception message, FATAL message.
We need those message in a single place to analyse and correct the problem of our
application.

-->To perform logging we need some some tools, they are called logging framework.
1)Core Core Java provided java.util.logginf package
2)Log4j
3)Common logging
4)LogBook
5)Logback

-->Advantage of logging
----------------------
1)Identifying problem which are hidden
2)Easy and fast debugging
3)Log Maintaince [History]
4)Cost and Time saving.

-->Features of Log4j
------------------------
1)Multiple appender or destination are possible in log4j.
say : console aapender
file appender
both
2)log4j is able to display logging message with calssification
like WARN,DEBUG,ERROR,FATAL,INFO ... as per the level object.
3)Log4j is allowing layout to format the logging messages as per requirement
4)Log4j is having Object renders inorder to get logging messages in text form, html
form, xml form etc...

-->log4j Architecture
------------------

Log level
----------
ALL>TRACE>DEBUG>INFO>WARN>ERROR>FATAL>OFF

-->Each weblogic server ie.. Admin Server, Managed Server maintain there own log.
eg: AdminServer.log,ms1.log
-->Since it's not possible to go and collect log in each server, hecne weblogic
provides a common log file,
where all servers ie.. Admin Server, ms1,ms2 etc.. logs are captured, it's
called domain log.
eg: iam_doamin1.log
loc: $DOMAIN_HOME/servers/AdminServer/logs/
-->Weblogic Server logging Architecture
---------------------------------------

1)Logger : Use for gather the data to be written un logs


2)Handler: it will decide what is the log destination.
3)Filter : It's filter out the log messages.
4)Broadcaster / Domain log Broadcaster : sends log messages to domain logs.
The boradcaster is actually present in
each server , hence all message it try to write to domain log.

--->Weblogic Classes
-----------------
1)Weblogic.i18n.logging.NonCatalogLogger
----------------------------------------------
This class add logger error to weblogic server.
methods : alert(),error(),info(),notice(),warning()

Jar file : $MW_HOME/oracle_common/modules/com.bea.core.i18n.jar

2)weblogic.i18n.logging.serverities
-------------------------------------

defines the servirities constants


eg:ALERT,ERROR,INFO,NOTICE,WARNING etc.

3)com.bea.logging.BaseLogRecord
--------------------------------
-->Provide data about the log.

method: getId(),getLogMessage(),getServerity()

loc:$MW_HOME/wlserver/modules/com.bea.core.logging

Day 11
---------
JDBC Basic Components
======================
1)Driver:
----------
To convert Java calls to DB specific call and vice versa.

2)Connection
--------------
To reach DB , some road must be required, that road is connection.

3)Statement Object
-------------------
To send our sql quries to DB
and
to bring the results from DB to Java App.
4)ResultSet
-------------
By using statement object, i had send my sql queries to DB,
DB engine will execute sql queries and result it will place inside
a box, that box is called resultset.

6 steps to Develop JDBC Application


-------------------------------------
1)Load and Register the Driver
2)Establish connection between Java Application and DB
3)Creation of 'Statement Object'
4)Send and execute SQL Query
5)Process result from ResultSet
6)Close connection

-->import java.sql.*

1)Class.forName("oracle.jdbc.OracleDriver");
2)Connection con=DriverManager.getConnection(url,username,pass);
3)Statement st=con.createStatement();
4)Resultset rs=st.executeQuery("select * from emp");
5)while(rs.next())
{
sout(rs.getInt(1))+rs.getString(2)+rs.getInt(3)
}
6)con.close()

--->Types of Driver
----------------------
1)Type-1 Driver / Bridge Driver / JDBC-ODBC Driver
-->sun microsystem had created type-1 driver in form of
sun.jdbc.odbc.JdbcOdbcDriver

+ve points: can connect with any database


-ve points:Only work with Windows OS.

2)Type-2 Driver or Part Java Driver or Native Driver

+ve point: it can work with any OS


-ve point: DB depended driver

3)Type-3 Driver or Middleware Driver or Network Driver

+ve point : platform indep, DB indep


-ve point : costly driver

4)Type-4 Driver/Thin Driver or pure java driver

+ve point : Platform Independent,fastest driver


-ve point : DB dependent

-->install eclipse,install oracle 11g xe


Day 12
========
JDBC
-----
-->JDBC is a service that runs on Weblogic to establish connection of Weblogic with
Backend Databases.
-->It almost support 14 database.
-->Weblogic supports 2 types of databases
1)OpenSource DB : MYSQL,FirstSQL,Cloudscape,Postgresql,Apache Derby
2)Enterprise DB : Oracle DB,IBM DB2,Microsoft SQL Server,Sybase etc..

Data source
------------
-->By default in development env : 15 connection obj
in production env : 25 connection obj.
-->Data Source Types:
1)Generic
2)Multi
3)Gridlink
4)Universal Connection Pool [added 12.2.1]
-->It gives connection object to every partition in the domain.
5)Proxy Data store
-->It's act a proxy for real data source.

Day 13
=======
Q)Ways to get Connection Object?
-->There are 2 ways to get connection object
1)DriverManager.getConnection(jdbcUrl,username,password)
2)DataSource.getConnection()

-->In case of DriverManager.getConnection() always a new connection object is


created
but
In case of Datasource.getConnection() new connection object is not created, it's
always going to
provide the connection from the connection Pool.

Q)What is Data Source?


-->It manages connection object in connection pool.

-->DataSource(I) interface present inside javax.sql.*;

-->DataSource ds=ctx.lookup("jdbc/ds1");
-->ds.getConnection()

--->DB 12c Installation


------------------------
-->su -
-->mkdir -p /u03/app/oracle/product/12.1.0.2/db_1
-->chown -R oracle:oinstall /u03
--Copy and paste the DB installation file to /home/oracle
--chown -R oracle:oinstall OracleDB12C_12.0.1.2
--chmod -R 775 OracleDB12C_12.0.1.2
-->cd /home/oracle/OracleDB12C_12.0.1.2/database
-->./runInstaller

-->[Security Update] -->uncheck all -->Next


-->Install DB only
-->Single Instance DB Installation
-->English
-->Enterprise Edition
-->Oracle Base : /u03/app/oracle
Software Location : /u03/app/oracle/product/12.1.0.2/db_1

-->Transaction Management
----------------------
-->Process of combining all realted operations into a single unit and executing on
the rule "either all or none",
is called Transaction Managment.

eg:
Fund Transfer
-------------
1)debit money from sender's account
2)credit money to reciver's account

-->Types of Transacation
1)Local : here all operation will be performed on same database
2)Global : here all operation are performed on different databases.

-------------------JDBC API-----------------

Step 1)put INITIAL_CONTEXT_FACTORY,PROVIDER_URL into a map


Step 2)Create a JNDI object
InitialContext ctx=new InitialContext(map_object); //ctx is jndi object
Step 3)Lookup the Data Source
Datasource ds=ctx.lookup("jdbc/myDs1");

Step 4)Get Connection Object


Connection con=ds.getConnection();

Step 5)Create statement object


con.createStatement(sql_query);

Step 6)close the connection

JMS
---------------------

Q)An application is using WebLogic JMS Store and forward messages from a local JMS
queue a remote
WebLogic JMS destination. You need to determine if the messages are being sent from
the local Weblogic Server.
Where do you find information and metrics about Store and Forward components in the
WebLogic Admin Console?
A. JMS Persistent Store
B. JMS Server
C. JMS Distributed Destination
D. JMS Store and Forward
E. Automatic Service Migration
[1z0-599]
Ans : JMS Persistent Store

-->JMS API supports 2 Models


1)P2P Model
2)Pub-Sub

P2P Model
==========
-->In this model a sender posts messages to a particular queue and a reciver reads
message from queue.
-->Here the sender knows the destination of the message and post the message
directly to reciver's
queue.
--->Feature:
a)Only one consumer gets the message.

Pub-Sub Model
===============
-->It supports publishing messages to a particular message topic.
-->Subscriber may register interest in recieving messages on a particular message
topic.
-->In this model neither the publisher nor the subscribers knows about each other.

*Difference b/w Topic and Queue


--------------------------------
-->In queue 1 message can be consumed by 1 client.
In topic 1 message can be consumed by multiple clients.
-->Queue represent : P2P
Topic represents: Pub-Sub
-->In queue messages are send in FIFO order
In topic messages are send in LIFO

-->Programming Genreal Steps


--------------------------
1)Create JNDI Object

HashTable ht=new HashTable();


ht.put(INITAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
ht.put(PROVIDER_URL,"example.com:8001");

InitialContext ctx=new InitialContext(ht);


2)Ask JNDI about the resources you want to access
a)Ask about CF
ctx.lookup("jms/CF");
b)Ask about Queue
ctx.lookup("jms/Queue");

3)establish the connection and session with JMS Server

----Q&A----
Q)What is Pinned Service?
Ans: In a production environment, an application is generally deployed on a cluster
on many WebLogic Managed Server.
In this case the application is running on each Managed Server of the cluster.

When a Managed Server goes down, the others take the tasks of the one which is
no longer running.
All is ok for the users.
Sometimes we need a service to run on ONLY ONE Managed Server.
This kind of services are named "pinned services" because the services are
pinned to a particular Managed Server.

Q)What is migratable target ?


Ans: Pinned Service could be an availability issue in the case the Managed Server
goes down.
To fix this problem, Oracle create the concept of "migratable target".
A migratable target is created in order to define a set of servers on which
a pinned service will migrate if the current managed server goes down.

Say : our JMS Service is running on ms1,ms2.


So when ms1 goes down it JMS Service will start running on ms2.
So simply we can say, migratable targets allow us to easily move the service
from one server to another within the cluster

Q)Give an example of migratable services?


Ans: JMS-related services.

Q)JMS services are singleton services, what is means?


Ans: JMS services are singleton services, and, therefore,
are not active on all server instances in a cluster.
Instead, they are pinned to a single server in the cluster to preserve data
consistency.

Q)Can we boot JMS Server Independently?


Ans:You cannot boot the JMS Server independently.A JMS Server boots with the
managed server it runs on.

Q)What is WebLogic Messaging Bridge?


Ans: It used to forward message from one JMS Module to other, say from queue1 we
can forward the message to
queue2.
So say queue 1 is on one domain , then we can forward the same message to
queue 2 in another domain.
So using this we can achieve cross domain mechanism to pass the same message.
Here queue 1 is called Source Destination and queue 2 is called Target
Destination.

Note: JMS messaging bridge uses a Java EE Connector Architecture (JCA) resource
adapter
to communicate with source and target destinations.

Performance Tunning
====================
Xms --> is minimum amount of memory needed by an application to startup or boot
Xmx -->max amount of memory that application utilise to serve the request.

Heap size : Xms and Xmx together

HeapDump
=========
-->It tells memory of the objects
-->It's like snapshot of heap memory
-->It's shows application memory consumption.

Authentication Using External LDAP


--------------------------------
-->In 90's we have Phone Directory
-->Drawback of DAP
---------------
DAP was using OSI Model [7 Layers] , and it makes it bulky.

-->Solution : Light DAP [LDAP] is based on TCP/IP [4 layer]

-->History of LDAP Products


-------------------------
-->3 Different Modes of OUD
--------------------------
1)OUD as Directory Server
2)Oud as Proxy Server
3)OUD as Replication Gateway

Realm :
-------
-->Realm divides users into various groups.
-->Realm is collection users,group,Roles&Policies,Providers etc.
-->We can create multiple realm in weblogic, but at a time only 1 will be active.
-->Realm actually used to protect weblogic resource.

Components of Realms
---------------------
1)User : It's an entity that authenticates himself in realm to access to resources.
2)Groups : It's a collection of users have something in common.
eg: Adminstrator: Full acess of the weblogic domain
Operators : start/stop the server
Deployer : deploy and update the application
Monitor : Read only access to domain
AppTester:test the application
3)Security Polcies
4)Security Provider : Security provider use to authenticate user froma particular
backend like OUD,AD etc.
In 12 C we have 19 different security Providers.
The default provider of weblogic is 'DefaultAuthenticator' to
authenticate it's users with
internal LDAP.
It's also called 'Weblogic Authentication Provider'.

Control Flags/Criteria
=======================
1)REQUIRED
------------
Means in order to make whole Authentication Chain Successful, this module is also
required.

if Module fails ----> Continue the chain with 'fail' flag


pass ---> Continue the chain 'pass' flag.
2)REQUISITE
-----------
It's like pre-requsite.
If the module fails ---> the whole chain will be terminated
pass -->continue the chain
3)SUFFICIENT
-------------
Means, if that module is sufficent enough to make the whole authentication chain
successful.
Moulde is passed ---> Break the chain
failed --->continue the chain with no fail
flag.
4)OPTIONAL
------------
This module is an optional module.
Module pass --> well and goot
fails -->there is no problem.

Performance Tunning
---------------------

Patching and Upgrade


----------------------
-->Patches in FMW are required to
: Fix any bug identified or security fixes.
: Adding new Funcationality.

-->Types of Patch
-------------------
1)Interim [Customer Specific]
-------------------------------
Patches to fix a particular problem in the code.
This patch is for customer who can't wait for next patchset or product update.

Other Names: MLR,PSE,One-Off,Hot-Fix,Security On-Off

2)Bundle Patch
----------------
It's for security and vurnability fixes.

Other Name: Maintenance pack, Service Pack, MLR

3)Security Patch Update(SPU)


-----------------------------
-->It is relase between various patch sets , generally quarterly for bug fixes.

4)Patch Set Update(PSU)


-------------------------
-->Single patch containing collection of patches to applied together.

--->Patch Artifacts
-------------------
a)Application: JARs,WARs,EARs
b)Utilities : files that have no run time dependency like config.sh, clone.
Here you no need to start the server
c)Composites:
d)Components:
e)Datbase Schema Updates

------------------Patch Tools---------------------
Opatch : 12c onward -->To apply , rollback, and maintain patch in ORACLE_HOME
BSU/BEA Smart Update : 11g
PSA(Patch Set Assistent) : To patch database schema
Manual : copy of files, deployment etc.

Opatch version : 13.0 and higher

Upgradation to 14c
-------------------
-->Note:shutdown all the servers.

-->Install 14C sepearetly


-->Reconfigure the domain and point it to 14C

Upcoming requirements
-----------------------
OBI
Webcenter
FMW
SOA
OID

You might also like