Weblogic 3
Weblogic 3
Weblogic 3
Suppose if we dont have an option to decrease the Heap Memory then we can even think of adjusting
the -XX:MaxNewSize (in JDK1.3 and JDK1.4) or -Xmn (new name of Young Generation flag from JDK1.4
onwards). Increasing the -Xmn (Young Generation Area) helps in scenarios where the Application
creates short living objects (less caching Applications). Because it inceases the time of minor GC, most of
the application objects dies early.
Similarly If we dont require a very frequent RMI garbage collection then we can use the JVM Option: –
Dsun.rmi.dgc.client.gcInterval=1800000 …… It means now the Explicit RMI Garbage collection will
happen in 30 Minutes.
Many applications which creates a lots of Threads which requires less memory for their local variables,
still the JVM allocates a large memory StackSize for those threads…so after a certain number of thread
creation JVM will not be allocate some more space for new Thread creation.
. We must disable loading some libraries in the memory of JVM if our application does not require them.
Like if our Application does not require the JVMs Graphic Library then in that case we must diasble
loading of Graphic libraries using the JVM Option “-Djava.awt.headless=true”
HTTP tunneling
Lam Diengdoh If you want to use HTTP tunneling (wrap every message in HTTP to get through a
firewall), you need to add TunnelingEnabled="true" into your &lr;ver> definition in the config.xml file or
check the appropriate box on the console. Then use a URL like http://localhost:7001 instead of
t3://localhost:7001 for Context.PROVIDER_URL when getting your InitialContext. If you want HTTP
tunneling with SSL, use https://localhost:7002 (where https uses HTTP tunneling with SSL and 7002 is
the secure port that you configured). You will pay a performance penalty for doing this, so only use
tunneling it if you really need to (i.e., need to go through a firewall)
1_Update the cert my_managed_server01 (private key *.jks and the new cert
file *.cer is already created and copied it to the certs directory)
cd /opt/bea/domains/MyProdDomain/certs
2_logon to http://Adminserver01:7001/console
-go to Environment > Servers > my_managed_server01 > Configuration >SSL
d: Import the certificates into the keystore, this can be done in two ways either by importing the
certificates in an order of RootCA, intermediateCA and then Certificate reply. Or we can create a
certificate chain clubbing them in an order into a .pem file.
For demo, we would create a certificate chain file CertChain.pem and import it into the identity
keystore overriding the private key alias which is client in this example.
keytool -import -file CertChain.pem -alias client -keystore identity.jks -storepass
password
e: Create a trust keystore, this can be done my importing your RootCA certificate into another
keystore that constitutes the trust.
keytool -import -file rootCA.cer -alias RootCA -keystore trust.jks -storepass
password
To verify the contents of the keystore, you can use the below command,
Server –> Click on the Keystore tab. By default it points to the Demo Certificates.
From the dropdown list select the “Custom Identity and Custom Trust” option.
Enter the identity and trust keystore details.
b: Configure the identity of the server:
Click on the SSL tab and enter the alias of the private key i.e. client in this case and the keypass
password.
NOTE: If you enable the SSL for a WebLogic Server, by default it would be One Way SSL. If you
want to change to Two Way SSL, you would require to select the two way SSL behavior from the
Advanced option list.
c: Configure the SSL port.
Go to server –> General tab –> Specify and enable SSL port.
You can see the below messages in the server logs which indicate that the certificates are loaded.
<Notice> <Security> <BEA-090171> <Loading the identity certificate and private
key stored under the alias client from the JKS keystore file
C:\Wonders\WebLogic\Security\SSL-Certs\Verisign\identityVerisign.jks.>
<Notice> <Security> <BEA-090169> <Loading trustedcertificates from the JKS
keystore file C:\Wonders\WebLogic\Security\SSL-Certs\Verisign\trustVerisign.jks.>
Click on the certificate details and you would find the details about the identity and the RootCA along
with the certificate chain.
NOTE: For a production environment make sure that CN (Common Name) of the certificate matches
with the server host name.
You can also use self signed certificates or trial certificates for testing purpose. However is it not
recommended to use them in production environment.
You can get the Verisign trail certificates from the below link.
When we deploy web applications on the weblogic server, there are some common errors seen on
the admin console while activating changes. These errors are usually not resolved even after restart
of the server. Few of the issues are as below:
1) <Error> <Console> <BEA-240003> <Console encountered the following error
weblogic.management.DeploymentException: [Deployer:149189]Attempt to operate ‘distribute’ on null
BasicDeploymentMBean for deployment portalTramitsServeisEAR. Operation can not be performed
until server is restarted.
– This may be resolved by running statd() and lockd() processes on every NFS client that accesses
a remote NFS volume.
– If different servers (sharing the same domain root) are started with different user Ids of same
group, set the correct “umask” for the server process so that the file created by one server can be
opened for read/write by the other server without security exceptions. Eg: “umask 002”.
2) javax.xml.transform.TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found
at javax.xml.transform.TransformerFactory.newInstance(TransformerFactory.java:108)
at weblogic.management.provider.internal.ConfigReader.convert(ConfigReader.java:100)
at weblogic.management.provider.internal.ConfigReader.<init>(ConfigReader.java:71)
at weblogic.management.provider.internal.ConfigReader.<init>(ConfigReader.java:65)
at
weblogic.management.provider.internal.RuntimeAccessDeploymentReceiverService.handleConfigTree
Load(RuntimeAccessDeploymentReceiverService.java:961)
at
weblogic.management.provider.internal.RuntimeAccessDeploymentReceiverService.updateDeployment
Context(RuntimeAccessDeploymentReceiverService.java:581)
at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doUpdateDeploym
entContextCallback(DeploymentReceiverCallbackDeliverer.java:133)
at
weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.updateDeployment
Context(DeploymentReceiverCallbackDeliverer.java:27)
– When the application is already deployed on the server, any change made through the console
throws this error. Suppose the application is deployed on the managed servers, when the servers
are running and the application is active, the changes cannot be activated. The workaround for this
is to shutdown the managed servers and make any changes. But this is not acceptable in the
production environment.
Solution :
1- Undeploy the application. Shutdown the servers.
2- Add xercesImpl.jar, xalan.jar, serializer.jar, xml-apis.jar and xsltc.jar libraries in classpath.
3- In the application, place the file xalan.jar, xercesImpl.jar and xml-apis.jar in the war file i.e web-
inf/lib directory, then set prefer-web-inf-classes to true in weblogic.xml as:
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<BEA-290071> <Deployment service servlet failed on parsing the request or uploading the file>
Use the following java option
-Dweblogic.deploy.UploadLargeFile=true
http://docs.oracle.com/cd/E21764_01/web.1111/e13712/web_xml.htm#i1039990
-Dweblogic.jsp.noOptimization
Thread pool
There are two ways to achieve this. One way is by using a JVM startup
argument and the other way is by editing the config.xml file.
1) Using a JVM startup argument to specify the self-tuning thread pool size
To set a minimum thread pool size, add the following JVM startup argument to
JAVA_OPTIONS in the WLS startup script.
-Dweblogic.SelfTuningThreadPoolSizeMin=<value>
To set a maximum thread pool size, add the following JVM startup argument:
-Dweblogic.SelfTuningThreadPoolSizeMax=<value>
<server>
<name>TestServer</name>
<self-tuning-thread-pool-size-min>100</self-tuning-thread-pool-size-min>
<self-tuning-thread-pool-size-max>200</self-tuning-thread-pool-size-max>
...
</server>
NOTE: If you set the values in both the JVM arguments and config.xml, the
values in the JVM arguments will overwrite the values you defined in
config.xml.
Eden Space (heap): The pool from which memory is initially allocated for most objects.
Survivor Space (heap): The pool containing objects that have survived the garbage collection of the Eden
space.
Tenured Generation (heap): The pool containing objects that have existed for some time in the survivor
space.
Permanent Generation (non-heap): The pool containing all the reflective data of the virtual machine
itself, such as class and method objects. With Java VMs that use class data sharing, this generation is
divided into read-only and read-write areas.
Code Cache (non-heap): The HotSpot Java VM also includes a code cache, containing memory that is
used for compilation and storage of native code.
XgcPrio:deterministic (To guarantee maximum pause time, for real time systems)