Monthly Archives: September 2015

Deploy the third application – includes Elastic Java Message Service Configuration(Part -5-)

This version of the application has a Java Message Service (JMS) producer. Another tab is introduced into the application that will allow you to send JMS messages. This tab also contains a “table of processed messages”, the browser displays the messages that were processed by the message driven bean. The Enterprise Application that we will deploy later has the JMS Message Driven Bean in, this bean reads the

  1. At this point you can restart your managed servers.

Click on View changes and restart in Change Center and select Restart Checklist tab then check the box near to both managed servers and click on Restart.

Ekran Resmi 2015-09-22 13.05.51

  1. Click on ‘Lock & Edit’. Deploy the application JMSProducer-1.0.war to the wlsdevCluster, you can find this at:


Ekran Resmi 2015-09-22 13.06.01

You would have to activate the changes and also ensure that the application begins servicing requests.

  1. Make sure the application is running and working correctly by going to URL: http://localhost:7002/JMSProducer/

Ekran Resmi 2015-09-22 13.06.09

We will now use the WebLogic console to configure JMS, this is performed under Services / Messaging/JMS Servers. See screenshot below:

Ekran Resmi 2015-09-22 13.06.16

  1. Click on ‘Lock & Edit’. Create a JMS server by clicking New, using the name

Ekran Resmi 2015-09-22 13.06.22

Click Create a New Store. Use the Type: File Store, like in the screenshot below:

And Click Next.

Ekran Resmi 2015-09-22 13.06.32

  1. Use the following values in the next screen:

Name = cluster

Target to wlsdevCluster

Directory = /u01/projects/wlsdevday/jmsjta

Click OK

 Ekran Resmi 2015-09-22 13.06.44


Activate the changes. Then click on ‘Lock & Edit’ again. This time the ‘Persistent Store’ dropdown would be refreshed to include ‘cluster’ Select the Persistent store that you just created as per the screen shot below:

Ekran Resmi 2015-09-22 13.06.51

Click Next.

Target the JMS Server to wlsdevCluster.

Ekran Resmi 2015-09-22 13.06.57

Click Finish.

  1. Activate your changes, and your JMS Server should look like this:

Ekran Resmi 2015-09-22 13.07.02

  1. We are now going to create a JMS Module to hold our Connection Factory and Queue.

To do this, go back Services. Click on ‘Lock & Edit’

Select JMS Modules

Ekran Resmi 2015-09-22 13.07.09

Create a new JMS Module

Note: A JMS Module and Subdeployment can be used to group resources, including queue and topic destinations, connection factories, JMS templates, destination sort keys, destination quota, distributed destinations, foreign servers, and store-and-forward parameters. Consider how much easier it is to manage and deploy using a Module and Subdeployments rather than remembering the relationships between the JMS resources you are creating and their targeting.

Call the JMS Module jmsDevDayModule.

Ekran Resmi 2015-09-22 13.07.16

Click Next

Now target the module to the cluster.

Ekran Resmi 2015-09-22 13.07.24

Check the box next to Would you like to add resources to this JMS system module?

Ekran Resmi 2015-09-22 13.07.31

And click Finish.

On activation of changes, you should now see a screen like the one below

Ekran Resmi 2015-09-22 13.07.37

Click on ‘Lock & Edit’ again and then click New to add artifacts to the module.

Select the Connection Factory radio button and click Next.


Ekran Resmi 2015-09-22 13.07.46

Enter the following information in the next screen:

Connection Name:                              DevDayCF

Connection Factory JNDI name:          DevDayCF

 Ekran Resmi 2015-09-22 13.07.52

Click Next

Click on the Advanced Targeting (all will become clear later!)

Ekran Resmi 2015-09-22 13.07.52

Click on Create a new Subdeployment

 Ekran Resmi 2015-09-22 13.08.03

Enter the following information in the next screen:

Name: DevDaySub

 Ekran Resmi 2015-09-22 13.08.09

Click OK.

Target the subdeployment to JMS Server created.

Ekran Resmi 2015-09-22 13.08.13

Click Finish.

Activate Changes.

Now we need to create a queue in the JMS Module, this Queue will be a Distributed Destination, and this means the queue will run across the whole cluster.

Click on ‘Lock & Edit’ again. Click New.

Check the Distributed Queue radio button and click Next.

 Ekran Resmi 2015-09-22 13.08.22

On the next screen enter the following information:

Queue Name:              DevDayQueue

Queue JNDI name:      DevDayQueue

Make sure Destination Type is Uniform.

Your distributed queue configuration should look like below:

Ekran Resmi 2015-09-22 13.08.29

Click Next

Click Advanced Targeting, and choose the Subdeployment created earlier (DevDaySub)

Ekran Resmi 2015-09-22 13.08.38

Click Finish

Activate your changes.

We now need to deploy the JMS Consumer JAR. Follow the same procedure as before to deploy the application. You’ll find the application here:


The application is called EJBReceiver-1.0.jar (use the knowledge you have gained on the Developer Day so far, to deploy the application to wlsdevCluster).Dont forget to activate the changes and start the application to service all requests.

  1. Open application window in browser and type any message and click in Send Message.

 Ekran Resmi 2015-09-22 13.08.45

Again send a message.

Ekran Resmi 2015-09-22 13.08.53

Open two terminal and run the following command in both terminal. One terminal will show the log detail of wlsdevManaged-1 and another will show the log of wlsdevManaged-2.

tail -f /u01/projects/wlsdevday/domains/wlsdevdayDomain/servers/wlsdevManaged-1/logs/wlsdevManaged-1.out

tail -f /u01/projects/wlsdevday/domains/wlsdevdayDomain/servers/wlsdevManaged-2/logs/wlsdevManaged-2.out

Ekran Resmi 2015-09-22 13.09.00

As you see we have distributed queue, so our messages is processed by both managed server uniformly. Each time we send a new message it is processed uniformly by managed server.

Now it is time to clean-up. Click on Lock & Edit, stop and then delete the applications (ClustWLSessionSampleLBApp, JMSProducer-1.0 and EJBReceiver-1.0). Activate the changes finally.

Stop all the managed server instances. Ensure that only the AdminServer is up and running.

Deploy the application with Coherence*Web for HTTP session management (Part -4-)

Whilst HTTP session replication is a powerful way to enable applications to continue running even in the  event of server failure, the main issue is that the HTTP session information is held in the JVM memory of the running WebLogic server. If your application has lots or users, and or large HTTP session objects this means the application server could soon run out of memory and therefore stop your applications from scaling well. A solution to this problem is to off load the HTTP session management into a Cache. In our case we are going to off load the HTTP sessions into Coherence. This application uses Coherence*Web to achieve this.

In WebLogic Server 12C, Coherence 12C is automatically installed, and if you choose, can be tightly integrated into the WebLogic Management Framework – This means the WebLogic Console can be used to create Coherence Clusters using a concept we called Coherence Managed Servers – the process of creating these is almost identical to creating WebLogic Server Clusters. In the same way that we have just seen in the previous lab nodemanager is used to start, stop, and restart failed Coherence Servers.

The only difference in this version is the WebLogic web application deployment descriptor now has:




  1. Go to Environment -> Servers

Click Control

Select wlsdevManaged-1 and wlsdevManaged-2 and click Shutdown/Force Shutdown now.

Acknowledge the stopping of the servers by clicking Yes..

Ekran Resmi 2015-09-06 21.47.00

  1. Login to the WebLogic Console
  2. Make sure you have clicked Lock and EditEkran Resmi 2015-09-06 21.47.06

Click on Environment / Coherence Clusters

  1. Create a new Coherence Cluster

Click New in the Coherence Cluster table (as above in screenshot)

Name:  wlsdevdayCohCluster

And Click Next.

 Ekran Resmi 2015-09-06 21.47.14

Enter Unicast Listen Port as 8888 and Click Next.Ekran Resmi 2015-09-06 21.47.19

Target the Cluster at the wlsdevCluster and Click Finish.

Ekran Resmi 2015-09-06 21.47.26

Make sure you activate your changes.

  1. Click Lock & Edit. Open the Coherence cluster created, click on tab Well Known Addresses

Create a new one

Name:                          wka

Listen Address:             wins-vbox.localdomain

Listen Port:                  8088

Click OK.

Ekran Resmi 2015-09-06 21.47.32

Make sure you activate your changes.

  1. Click on ‘Loack & Edit’. Go to Environment -> Clusters, click on wlsdevCluster

Click tab Coherence. Verify that the information on the screen is the following:

Coherence Cluster: wlsdevdayCohCluster

Ensure that Local Storage Enabled and Coherence Web Local Storage are NOT CHECKED
This ensures that the WebLogic Cluster will not hold state, and will only be a client of the Coherence Cluster.

Make sure the screen looks like the screenshot below, then click Save. And activate your changes in the end

 Ekran Resmi 2015-09-06 21.47.39


  1. Click on ‘Lock & Edit’. Go to Environment, expand Clusters and click Server Templates

Click on wlsdevManaged-Template

Click on tab Coherence

Make sure the following are specified and checked:

Coherence Cluster: wlsdevdayCohCluster

Unicast Listen Address: localhost

Unicast Listen Port: 8088

Checked Unicast Port Auto Adjust

Uncheck Local Storage Enabled

 Ekran Resmi 2015-09-06 21.47.46


Click on Save and don’t forget to activate your changes

  1. Now let’s create the new Cluster for the Coherence Managed Servers
  2. As when we created the WebLogic Cluster, in the WebLogic Console go to Clusters, Click on ‘Lock & Edit’ and create a new Dynamic Cluster (This will be a dynamic Coherence cluster!!)
  3. Call the dynamic cluster CoherenceManagedCluster and Click

 Ekran Resmi 2015-09-06 21.47.52


Leave the next screen as default, and click Next.

 Ekran Resmi 2015-09-06 21.47.58


Select Use a single machine for all dynamic servers and choose Machine and click Next.

Ekran Resmi 2015-09-06 21.48.06

On the screen below, change:
Listen Port for First Server: 9100

SSL Listen Port for First Server: 10100

Click Next.

Ekran Resmi 2015-09-06 21.48.14

Review the final screen, and click Finish (Make sure you active your changes)

Finally, we need to make sure this cluster is part of the Coherence cluster, and able to store data, to do this, go to the list of clusters, click on CoherenceManagedCluster
As on the screenshot below click on the Coherence tab. Click on ‘Lock & Edit’.
Select wlsdevdayCohCluster in the selection box and click SaveEkran Resmi 2015-09-06 21.48.21

Having clicked saved, this will open up 2 check boxes. Make sure these are both ticked as per the screenshot below.

Ekran Resmi 2015-09-06 21.48.28

Click on Save again. Don’t forget to Activate changes.
Click on Server Templates, you should see a new template called
CoherenceManagedCluster-Template. Click on it

Click on tab Coherence. Click on ‘Lock & Edit’

Make sure the following are specified and checked:

Coherence Cluster:                  wlsdevdayCohCluster

Unicast Listen Adddress:          wins-vbox.localdomain

Unicast Listen Port:                  8088

Checked                                  Unicast Port Auto Adjust

Ekran Resmi 2015-09-06 21.48.35 

Click on Save and then activate the changes.

  1. Start the new Coherence servers, Go to Environment -> Servers. Click Control.
    Select CoherenceManagedCluster-1 and CoherenceManagedCluster-2 and click Start to start the servers. Before you go to the next step, wait until these servers are running
  1. Go to Environment -> Servers. Click Control. Select wlsdevManaged-1 and wlsdevManaged-2 and click Start to start the servers. Wait for the servers to get started.
  1. Now deploy the application

As before click Lock & Edit in the change center. .

Select Deployments from the Domain Structure pane.

Click Install.

Enter the Path as “/u01/content/weblogic-innovation-seminars/WInS_Demos/weblogic-basics/lab2”

And Select the ClustWLSSessionSampleCounterAppV1-1.0-SNAPSHOT.war

            Click Next.

Ekran Resmi 2015-09-06 21.48.42

Choose Install this application as an application and Click Next.

Target the Application to wlsdevCluster and Click Next.

 Ekran Resmi 2015-09-06 21.48.50


Select Copy this application onto every target for me and Click Finish.

This is the different way to install the application directly to cluster.

Click on ‘Activate Changes’. Check the box near to application and Select Start->Servicing all request->Yes.

  1. Let us do some testing……

As in lab 2, perform an uncontrolled shutdown of the managed server using the kill -9 command. In fact, if you’re brave enough kill both managed servers, Keep the Browser open, and when one of the managed servers comes back continue to use the application – the session state should be maintained as it was held in the Coherence Cache, rather than in WebLogic Servers memory.

Go to Browser and type the URL: http://localhost:7002/ClustWLSSessionSampleCounterAppV1/

Ekran Resmi 2015-09-06 21.49.02

Find out the wlsdevManaged server processes and kill them both.

Ekran Resmi 2015-09-06 21.49.08

Go to the Servers page and you would find that both the servers are being started (by the NodeManager).

Ekran Resmi 2015-09-06 21.49.14

Once one of the servers is started – the page will show the correct data. All this had been stored in Coherence.

Ekran Resmi 2015-09-06 21.49.21

  1. Before going to the next lab, let’s remove coherence configuration and also the same application (ClustWLSSessionSampleCounterAppV1-1.0-SNAPSHOT)..

Go to console, click on ‘Lock & Edit’. Go to Deployments, select ‘ClustWLSSessionSampleCounterAppV1-1.0-SNAPSHOT’ and Stop->Force Stop Now. And then Delete the application. Activate the changes.

Go to console, Lock&Edit, go to Environment -> Clusters.

Click wlsdevCluster, go to Coherence tab and select None for Coherence Cluster.

Save and then Activate your changes.
To reduce resource usage you might also want to stop the coherence servers.

Create Dynamic Cluster(Part-3-)

A dynamic cluster is a WebLogic cluster that contains one or more dynamic servers. Dynamic clusters are based on a single, shared server template. You use the shared server template to specify the configuration of the servers in your dynamic cluster. This means that each managed server (dynamic sever) does not need to be manually configured when expanding the cluster.

  1. Administration Server should be started. In a Terminal Window, type:


It will prompt for username and password, enter: weblogic and then welcome1.

Ekran Resmi 2015-09-04 15.31.33

Wait until you see in the console: Server started in RUNNING mode.

Ekran Resmi 2015-09-04 15.31.46

  1. Open a browser instance and type: http://localhost.localdomain:7001/console.

Login using weblogic and welcome1 credentials.

Ekran Resmi 2015-09-04 15.31.54

Open a new terminal.

cd /u01/projects/wlsdevday/nodemanager/wlsdevdaynode


Change SecureListener=false, save the file and close it.

Ekran Resmi 2015-09-04 15.32.02

  1. Start Node Manager. In the Terminal Window type:



  1. Go to Administration Server Console, Expand Environment, click on Machines. The Administration Console Change Center provides a way to lock a domain configuration so you can make changes to the configuration while preventing other accounts from making changes during your edit session. The domain configuration locking feature is always enabled in production domains. It can be enabled or disabled in development domains.

Click on Lock and Edit to create a session of editing.

Click New and Enter Machine as Name and Click Next.

Ekran Resmi 2015-09-04 15.32.09

Enter the following:

Type:                           SSL

Listen Address:             localhost

Listen Port:                  5556

Click Finish.
Ekran Resmi 2015-09-04 15.32.19

Click on Activate Changes.
Ekran Resmi 2015-09-04 15.32.30

  1. Create a standalone managed server which will behave as a load balancer on Port Number 7002.
    1. Click on ‘Lock & Edit’
    2. Click on “Environment->Servers”.
    3. Click on “New”
    4. Enter the following:
    5. Server Name: SampleLB
    6. Server Listen Address: localhost
    7. Server Listen Port: 7002
    8. Select “No, This is a stand-alone server.”
    9. Click on “Finish”

Ekran Resmi 2015-09-04 15.32.40

Activate Changes, once the Managed Server (SampleLB) is created.

  1. Click on ‘Lock & Edit’ again. Click on newly created “SampleLB” managed server.

Ekran Resmi 2015-09-04 15.32.47

  1. Specify the Machine to “machine” and click on “Save”. And then ‘Activate Changes’

Ekran Resmi 2015-09-04 15.32.56

  1. Click on Control tab and select the SampleLB Server and click on “Start”. It will ask for a confirmation message, accept it.This will start the “SampleLB” managed server.

Ekran Resmi 2015-09-04 15.33.14

  1. Deploy the load balancing application to stand-alone managed server “SampleLB”. Click on ‘Lock & Edit’. Click on “Environment->Deployments” and click on “Install”.

Ekran Resmi 2015-09-04 15.33.22

  1. Enter the following Path: “/u01/content/weblogic-innovation-seminars/WInS_Demos/cluster-module/ClustWLSSessionSampleLBApp” and select ‘ClustWLSessionSampleLBApp.war’

Ekran Resmi 2015-09-04 15.33.31

  1. Click on “Next”. Select “Install this deployment as an application”. Click on “Next”.

Ekran Resmi 2015-09-04 15.33.41

  1. Select “SampleLB” Servers box. And click on “Next”.

Ekran Resmi 2015-09-04 15.33.48

  1. Click on “Finish”. Once the page is redirected to the Deployments screen and the successful message is displayed, click on ‘Activate Changes’

Ekran Resmi 2015-09-04 15.33.55

  1. Go to Administration Server Console, Expand Environment, click on Clusters.

Click on Lock and Edit to create a session of editing.

Click New and choose Dynamic Cluster:

Ekran Resmi 2015-09-04 15.34.08

  1. Enter the Name wlsdevCluster and click Next.

Ekran Resmi 2015-09-04 15.34.15

  1. Leave the default, 2 for the number of dynamic servers and enter Server Name Prefix: wlsdevManaged- and click Next.Ekran Resmi 2015-09-04 15.34.22
  2. Choose Use a single machine for all dynamic servers and choose Selected Machine: Machine. Click Next.

Ekran Resmi 2015-09-04 15.34.27

  1. Use the ports: Listen Port for First Server 7002 and SSL 8100 and click Next.

Ekran Resmi 2015-09-04 15.34.32

  1. Review the details and click Finish.

Ekran Resmi 2015-09-04 15.34.40

  1. Click Activate Changes to activate your edit session.
  2. Go to Environment->Servers.

Click Control tab.

Check box near to wlsdevManaged Servers and click on Start.

Ekran Resmi 2015-09-04 15.34.47

Click Yes.

Ekran Resmi 2015-09-04 15.34.57

Refresh the page till both the managed server gets started.

Ekran Resmi 2015-09-04 15.35.04

Note: you can also look on nodemanager log, Node manager is responsible for starting and stopping managed server.

Ekran Resmi 2015-09-04 15.35.15

Create new WebLogic Server Domain (Part -2-)

A WebLogic Server domain is an administrative unit, this administrative unit consists of one Administration Server, one or many clusters containing one or more managed servers. This administrative unit is maintained, and monitored through either the administration console or Enterprise Manager Fusion Middleware Control.

Best practise states that we should never perform our configuration work within the middleware home you’ve just created. This middleware home is reserved for the Fusion Middleware binaries only. The best practise folder structure we will use today looks like:

Ekran Resmi 2015-09-04 12.40.32

Note: Create the directory structure as shown above by executing script. Do note that you have to change the permissions of the scripts by doing a “chmod 755 *.sh” in the weblogic-basics directory mentioned below

cd /u01/content/weblogic-innovation-seminars/WInS_Demos/weblogic-basics

chmod 755 *.sh


Note: Make sure you DO NOT install WebLogic Server as the root user – if you are unsure ask.

  1. To configure a new Domain, run the WebLogic Configuration Wizard:


  1. Choose Create a new domain. Type for location:


Click Next

Ekran Resmi 2015-09-04 12.40.43 

  1. Choose products as in the screenshot below:

Ekran Resmi 2015-09-04 12.40.53

  1. Enter user name weblogic and password welcome1, click Next.

Ekran Resmi 2015-09-04 12.41.03

  1. Choose Domain Mode: Production and JDK: Oracle Hotspot 1.8.0_25 and click Next.Ekran Resmi 2015-09-04 12.41.23
  2. Check NodeManager box and click Next.

Ekran Resmi 2015-09-04 12.41.32

  1. Now you are configuring Node Manager. Choose Custom Location and type:


Ekran Resmi 2015-09-04 12.41.40

For Node Manager Credentials enter weblogic and welcome1.

Click Next.

8.   Review the details and click Create.

9.   Wait until the progress bar is at 100% and the domain is fully created and click Next.

10. Review details about the location of your domain and the URL of the Administration Server Console and click Finish:

Ekran Resmi 2015-09-04 12.41.50

Install WebLogic Server part -1-


  1. To install WebLogic Server, open a Terminal Window and type in the command :

java -jar /media/sf_WebLogicServer/fmw_12.


  1. This will open a graphical installation window.

Ekran Resmi 2015-09-04 11.22.14

  1. Click Next; you should now see the screen below asking you to provide a new middleware home directory:


Type in the new middleware home as:


Ekran Resmi 2015-09-04 11.22.23


Click Next


  1. Choose Fusion Middleware Infrastructure and click Next.
    Ekran Resmi 2015-09-04 11.22.34


  1. Check that all prerequisites are met correctly and press Next

Ekran Resmi 2015-09-04 11.22.45


  1. Uncheck the I wish to receive security updates via My Oracle Support and click Next.

Ekran Resmi 2015-09-04 11.22.54
Acknowledge the ‘Do you wish to remain uniformed dialog’ by clicking Yes.

Ekran Resmi 2015-09-04 11.23.08

  1. Click Install.
  2. Wait until the installation progress bar completes to 100% and click Next.

Ekran Resmi 2015-09-04 11.23.17

  1. Review the final screen detailing the successful installation of FMW 12C infrastructure and click Finish.

Ekran Resmi 2015-09-04 11.23.29