Monday, 22 September 2014

Weblogic Server Basic Components


Weblogic Server Basic Components


Below are the basic components of weblogic server


Domain:

Domain is a group of weblogic server resources like admin server, managed server, jms, connection pool, data sources etc or whatever the resource you know of weblogic server since domain is the basic unit you have to create after installation and everything created and configured under a domain. 
It can be possible to create multiple domains from a single installation and each domain has it's own resources but this is recommended only on development environment where you may want to test different applications or different customer applications on different domain. All domains are independent of each other. 


Admin Server & Admin Console

Admin server is a central unit which is used to configure and monitor a domain resources. it provides a browser or GUI based console called admin console for configuration and monitoring of the domain resources. 

Admin server is also a server instance which have all the capabilities just like we have on managed servers ( see next post for managed server ) but since it's a central repository for the domain configuration so it's not recommended to used it as a managed server but you can use it as a managed server on non production environments for testing purpose.


Managed Server

A managed server is an instance of weblogic server which is used to host ( deploy in terms of weblogic ) your applications and associate other domain resources with that. For example you create and deploy jar, ear, ear etc files and deploy on managed servers and after that create connnection pools, data source and associated with your managed server to let your application connect and get connection from database.

When you start a managed server it connects to admin server to get configuration and other deployment settings.

A domain can have multiple managed servers ( no upper limit of managed servers, you can create as many as you want only considering your hardware configuration ). They all can be independent servers or can be grouped into cluster to get scalability, availability, maintainability etc ( see below for cluster ).


Machine


A machine is a logical representation of the physical machine (computer) that hosts one or more WebLogic Server instances. or in a simple word you can say Machine is a host on which your weblogic server is running. When you create and configure a machine you need to configure node manager and for that you need to define the host on which your node manager is running ( actual host or called machine ) as well as node manager port ( see below for node manager )


Node Manager

Node Manager is a Java utility or service which runs as a separate process from WebLogic Server and allows you to perform common operations tasks related with Managed Servers  
regardless of its location with respect to its Administration Server. 

Use of Node Manager is optional but it provides valuable benefits if your WebLogic Server environment hosts applications with high 

Node manager is used to start or stop remote managed servers, remote managed servers means the servers distributed or configured on different machines or host, like In case of production where we ran multiple managed servers across different hosts in a single domain to get high availability, in that case all servers are distributed across multiple hosts however control via single admin console. make sure you have node manager running on each host and a machine configured via admin console for each host and respective managed server(s) associated with respective machine.

It provides the capability to auto health checking of managed servers and restart it automatically in case any server goes down.

Note :- Node manager is a independent java based utility which has not any dependency on weblogic or vice versa, so in case your node manager goes down there is no impact on your weblogic server running instances.


Cluster

Cluster is a group of manager servers work together to achieve high availability, scalability and for lots of other benefits. It appears to client as a single instance. All clustered servers can be on same or distributed across difference machines ( but in same cluster and domain ).   


Use of cluster provides the benefits of scalability, maintainability, high availability, load balancing, failover capabilities etc.

Saturday, 20 September 2014

Java String Methods - Length


The "string".length() Method

Length is a method/function used to obtain how many characters are present. These characters include spaces, punctuation, underscores, symbols in unicode, numbers and just about anything else you can think of.

For example, "iRobot" is a string that contains 6 characters, 'i', 'R', 'o', 'b', 'o', and 't'. Each character has its own index (location) in the String, in which calling "iRobot".length() will specify how many characters or spaces there are in the String.

This knowledge would be useless without an application so imagine you, a software developer, needs to ensure your clients names will fit on the screen of your newly built program. Without going through your clients one by one, you could use the length function on each one of their names in your database to find the longest name you must display. Code for this will be in example #1.

Example #1

public static void main(String[] args) {
 String[] clientNames = new String[]{
  "Jacobs", "Trout", "Semor", "Lee","Poppins",
  "Jenson", "Johnson","Peterson", "Kim"
, "Brown"}; int longest = 0; for(String s: clientNames) { if(s.length()>longest) { longest=s.length(); } } System.out.println("Minimum characters for display: "+longest); }


In example #1 the length method is used to figure out which string has the most characters. It is important to realize that Strings do not have a character at someString[someString.length()] would throw an exception and terminate your program. Remember that arrays and Strings alike are indexed starting with 0.

The last character of a String can be obtained by someString[someString.length()-1].
- See more at: http://w7r.blogspot.in/2012/06/java-string-methods-length.html#sthash.hrhXiatD.dpuf
JQuery,Css,HtmlJQery,Css,Html