Monday, 3 August 2015

Querying Composite Instance States in SOA-INFRA Dehydration Store for Oracle SOA Suite 11g Processes



If you have a large number of composite instances present for a single or multiple composites the Enterprise Manager will not be a very ideal place to look at if we want to know the states of these instances.
We can however connect directly to the SOA_INFRA schema for our Oracle SOA Suite installation to execute a few scripts to view instance states of various composites.
Here are the database scripts available to find composite instances in various states in the CUBE_INSTANCE table.
The table below shows the various State Value for composite instances in the CUBE_INSTANCE table of the SOA_INFRA schema in the dehydration store.

STATE VALUESTATESTATE MEANING
0INITIATED
State value for an instance that has just been created. The instance will only have this value as its state after it has been created by the process domain.
1OPEN AND RUNNING
State value for an instance that has been created and has active activities executing. The instance is not in an exception or error condition.
2OPEN AND SUSPENDED
State value for an instance that is unavailable. Performers of any of the activities that belong to this instance cannot take any action until the instance has returned to the running state.
3OPEN AND FAULTED
State value for an instance that has an activity that has thrown an exception. When an activity throws an exception, the instance is flagged as being in an exception state until the exception is bubbled up, caught and handled.
4CLOSED AND PENDING
State value for an instance that has started its cancellation procedure. Since cancelling an instance may involve a great deal of business logic, the amount of time the entire cancellation process may take may be anywhere from seconds to days. During this time, the instance is said to be pending cancellation; an instance may not be acted upon during this time.
5CLOSED AND COMPLETED
State value for an instance that has been completed. All activities belonging to this instance have also been completed.
6CLOSED AND FAULTED
State value for an instance that has an activity that has thrown an exception while the instance is being cancelled. This state is equivalent to <code>STATE_OPEN_FAULTED</code> except that when the exception is resolved, the state transitions back to <code>CLOSED_PENDING_CANCEL</code> rather than <code>STATE_OPEN_RUNNING</code>
7CLOSED AND CANCELED
State value for an instance that has been cancelled. All activities belonging to this instance have also been cancelled.
8CLOSED AND ABORTED
State value for an instance that has been aborted due to administrative control. All activities belonging to this instance are also moved to the aborted state.
9CLOSED AND STALE
State value for an instance who’s process has been changed since the process was last accessed. No actions may be performed on the instance. All activities that belong to this instance are also moved to the stale state.
10NON RECOVERABLE
State value of instance that has failed and is marked as non recoverable.
The database query that can fetch and tabulate the number of instances in various states in the CUBE_INSTANCE table
1
2
3
4
5
6
7
8
9
10
11
12
SELECT (CASE WHEN STATE=1 THEN 'OPEN AND RUNNING'
WHEN STATE=2 THEN 'OPEN AND SUSPENDED'
WHEN STATE=3 THEN 'OPEN AND FAULTED'
WHEN STATE=4 THEN 'CLOSED AND PENDING'
WHEN STATE=5 THEN 'CLOSED AND COMPLETED'
WHEN STATE=6 THEN 'CLOSED AND FAUTED'
WHEN STATE=7 THEN 'CLOSED AND CANCELLED'
WHEN STATE=8 THEN 'CLOSED AND ABORTED'
WHEN STATE=9 THEN 'CLOSED AND STALE'
WHEN STATE=10 THEN 'NON-RECOVERABLE'
ELSE STATE || ''
END) AS STATE, COUNT(*) AS NUM_OF_CUBE_INST FROM CUBE_INSTANCE GROUP BY STATE;
In case you would like the same count of instances for a particular COMPOSITE application then extend the above sql script by adding additional filters to it.
You can add filters on CUBE_INSTANCE table based on COMPOSITE_NAME, COMPOSITE_REVISION, COMPONENTTYPE (BPEL/BPM/MEDIATOR) etc.

Wednesday, 29 July 2015

PHYSICAL SERVERS VS. VIRTUAL MACHINES


Though visualization has become the new normal for businesses of all sizes, physical server infrastructures are still quite widespread. Do you think that the companies using traditional, physical server networks are wasting money? This post will show you why this is exactly the case! Let’s start with what we used to have when physical servers were the normal platform of choice. The architecture of a physical server is quite plain. Each server has its own hardware: memory, network, processing and storage resources. On this hardware the server operating system is loaded. From the OS you can then run the applications. Pretty straight-forward.

Physical ServerVirtual Infrastructure
With a virtual infrastructure you have the same physical server with all the resources but instead of the server operating system there’s a hypervisor, such as vSphere or Hyper-V loaded on it. The hypervisor is where you actually create your Virtual Machines. As you can see on the diagram, each VM has its own virtual devices – virtual CPU, virtual memory, virtual network interface cards and its own virtual disk. On top of this virtual hardware you load a guest operating system and then your traditional server applications.
The benefits of visualization are obvious: instead of having just one application per server you can now run several guest Operating Systems and a handful of applications with the same physical hardware. That’s right, visualization can bring you so much more for your money!

Hardware Independence and VM portability

So what enables a Virtual Machine to be portable across physical machines running the same hypervisor? As said, every Virtual Machine has its own virtual hardware. So the guest operating system loaded on a VM is only aware of this hardware configuration and not the physical server’s one. In other words, a VM is completely hardware independent. It means that the operation system installed on a VM is no longer tied up to certain hardware and you can easily move virtual machines from one physical server to another or even to another data center!
This makes the VMs are absolutely portable! You can copy it to a flash drive, you can bring it home and replicate it at your home lab, you can give it to a friend or send it to your clients! You can even replicate a virtual machine across WAN or across the Internet!

More goodies of virtual machines

We talked about one of the key features that visualization provides which is virtual machine portability that is possible thanks to hardware independence. It allows you to easily migrate a VM to any place you like: you can back it up and restore on another server, you can put it on your flash drive and run it on your home lab or workstation, or you can even take the VM to another site! But that’s not all! There’s a whole of useful features created by the Hardware independence and VM portability:
  • vMotion is a VMware technology providing VM portability and hardware independence that allows migrating of a running VM from one server to another with no downtime for the end user!
  • Distributed Resource Scheduler or DRS. This VMware technology enables balancing virtual infrastructure in the aspect of resource consumption. DRS can move a running VM from one host to another (by means of vMotion) in order to give it all the resources it needs to operate effectively.
  • VMware High Availability or VMHA is an option that allows you to restore VMs from a failed server to another so that you’ll get it back running at no time.
  • Distributed Power Management or DPM is another great VMware feature that can help you reduce your company’s energy bill! With this feature you can easily bring power consumption by the infrastructure under control. DPM consolidates VMs on fewer physical servers when resource consumption across the virtual infrastructure is low. All the servers that are not needed will be turned off in the meantime.
  • Visualization makes Disaster Recovery way simpler as well. Thanks to the hardware independence once a VM inside your virtual infrastructure fails you can just run your backed up VMs on any server because the guest OS’s are no more tied up to particular hardware.
And this is just the top of the iceberg! Virtual machines have got much more great features that the traditional physical server-based infrastructure lacks. But in order to make maximum use of that great new functionality brought by visualization you should use the right tools for monitoring, managing and, of course, for data protection. Since virtual machines differ markedly from physical servers, the tools designed for the latter are no good for the former. It counts in particular for the backup.

Wednesday, 22 July 2015

Various GC Collectors



CollectorFunctionRecommended forHow to enable
Serial CollectorUses single thread for both minor and major collections. Simplest.Single processor machines-XX:+UseSerialGC
Parallel Collector (Throughput Collector)Uses multiple threads for minor collection.Multi processor machines, enterprise class applications-XX:+UseParallelGC
To enable Major parallel collection, add -XX:+UseParallelOldGC
CMS Collector (Concurrent Mark and Sweep Collector)Mostly performs GC simultaneously along with ApplicationApplications that cannot tolerate longer GC pause times-XX:+UseConcMarkSweepGC
G1 CollectorStrives to collect from Heap regions that have the most garbageMost enterprise class applications. Through testing required before implementing.–XX:+UseG1GC