There are two ways user's HTTP session timeout can be set for your web application.
1. Web.xml
2. Weblogic.xml
Web.xml
<session-config>
<session-timeout>60</session-timeout>
</session-config>
Please note in web.xml the session timeout is set in minutes.
Weblogic.xml
<session-descriptor>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>3600</param-value>
</session-param>
</session-descriptor>
In weblogic.xml the session timeout is set in seconds.
More importantly the timeout value set in web.xml takes precedence over weblogic.xml. If you don't set any values in web.xml, weblogic.xml takes over. I think it is better to handle session timeout in web.xml itself since web.xml takes precedence over application server’s deployment descriptors.
Showing posts with label Weblogic. Show all posts
Showing posts with label Weblogic. Show all posts
How to change from development mode to production mode in Weblogic 10.3
Some of you have requested how to change Weblogic start up mode from DEV to production or vice versa. Actually it is very simple. One way to change it is, by simply editing setDomainEnv.cmd which resides in $root_domain/bin folder.
1. Look for the line that sets the
Add false to the value of the
Set true for starting in prod mode.
set PRODUCTION_MODE=false
2. Save your changes and exit the text editor.
Useful links:
How to create weblogic domain templates?
Difference between Dev mode and Prod mode
1. Look for the line that sets the
PRODUCTION_MODE script variable: set PRODUCTION_MODEAdd false to the value of the
PRODUCTION_MODE variable to ensure the server starts in development mode:Set true for starting in prod mode.
set PRODUCTION_MODE=false
2. Save your changes and exit the text editor.
Useful links:
How to create weblogic domain templates?
Difference between Dev mode and Prod mode
Labels:
Weblogic
Error code 413 in Weblogic
Sometimes if you have MaxPostSize set in Apache configuration(httpd.conf) to lower number such as 2048 bytes, you may get into error 413 when you perform operations such as file upload, data transfer from the browser. I had this issue for some of my applications deployed in weblogic server 10.3 with Apache proxying the requests.
You might want either increase the size or remove it completely. if you don't mention it will take default integer which is -1. this means unlimited size.
<Location /app1>
SetHandler weblogic-handler
WebLogicHost localhost
WebLogicPort 7001
WLCookieName cookie1
DynamicServerList OFF
MaxPostSize 2048
Debug ALL
WLLogFile logs/proxy.log
</Location>
Useful links:
If you would like to know how to integrate Apache with Weblogic, please visit this blog.
You might want either increase the size or remove it completely. if you don't mention it will take default integer which is -1. this means unlimited size.
<Location /app1>
SetHandler weblogic-handler
WebLogicHost localhost
WebLogicPort 7001
WLCookieName cookie1
DynamicServerList OFF
MaxPostSize 2048
Debug ALL
WLLogFile logs/proxy.log
</Location>
Useful links:
If you would like to know how to integrate Apache with Weblogic, please visit this blog.
Weblogic WAR Deployment Error
It looks like weblogic throws this error when web application is deployed only as WAR. But it doesn't throw any exception when deployed as exploded.
weblogic.management.DeploymentException: Cannot set web app root system property when WAR file is not expanded - with nested exception: [java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded].
There are two ways we can fix this issue when you still want to deploy as WAR.
1. Go to server admin console->Domain-> Web applications. Click the checkbox of Archived Real Path Enabled. This should make an entry into domain config.xml as below. or you can directly edit your domain config.xml and add the below entry.
<web-app-container>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</web-app-container>
2. Second option is at webapp level by updating weblogic.xml as below:
<container-descriptor>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
The value of <show-archived-real-path-enabled> set in the web app has precedence over the value set at the domain level. The default value of this property is false.
weblogic.management.DeploymentException: Cannot set web app root system property when WAR file is not expanded - with nested exception: [java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded].
There are two ways we can fix this issue when you still want to deploy as WAR.
1. Go to server admin console->Domain-> Web applications. Click the checkbox of Archived Real Path Enabled. This should make an entry into domain config.xml as below. or you can directly edit your domain config.xml and add the below entry.
<web-app-container>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</web-app-container>
2. Second option is at webapp level by updating weblogic.xml as below:
<container-descriptor>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
The value of <show-archived-real-path-enabled> set in the web app has precedence over the value set at the domain level. The default value of this property is false.
Labels:
Weblogic
ServletContext.getRealPath returns null
Another weird behavior from weblogic when webapp is deployed as WAR. ServletContext.getRealPath() returns null when deployed as WAR but it works ok when deployed as exploded. There are two ways we can fix this issue when you still want to deploy as WAR but would like to get over with this issue:
1. Go to server admin console->Domain-> Web applications. Click the checkbox of Archived Real Path Enabled. This should make an entry into domain config.xml as below.
<web-app-container>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</web-app-container>
2. Second option is at webapp level by updating weblogic.xml as below:
<container-descriptor>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
The value of <show-archived-real-path-enabled> set in the web app has precedence over the value set at the domain level. The default value of this property is false.
1. Go to server admin console->Domain-> Web applications. Click the checkbox of Archived Real Path Enabled. This should make an entry into domain config.xml as below.
<web-app-container>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</web-app-container>
2. Second option is at webapp level by updating weblogic.xml as below:
<container-descriptor>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
The value of <show-archived-real-path-enabled> set in the web app has precedence over the value set at the domain level. The default value of this property is false.
Labels:
Weblogic
Log4jConfigListener Deployment Issue
It looks like Spring framework's Log4jConfigListener is having an issue when webapp is deployed as WAR. Log4jConfigListener is defined in web.xml. I got the below error while deploying the application in weblogic 10.3.
weblogic.management.DeploymentException: Cannot set web app root system property when WAR file is not expanded - with nested exception: [java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded].
The solution is deploy the WAR as exploded or don't use Log4jConfigListener. The spring framework documentation also says the WAR should be exploded.
There is some update here. There is a solution available to this without any code change. We just need to set "Archived Real Path Enabled" option checked. Please check this blog entry on how to enable.
Useful Links:
To read more articles on Weblogic, please click here.
weblogic.management.DeploymentException: Cannot set web app root system property when WAR file is not expanded - with nested exception: [java.lang.IllegalStateException: Cannot set web app root system property when WAR file is not expanded].
The solution is deploy the WAR as exploded or don't use Log4jConfigListener. The spring framework documentation also says the WAR should be exploded.
There is some update here. There is a solution available to this without any code change. We just need to set "Archived Real Path Enabled" option checked. Please check this blog entry on how to enable.
Useful Links:
To read more articles on Weblogic, please click here.
Labels:
log4j,
Log4jConfigListener,
Weblogic
ResourceUtils.getFile() bug in Spring Framework 2.0.8 with weblogic10.3
I cam across this weird problem which gave me really hard time for about 2-3 weeks. The issue is as below:
We use spring framework in one of our web applications. One of the java classes loads XMLs which reside in web-inf/classes folder. It uses ResourceUtils.getFile() method as below:
File file = ResourceUtils.getFile("classpath://data-values.xml");
This method works fine when we deploy as exploded WAR in weblogic 10.3 but when we deploy as WAR, it gives FileNotFoundException. What weblogic does during WAR deployment(obviously it internally explodes) is, it puts all the files reside in web-inf/classes folder into jar called _wl_cls_gen.jar file and copies into web-inf/lib directory. This is where the problem during deployment as the java class was unable to read the xml and throwing FileNotFoundException.
The exact error message is as below:
java.io.FileNotFoundException: class path resource [//data-values.xml] cannot be resolved to absolute file path because it does not reside in the file system: zip:C:/domains/devDomain/servers/AdminServer/tmp/_WL_user/testWebApp/8j5e1y/war/WEB-INF/lib/_wl_cls_gen.jar!/data-values.xml
So I was looking to see if there is a way to tell weblogic to avoid generating this jar as my java classes were unable to load XMLs which resides in that jar file now. It looks like as for as my knowledge there may not be a way. Even I have asked the same question in oracle forums itself but that didn't help. Also when we googled we came across this issue in number of search results. Some say it is spring issue with ResourceUtils.getFile().
Some suggested use different approach to load xmls. So one of our team members tried using org.springframework.core.io.ClassPathResource which fixed the issue. The code snippet is as below:
String xmlFile = "classpath://data-values.xml";
final int index = StringUtils.lastIndexOf(xmlFile, "/") == -1 ? 0 : StringUtils.lastIndexOf(xmlFile, "/");
final Resource resource = new ClassPathResource(StringUtils.substring(xmlFile, index, xmlFile.length()));
final InputStream is = resource.getInputStream();
try {
final InputStreamReader reader = new InputStreamReader(is);
try {
final Document headerDoc = new SAXBuilder().build(reader);
} finally {
reader.close();
}
} finally {
is.close();
}
It looks like Spring's 2.0.8 version ResourceUtils.getFile() method is having a bug while loading xmls when you deploy as WAR in weblogic. But no issues when you deploy as exploded. But ClasspathResource seems to be working fine.
We use spring framework in one of our web applications. One of the java classes loads XMLs which reside in web-inf/classes folder. It uses ResourceUtils.getFile() method as below:
File file = ResourceUtils.getFile("classpath://data-values.xml");
This method works fine when we deploy as exploded WAR in weblogic 10.3 but when we deploy as WAR, it gives FileNotFoundException. What weblogic does during WAR deployment(obviously it internally explodes) is, it puts all the files reside in web-inf/classes folder into jar called _wl_cls_gen.jar file and copies into web-inf/lib directory. This is where the problem during deployment as the java class was unable to read the xml and throwing FileNotFoundException.
The exact error message is as below:
java.io.FileNotFoundException: class path resource [//data-values.xml] cannot be resolved to absolute file path because it does not reside in the file system: zip:C:/domains/devDomain/servers/AdminServer/tmp/_WL_user/testWebApp/8j5e1y/war/WEB-INF/lib/_wl_cls_gen.jar!/data-values.xml
So I was looking to see if there is a way to tell weblogic to avoid generating this jar as my java classes were unable to load XMLs which resides in that jar file now. It looks like as for as my knowledge there may not be a way. Even I have asked the same question in oracle forums itself but that didn't help. Also when we googled we came across this issue in number of search results. Some say it is spring issue with ResourceUtils.getFile().
Some suggested use different approach to load xmls. So one of our team members tried using org.springframework.core.io.ClassPathResource which fixed the issue. The code snippet is as below:
String xmlFile = "classpath://data-values.xml";
final int index = StringUtils.lastIndexOf(xmlFile, "/") == -1 ? 0 : StringUtils.lastIndexOf(xmlFile, "/");
final Resource resource = new ClassPathResource(StringUtils.substring(xmlFile, index, xmlFile.length()));
final InputStream is = resource.getInputStream();
try {
final InputStreamReader reader = new InputStreamReader(is);
try {
final Document headerDoc = new SAXBuilder().build(reader);
} finally {
reader.close();
}
} finally {
is.close();
}
It looks like Spring's 2.0.8 version ResourceUtils.getFile() method is having a bug while loading xmls when you deploy as WAR in weblogic. But no issues when you deploy as exploded. But ClasspathResource seems to be working fine.
Weblogic as windows service error
There is a bug in BEA documentation for creating weblogic server instance as window service. The doumentation URL is here
The example script (for creating weblogic as window service) in the documentation shows we need to have ADMIN_URL as below:
set ADMIN_URL=http://adminserver:7501
Actually we do NOT need to mention this url in the manual script. I had this URL mentioned and end up getting the error below.
java.rmi.NoSuchObjectException: The object identified by: '31' could not be found. Either it was has not been exported or it has been collected by the distributed garbage collector.
I removed this entry ran the script again. It worked.
To know more info on creating or installing weblogic as a window service, please see this blog entry
The example script (for creating weblogic as window service) in the documentation shows we need to have ADMIN_URL as below:
set ADMIN_URL=http://adminserver:7501
Actually we do NOT need to mention this url in the manual script. I had this URL mentioned and end up getting the error below.
java.rmi.NoSuchObjectException: The object identified by: '31' could not be found. Either it was has not been exported or it has been collected by the distributed garbage collector.
I removed this entry ran the script again. It worked.
To know more info on creating or installing weblogic as a window service, please see this blog entry
Labels:
Weblogic
Beware of StringUtils.containsIgnoreCase method in weblogic10.3
In one of the web applications we use Apache commons-lang API version 2.3. We have put this library as part of web-inf/lib of the web application. But Weblogic10.3 also has it own version(2.1.0) under $BEA_home\module folder. So there was a conflict but weblogic would not throw any error :) We use StringUtils.containsIgnorecase() in one of the java classes. When this method is getting called weblogic simply hung.
So we had to tell weblogic to load classes from web-inf not from original class loader. So in weblogic.xml we need to set prefer-web-inf-classes flag to true. This tells weblogic to load classes from web-inf folder first.
weblogic.xml:
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
This fixed the issue. I will take that.
P.S: For some web applications doing the above change might not help. In that case, commons-lang-2.4.jar needs to be added to PRE_CLASSPATH in domain's setDomainEnv.cmd. This should fix the issue.
set PRE_CLASSPATH=C:\temp\commons-lang-2.4.jar;
If you are running as a windows service, the jar needs to be added to beginning of the classpath.
So we had to tell weblogic to load classes from web-inf not from original class loader. So in weblogic.xml we need to set prefer-web-inf-classes flag to true. This tells weblogic to load classes from web-inf folder first.
weblogic.xml:
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
This fixed the issue. I will take that.
P.S: For some web applications doing the above change might not help. In that case, commons-lang-2.4.jar needs to be added to PRE_CLASSPATH in domain's setDomainEnv.cmd. This should fix the issue.
set PRE_CLASSPATH=C:\temp\commons-lang-2.4.jar;
If you are running as a windows service, the jar needs to be added to beginning of the classpath.
Labels:
Weblogic
Create weblogic as a windows service
By making entry in windows registry we can create weblogic server instance as windows service. To do this, we need to create a script which will have weblogic server-specific variables like domain name, server name, etc. This script calls master script called installSvc.cmd(${bea_dir}\wlserver_10.3\server\bin).
Here are the steps:
1. Go to${bea_dir}\wlserver_10.3\server\bin where bea_dir is home directory of weblogic installation.
2. Create a file called createSvc.cmd with following values: please make sure you mention the right domain name, path and admin server instance name. Also check the path of installSvc.cmd it varies from one version to other.
echo off
SETLOCAL
set DOMAIN_NAME=sampleDomain
set USERDOMAIN_HOME=c:\bea\user_projects\domains\sampleDomain
set SERVER_NAME=Adminserver_name
set PRODUCTION_MODE=false
set JAVA_VENDOR=Sun
set JAVA_HOME=C:\bea\jdk160_05
set MEM_ARGS=-Xms256m -Xmx512m
call "c:\bea\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
3. Execute createSvc.cmd script from same folder c:\bea\wlserver_10.3\server\bin\
4. This should create service with name of "beasvc sampleDomain_Adminserver_name" in the registry under
6. Also if there is an issue with start up, you may check the Admin server logs under domain.
Good luck. Let me know if you are running into any issues.
How to change the default service name?
As you know this script internal calls installSvc.cmd to create a windows service, this will prefix default "beasvc domain_name Adminserver....". To remove this prefix and have a custom service name, edit installSvc.cmd and look for beasvc and change the name you wanted to.
"%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%
How to remove server instance as a windows service:
Create a script called removeSvc.cmd and copy the following lines. Make sure adminServer name & domain name values are correctly set. And execute from the same place(c:\bea\wlserver_10.3\server\bin) where you created window service before.
echo off
SETLOCAL
set DOMAIN_NAME=sampleDomain
set SERVER_NAME=AdminServer
call "c:\bea\wlserver_10.3\server\bin\uninstallSvc.cmd"
ENDLOCAL
P.S: The name should be matching with the name given at the time of creating service in installSvc.cmd.
Here are the steps:
1. Go to${bea_dir}\wlserver_10.3\server\bin where bea_dir is home directory of weblogic installation.
2. Create a file called createSvc.cmd with following values: please make sure you mention the right domain name, path and admin server instance name. Also check the path of installSvc.cmd it varies from one version to other.
echo off
SETLOCAL
set DOMAIN_NAME=sampleDomain
set USERDOMAIN_HOME=c:\bea\user_projects\domains\sampleDomain
set SERVER_NAME=Adminserver_name
set PRODUCTION_MODE=false
set JAVA_VENDOR=Sun
set JAVA_HOME=C:\bea\jdk160_05
set MEM_ARGS=-Xms256m -Xmx512m
call "c:\bea\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
3. Execute createSvc.cmd script from same folder c:\bea\wlserver_10.3\server\bin\
4. This should create service with name of "beasvc sampleDomain_Adminserver_name" in the registry under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services5. Also, if you go to services under Control panel, you should see the service with above name. Click the service to start. If you don't see it, there is some problem or sure. Check the path of domain and other variables in createSvc script.6. Also if there is an issue with start up, you may check the Admin server logs under domain.
Good luck. Let me know if you are running into any issues.
How to change the default service name?
As you know this script internal calls installSvc.cmd to create a windows service, this will prefix default "beasvc domain_name Adminserver....". To remove this prefix and have a custom service name, edit installSvc.cmd and look for beasvc and change the name you wanted to.
"%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%
How to remove server instance as a windows service:
Create a script called removeSvc.cmd and copy the following lines. Make sure adminServer name & domain name values are correctly set. And execute from the same place(c:\bea\wlserver_10.3\server\bin) where you created window service before.
echo off
SETLOCAL
set DOMAIN_NAME=sampleDomain
set SERVER_NAME=AdminServer
call "c:\bea\wlserver_10.3\server\bin\uninstallSvc.cmd"
ENDLOCAL
P.S: The name should be matching with the name given at the time of creating service in installSvc.cmd.
Labels:
Weblogic
Applet throwing class not found exception in Weblogic
I was getting some weird error (only in) weblogic when I try to load home page(applet) of web application. Home page was nothing but index.jsp which uses tag to load an applet. This applet needs a lot of libraries as part of archive values.
<jsp:plugin type="applet" name="CDApplet" code="com.cd.applet.Applet.class" codebase="." width="100" height="100" align="middle" jreversion="1.5">
<jsp:param name="id" value="CDApplet"/>
<jsp:param name="code" value="com.cd.applet.Applet"/>
<jsp:param name="codebase" value="."/>
<jsp:param name="archive" value="crimson.jar,commons-lang-2.3.jar,jdom.jar,jfreechart-0.9.16.jar,picocontainer-1.0-beta-5.jar,commons-collections-3.2.jar,jaxen-core.jar,saxpath.jar,jaxen-jdom.jar" />
</jsp:plugin>
The above code was NOT working as you see the archive values are sent as parameter. This seems to be okay with Tomcat but somehow weblogic 10.3 could not recognize that. It was throwing Applet Class Not Found Exception. It was really freaking me out. Then I tried this, instead of passing as an argument, I set archive values as part of the tag itself. Example given below:
<jsp:plugin type="applet" name="CDApplet" code="com.cd.applet.Applet.class" codebase="." width="100" height="100" align="middle" jreversion="1.5" archive="cd-applet.jar, commons-collections-3.2.jar,jaxen-core.jar,saxpath.jar,jaxen-jdom.jar">
<jsp:param name="id" value="CDApplet"/>
<jsp:param name="code" value="com.cd.applet.Applet"/>
<jsp:param name="codebase" value="."/>
</jsp:plugin>
This worked. What a relief! By the way, this code change worked in Tomcat as well.
Adios.
<jsp:plugin type="applet" name="CDApplet" code="com.cd.applet.Applet.class" codebase="." width="100" height="100" align="middle" jreversion="1.5">
<jsp:param name="id" value="CDApplet"/>
<jsp:param name="code" value="com.cd.applet.Applet"/>
<jsp:param name="codebase" value="."/>
<jsp:param name="archive" value="crimson.jar,commons-lang-2.3.jar,jdom.jar,jfreechart-0.9.16.jar,picocontainer-1.0-beta-5.jar,commons-collections-3.2.jar,jaxen-core.jar,saxpath.jar,jaxen-jdom.jar" />
</jsp:plugin>
The above code was NOT working as you see the archive values are sent as parameter. This seems to be okay with Tomcat but somehow weblogic 10.3 could not recognize that. It was throwing Applet Class Not Found Exception. It was really freaking me out. Then I tried this, instead of passing as an argument, I set archive values as part of the tag itself. Example given below:
<jsp:plugin type="applet" name="CDApplet" code="com.cd.applet.Applet.class" codebase="." width="100" height="100" align="middle" jreversion="1.5" archive="cd-applet.jar, commons-collections-3.2.jar,jaxen-core.jar,saxpath.jar,jaxen-jdom.jar">
<jsp:param name="id" value="CDApplet"/>
<jsp:param name="code" value="com.cd.applet.Applet"/>
<jsp:param name="codebase" value="."/>
</jsp:plugin>
This worked. What a relief! By the way, this code change worked in Tomcat as well.
Adios.
Labels:
Weblogic
Difference between DEV and PROD mode in Weblogic 10.3
Development mode:
The default JDK for development domain is Sun Hotspot
You can use the demo certificates for SSL
Auto deployment is enabled
Server instances rotate their log files on startup
Admin Server uses an automatically created boot.properties during startup
The default maximum capacity for JDBC Datasource is 15
The debugFlag which is used to start the WebLogic Workshop Debugger is enabled
Production mode:
The default JDK for production domain is JRockit
If you use the demo certificates for SSL a warning is displayed
Auto deployment is disabled
Server instances rotate their log files when it reaches 5MB
Admin Server prompts for username and password during startup
The default maximum capacity for JDBC Datasource is 25
The debugFlag which is used to start the WebLogic Workshop Debugger is disabled.
If you would like to know how to change to weblogic start up mode from DEV to PROD or vice versa. please visit this entry.
The default JDK for development domain is Sun Hotspot
You can use the demo certificates for SSL
Auto deployment is enabled
Server instances rotate their log files on startup
Admin Server uses an automatically created boot.properties during startup
The default maximum capacity for JDBC Datasource is 15
The debugFlag which is used to start the WebLogic Workshop Debugger is enabled
Production mode:
The default JDK for production domain is JRockit
If you use the demo certificates for SSL a warning is displayed
Auto deployment is disabled
Server instances rotate their log files when it reaches 5MB
Admin Server prompts for username and password during startup
The default maximum capacity for JDBC Datasource is 25
The debugFlag which is used to start the WebLogic Workshop Debugger is disabled.
If you would like to know how to change to weblogic start up mode from DEV to PROD or vice versa. please visit this entry.
Weblogic Clustering Advantages
WebLogic clustering offers three important benefits:
1. Scalability:
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.
2. Load balancing:
The ability to distribute requests across all members of the cluster, according tothe workload on each server.
3. High availability:
A mix of features that ensure applications and services are available even if aserver or machine fails. Clients can continue to work with little or no disruption ina highly available environment. WebLogic achieves high availability using acombination of features: replication, failover, and migratable services.
1. Scalability:
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.
2. Load balancing:
The ability to distribute requests across all members of the cluster, according tothe workload on each server.
3. High availability:
A mix of features that ensure applications and services are available even if aserver or machine fails. Clients can continue to work with little or no disruption ina highly available environment. WebLogic achieves high availability using acombination of features: replication, failover, and migratable services.
Labels:
Weblogic
Weblogic Server Basic Components
Domain:
A Weblogic server domain is an administrative grouping of servers and/or clusters. You configure, manage, monitor the domain from central location; this central location is the administration (admin) server.
Admin Server:
Admin server is just a Weblogic Server instance which maintains a repository of configuration information for the domain. Admin server acts as a centralized application deployment server which provides browser based admin console for configure, manage and monitor all aspects of the domain.
Managed Server:
A Managed server is a term for any other server in the domain other than the admin server. Managed Servers host the components and associated resources that constitute your applications - for example, JSPs and EJBs. When a Managed Server starts up, it connects to the domain's Administration Server to obtain configuration and deployment settings.
Two or more Managed Servers can be configured as a WebLogic Server cluster (more about this in next blog) to increase application scalability and availability. In a WebLogic Server cluster, most resources and services are deployed to each Managed Server (as opposed to a single Managed Server,) enabling failover and load balancing.
Node Manager:
Node Manager is a Java utility that runs as separate process from WebLogic Server and allows you to perform common operations tasks for a Managed Server, regardless of its location with respect to its Administration Server. While use of Node Manager is optional, it provides valuable benefits if your WebLogic Server environment hosts applications with high availability requirements.
If you run Node Manager on a machine that hosts Managed Servers, you can start and stop the Managed Servers remotely using the Administration Console or from the command line. Node Manager can also automatically restart a Managed Server after an unexpected failure.
WebLogic Server Cluster:
A WebLogic Server cluster consists of multiple WebLogic Server server instances running simultaneously and working together to provide increased scalability and reliability. A cluster appears to clients to be a single WebLogic Server instance. The server instances that constitute a cluster can run on the same machine, or be located on different machines. You can increase a cluster's capacity by adding additional server instances to the cluster on an existing machine, or you can add machines to the cluster to host the incremental server instances. Each server instance in a cluster must run the same version of WebLogic Server.
How Does a Cluster Relate to a Domain?
A cluster is part of a particular WebLogic Server domain.
A domain is an interrelated set of WebLogic Server resources that are managed as a unit. A domain includes one or more WebLogic Server instances, which can be clustered, non-clustered, or a combination of clustered and non-clustered instances. A domain can include multiple clusters. A domain also contains the application components deployed in the domain, and the resources and services required by those application components and the server instances in the domain.
Useful links:
More articles on Weblogic
More articles on Weblogic Portal
Weblogic Portal Interview questions
A Weblogic server domain is an administrative grouping of servers and/or clusters. You configure, manage, monitor the domain from central location; this central location is the administration (admin) server.
Admin Server:
Admin server is just a Weblogic Server instance which maintains a repository of configuration information for the domain. Admin server acts as a centralized application deployment server which provides browser based admin console for configure, manage and monitor all aspects of the domain.
Managed Server:
A Managed server is a term for any other server in the domain other than the admin server. Managed Servers host the components and associated resources that constitute your applications - for example, JSPs and EJBs. When a Managed Server starts up, it connects to the domain's Administration Server to obtain configuration and deployment settings.
Two or more Managed Servers can be configured as a WebLogic Server cluster (more about this in next blog) to increase application scalability and availability. In a WebLogic Server cluster, most resources and services are deployed to each Managed Server (as opposed to a single Managed Server,) enabling failover and load balancing.
Node Manager:
Node Manager is a Java utility that runs as separate process from WebLogic Server and allows you to perform common operations tasks for a Managed Server, regardless of its location with respect to its Administration Server. While use of Node Manager is optional, it provides valuable benefits if your WebLogic Server environment hosts applications with high availability requirements.
If you run Node Manager on a machine that hosts Managed Servers, you can start and stop the Managed Servers remotely using the Administration Console or from the command line. Node Manager can also automatically restart a Managed Server after an unexpected failure.
WebLogic Server Cluster:
A WebLogic Server cluster consists of multiple WebLogic Server server instances running simultaneously and working together to provide increased scalability and reliability. A cluster appears to clients to be a single WebLogic Server instance. The server instances that constitute a cluster can run on the same machine, or be located on different machines. You can increase a cluster's capacity by adding additional server instances to the cluster on an existing machine, or you can add machines to the cluster to host the incremental server instances. Each server instance in a cluster must run the same version of WebLogic Server.
How Does a Cluster Relate to a Domain?
A cluster is part of a particular WebLogic Server domain.
A domain is an interrelated set of WebLogic Server resources that are managed as a unit. A domain includes one or more WebLogic Server instances, which can be clustered, non-clustered, or a combination of clustered and non-clustered instances. A domain can include multiple clusters. A domain also contains the application components deployed in the domain, and the resources and services required by those application components and the server instances in the domain.
Useful links:
More articles on Weblogic
More articles on Weblogic Portal
Weblogic Portal Interview questions
Labels:
Weblogic
How to make application deployed in weblogic as default web application?
The default Web Application is presented to clients who do not specify a URI (or specify "/" as the URI). To deploy a Web Application as a default Web Application, set the value of the context-root element to "/" in its deployment descriptor.You can specify the context-root element in the weblogic.xml deployment descriptor for Web Applications that are packaged as a .war archive or exploded .war directory.
If you package the Web Application as part of an Enterprise Application (.ear archive or exploded .ear), specify the context-root in application.xml. Note that the application.xml context-root takes precedent over the weblogic.xml value.
To test this:
Enter the URL in the browser after successfully configured as explianed above:
http://{server_name}:{port_no}/
P.S: No need to mention the application name after /.
If you package the Web Application as part of an Enterprise Application (.ear archive or exploded .ear), specify the context-root in application.xml. Note that the application.xml context-root takes precedent over the weblogic.xml value.
To test this:
Enter the URL in the browser after successfully configured as explianed above:
http://{server_name}:{port_no}/
P.S: No need to mention the application name after /.
Labels:
Weblogic
Subscribe to:
Posts (Atom)
