Weblogic Domain and Cluster


What is a domain?

A domain, in weblogic world, is a set of weblogic (WL) instances that can be managed by the same administration console.
That’s why they are call managed servers.
Each WL instance can run on the same machine of the administration server or remotely

What is a weblogic instance?

It is just an ip and port address where the single weblogic listen

Why to use (or at least to be aware)

If you have different weblogic servers that you need to manage (remotely for example) you can create a domain that includes them.
Or/And, if you need a cluster of instances then you must before add all cluster instances in a domain and then you can create your cluster
So you can have two types on WL instances in a domain: Standalone (which don’t belong to any cluster) and Clustered

How

In weblogic console, in Environment==> Servers you can add you weblogic instances. You have just to know the ip and port address of each weblogic instance you want to add in the domain

What is a cluster?

A cluster is a subset of a weblogic domain, where each WL instance of the cluster has the same goal: allow load balancing and fail over for the fantastic (same) applications they host.

Of course, as you manage a set of instance for the same application(s), when you deploy the application you do it just one time for all WL instance in the cluser, and the WebLogic Administration is in charge of update all instances in the cluster.
Just a thing good to know: all the WL in a cluster must have the same WL version

From a client point of view the cluster is transparent. The client doesn’t know how many WL instances there are behind that ip address

Why

Advantages of a cluster are the same of LoadBalancing and Failover.

Scalability (Load Balancing): The capacity of an application deployed on a WebLogic Server cluster can be increased dynamically to meet demand. You can add server instances to a cluster without interruption of service, the application continues to run without impact to clients and end users.


High-Availability (Failover): In a WebLogic Server cluster, application processing can continue when a server instance fails. You “cluster” application components by deploying them on multiple server instances in the cluster so, if a server instance on which a component is running fails, an other server instance on which that component is deployed can continue application processing.

How

You can manage WL instances for a cluster in just two steps:

  1. create the cluster (in Environment ==> clusters ==> new button)
  2. for each existing or new server you can choose a cluster

That’s it!

Debug remotely with Eclipse

To debug with eclipse to remote server follow below instructions

In the menu Run –> Debug configurations…

In the window popup select Remote Java Application

Right click, then select New

On the right a new fieldset appears

In the Project field browse the java project to attach

In the Connection Type field:

  • Select “Standard (Socket Attach)” – int the 99% of cases -, if you want to attach your eclipse to a server (which listen on a ip and port). In this case you should specify the IP/name and the port of the server you want to attach
  • Select “Standard (Socket Listen)”, if you want to be the host, listening just on a port (and on your ip). In this case you should just specify the port and the connection number you want to allow. Of course the machine is the same of eclispe running instance

The listening port, in both case (local and remote), must be preconfigured setting, as jvm parameters, the following:

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000

  • The -XDebug parameter enables debugging
  • The -Xrunjdwp parameter loads the JPDA reference implementation of JDWP
  • Debugging, in the example, is enabled on port 4000

The JDWP protocol is the protocol used to debug with a remote debugger.

For example, in WebLogic server, to allow a debug socket listener, in the file “startWebLogic.cmd” add to the JAVA OPTIONS:

set JAVA_OPTIONS=-<others params> Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n

The -Xnoagent parameter disables the default sun.tools.debug debug agent

Just a little notice: if you want to debug clustered application, you have to attach the debug ide to all clustered servers, otherwise you need to be lucky to get the request to your debugged server

Curiosity: default debug port on weblogic 12.1.3 is 8453

Label in Java

The label in Java (from version 7) is a way of giving a logic name to a loop statement.

Why naming a statement in Java?
Just because in case, of very deeper loops, you want to break/continue that specific statement.

How to give a name to a statement?
Specifying a name (as a class style) followed by “:”

How can you break using label?
Simple, with break and continue followed by the label name. That’s it.

Example

  Task:
  {
    (loop statement){
        if (condition){
            break Task;
        }
    }
  }

In the above example “Task” is the label. When you reach the line “break Task;” the program will go outside the Task statement.
Of course the similar logic works with “continue Task;“, but in this case the program will continue with labeled statement.

A little curiosity, the below code works perfectly:

public int myMethod(){
http://www.google.com
return 1;
}

because “http:” is treated as label and “//www.google.com” is treated as comment

European Commission

Application Architect in the European Commission, Brussels.

In the DG RTD I’m actually working in a system which orchestrates processes involving different systems

The type of tasks are about supporting the Commission staff in the area of structuration and implementation of the Grant management systems.

I work inside a team composed of different profiles, with an internal development team and also with business user groups.

The main related tasks are to analyse, design and implement processes and Rest services in SOA context (BPMN, BPEL) using JBoss Activiti tool.

Specifically:

  • WS SOAP development on Oracle Web Logic application server
  • Oracle middleware products (SOA Suite)
  • standards/APIs: XSD, SOAP, JAX-WS, JAXB
  • JEE 6 environment and standards
  • EJB3 and JMS component
  • javaScript, jQuery, XML
  • Oracle relational database

In European Commission we are aware of test importance. So we use JUNIT with Mockito and PowerMock.

In this project I started using Docker.
Docker is used to host our DEV environment: Weblogic server and Oracle Database

Architect and Design tool: Enterprise Architect 13

Developer tools: Eclipse, Maven, SoapUI and GIT

CI tool: Jenkins

Development methodology: SCRUM

Morover:

  • Integration in an international/multi-cultural environment

Cornér

Swiss banking group based in Lugano, one of the most important financial cities in Switzerland

I dealt exclusively with an integration system between the main customer portal and the backend of the respective financial services (credit card).

The front-end, developed with BackBase CRM, made requests exclusively to REST services configured via swagger.
The backend, in turn, only exposed rest services
The system that I have evolved and maintained was responsible for orchestrating, through routing and mediations, the requests coming from the portal with the various REST backend services.
The orchestration took place thanks to the use of Apache Camel.
The various services exposed were packaged in OSGI components installed on the JBOSS Mule server
Being an integration system, tests were carried out using Junit and SOAP-UI
My role was that of design and implementation of the orchestration

I used Enterprise Architect 7 as design tool
As it was just a integration system I didn’t used at all any database technology
Build tool used was Maven and source version control tool has been GIT and Nexus (as Repository)

(Hybrid) Mobile Developer

Hybrid mobile apps are like any other apps you’ll find on your phone. They install on your device. You can find them in app stores. With them, you can play games, engage your friends through social media, take photos, track your health and much more.

Hybrid mobile apps are built with a combination of web technologies like HTML, CSS, and JavaScript and packaged as an natural app by PhoneGap.

The key difference is that hybrid apps are hosted inside a native application that utilizes a mobile platform’s WebView. This enables them to access device capabilities such as the accelerometer, camera, contacts, and more.

The main advantage is that you “write one and run everywhere” (already heared?)

Aduno

Aduno Group, based in Zurich and Lugano, is a Swiss financial services company specializing in cashless payments, held by Swiss banks.

The project I dealt with regards the improvement and maintenance maintenance of the CRM used for the Acquiring sector.
The role was initially that of Senior Java Architect and Senior Programmer, but a few months later I moved to the role of team leader
In particular Analysis, architecture, design and implementation of the existing system, support for the activities planning.

Technologies and methodologies used in the project:

  • Design Environment: Enterprise Architect 11, MS Visio
  • Development Framework: Scout, OSGI, Hibernate, JUNIT
  • Application server: Jetty
  • DataBase: Oracle 10g
  • Development Tool: Eclipse, GIT, Maven, SVN, ReST WS
  • Development language: Java 8
  • Software development methodologies: SCRUM

InfoCamere

Infocamere (IC) is the IT “armed” arm of the Italian Chambers of Commerce.

In IC I worked for the “Registro Imprese” system, a portal that allows to show official data of the chambers of commerce and, therefore, access to surveys, financial statements, files of all italian companies.
This portal was developed with Liferay 6, and my role was of Liferay designer and implementer.
Specifically, I designed and implemented components using spring MVC portlet and Service Builder (used just as service layer and NOT as Persistence layer, luckily)
The already existing backend layer was called by rest services clients

The front-end should be responsive, that’s why we used in important manner Boostrap and CSS 3

There was also a mysql database (secondary, just to decode some minor information) called directly by JDBC
The source code versioning was implemented by SVN and the build tool was Ant

Maker

IoT is my passion: with programming knowledge and a bit of electronic you can reach the moon

Arduino UNO, Arduino MKRFOX1200, ESP8266 and Raspberry are devices I usually use.

I program Arduino and ESP8266 with C, Python is used instead with Raspberry

Project I made include alarms, arduino turnstile for gym, little radio-controller (by Bluetooth and wireless) stuff and infrared gun (very funny!)