Tuning the Heap Size A large heap decreases the garbage collection frequency but may take slightly longer to garbage collect Typically a heap should be at least twice the size of the live objects in the heap Should set the heap as large as the PHYSICAL memory in your system will allow, as long as it doesn’t cause paging -Xms : which sets the initial and minimum heap size -Xmx : which sets the maximum heap size Set the initial/minimum heap size (-Xms) to the same value as the maximum heap size (-Xmx).
Read MoreWhat are clusters? Cluster is a logical set of multiple Weblogic Server instances running simultaneously across different geographies and working together to achieve high availability and scalability Weblogic Server clusters support multiple algorithms for load balancing and failover: round-robin, weight-based, random, round-robin-affinity, weight-based-affinity, and random-affinity(By default, a Weblogic Server cluster will use the round-robin method) **What is session replication? Weblogic Server provides clustering support for servlets and JSPs by replicating ‘HTTP session state’ of clients that access servlets and JSPs through a cluster service Weblogic Server can use ‘memory, file based and database’ persistence for storing session information How you deploy your applications on weblogic server?
Read MoreAdd and Remove targets from a Deploy-able system resource: Any deploy-able weblogic system resource (JDBC Data Source, JMS Connection Factory, JMS Servers, JDBC Multi Pools, Web deployment, etc) implement the ‘DeploymentMBean’ interface A deploy-able Systme resource is any MBean that may be deployed on one or more targets, such as a JMS Front-end or back-end or a JDBC connection pool. Any deploy-able resource (MBean) has targets, which specify which servers the deployment should be deployed / pinned on.
Read MoreEver wondered why sub-deployments are used for deploying JMS resources ? A sub-deployment is a mechanism by which JMS module resources like ‘queues, topics, and connection factories’ can be grouped and targeted to a server resource like ‘JMS servers, server instances, SAF agents, or a cluster’. You can group a connection factory with stand-alone queues or topics in a sub-deployment targeted to a specific JMS server, which guarantees that all these resources are co-located to avoid extra network traffic.
Read MoreWhen using WebLogicServer versions prior to WLS 9.x you might have used execute queues to improve performance of your applications , you may still continue avail the flexibility of 8.1 style execute queues by following one of the below methods 1) Enable 8.1 Style Execute Queues Add the following to the config.xml <server> <name>AdminServer</name> <use81-style-execute-queues>true</use81-style-execute-queues> <listen-address/> </server> or Add the following in JAVA_OPTIONS -Dweblogic.Use81StyleExecuteQueues=true 2) Enable 8.1 Style Execute Queues
Read MoreThere would be scenarios in prod/dev environments which warrants us to create a new / stand by AdminServer, you may follow the below gives steps to achive the same. You cannot use the Administration Console to delete the Administration Server as the admin console runs on the Administration Server Try these steps: Create a new server name: newAdminServer (say port number: 8001) Stop all running servers in the domain on
Read MoreWe can use the ‘storeUserConfig’ command to create a user configuration file that contains your credentials in an encrypted form and a key file that Weblogic Server uses to unencrypted credentials. And on subsequent WLST sessions (or in WLST scripts), supply the name of the user configuration file and key file instead of entering the credentials on the command line. This option is recommended if you use WLST in script mode because it prevents you from storing unencrypted user credentials in your scripts.
Read MoreBy default, WebLogic Server logging service uses an implementation based on the Java Logging APIs. Using the LogMBean.isLog4jLoggingEnabled attribute, you can direct the logging services to use Log4j instead. C:\>java weblogic.WLST # connect Administration Server wls:/offline> connect('uname','password') # Start an edit session and navigating to the logging mbean for the server names myserver wls:/mydomain/serverConfig> edit() wls:/mydomain/edit> startEdit() wls:/mydomain/edit !> cd("Servers/myserver/Log/myserver") # enable log4j wls:/mydomain/edit/Servers/myserver/Log/myserver !> cmo.setLog4jLoggingEnabled(true) #save and activate the changes wls:/mydomain/edit/Servers/myserver/Log/myserver !> save() wls:/mydomain/edit/Servers/myserver/Log/myserver !> activate() Java Logging is the default for client and server-side logging; Log4j is available only for server-side and not client-side logging.
Read MoreFind all of them here : http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html The descriptions for each option are taken mostly verbatim from the reference documents. C:\Users\Unnikrishnan>java -help Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the "server" VM The default VM is server.
Read MoreIssue WebLogic Server shuts down with the similar errors in log files <Apr 24, 2009 12:10:44 PM PDT> <Notice> <WebLogicServer> <BEA-000388> <JVM called WLS shutdown hook. The server will force shutdown now> <Apr 24, 2009 12:10:44 PM PDT> <Alert> <WebLogicServer> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>> <Apr 24, 2009 12:10:44 PM PDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN> Possible Cause and Solution I have the following suggestion for you for the below error: <Apr 24, 2009 12:10:44 PM PDT> <Notice> <WebLogicServer> <BEA-000388> <JVM called WLS shutdown hook.
Read MoreIssue: What to do when you see a similar message in weblogic server logs: <BEA-000627> <Reached maximum capacity of pool "MyPoolDS", making "0" new resource instances instead of "10".> Suggestions: What is the right thing to do after Reached maximum capacity of pool? You can get this message, in many scenarios When the number of connections configured for the connection pool using MaxCapacity is not sufficient for the application use. In this case, it is suggested to increase the no: of connections When there is no available thread to get the connection.
Read MoreIssue: Weblogic threads going into a hang/ locked / stuck state with the following stack trace in thread dumps: at java/util/HashMap.put(HashMap.java:1657)[optimized] at java/util/HashSet.add(HashSet.java:194)[inlined] at weblogic/rmi/internal/dgc/DGCServerImpl.addPhantomRef(DGCServerImpl.java:136)[inlined] at weblogic/rmi/internal/BasicServerRef.getLocalRef(BasicServerRef.java:729)[inlined] at weblogic/rmi/internal/BasicServerRef.getStubReference(BasicServerRef.java:709)[optimized] at weblogic/rmi/cluster/ClusterableServerRef.getStubReference(ClusterableServerRef.java:193)[optimized] at weblogic/rmi/internal/OIDManager.getReplacement(OIDManager.java:172)[optimized] at weblogic/rmi/utils/io/RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:123)[inlined] at weblogic/rmi/utils/io/RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:104)[optimized] at weblogic/rmi/utils/io/InteropObjectReplacer.replaceObject(InteropObjectReplacer.java:62) at weblogic/utils/io/ChunkedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:42) at weblogic/utils/io/ChunkedObjectOutputStream$NestedObjectOutputStream.replaceObject(ChunkedObjectOutputStream.java:151) at java/io/ObjectOutputStream.writeObject0(ObjectOutputStream.java:1045)[inlined] at java/io/ObjectOutputStream.writeObject(ObjectOutputStream.java:302)[optimized] at weblogic/jms/client/JMSConnectionFactory.writeExternal(JMSConnectionFactory.java:359) at java/io/ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310) at java/io/ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288)[inlined] at java/io/ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)[inlined] at java/io/ObjectOutputStream.writeObject(ObjectOutputStream.java:302)[optimized] at weblogic/rjvm/MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:614) at weblogic/utils/io/ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:73) at weblogic/jndi/internal/RootNamingNode_WLSkel.invoke(ILweblogic/rmi/spi/InboundRequest;Lweblogic/rmi/spi/OutboundResponse;Ljava/lang/Object;)Lweblogic/rmi/spi/OutboundResponse;(Unknown Source) at weblogic/rmi/internal/BasicServerRef.invoke(BasicServerRef.java:553)[optimized] at weblogic/rmi/cluster/ClusterableServerRef.invoke(ClusterableServerRef.java:224) at weblogic/rmi/internal/BasicServerRef$1.run(BasicServerRef.java:443)[inlined]
Read More# This is an Offline WLST script to create a WLS 10.3.1 (Oracle Weblogic Server 11gR1) Domain # # Domain consists of: # 1. Admin Server # 2. Two Managed Servers # 3. A Cluster with Two Managed Server # 4. An application deployed to the cluster # Read a domain template print('Reading Template - D:/Oracle/11gR1/one/wlserver_10.3/common/templates/domains/wls.jar') readTemplate('D:/Oracle/11gR1/one/wlserver_10.3/common/templates/domains/wls.jar') # Admin Server print('Creating Server - Admin Server') cd('Servers/AdminServer') set('ListenAddress','localhost') set('ListenPort', 7001) create('AdminServer','SSL') cd('SSL/AdminServer') set('Enabled', 'True') set('ListenPort', 7002) # Security print('Creating Password') cd('/') cd('Security/base_domain/User/weblogic') cmo.setPassword('welcome1') # Start Up print('Setting StartUp Options') setOption('CreateStartMenu', 'false') setOption('ServerStartMode', 'dev') setOption('JavaHome','D:/Oracle/11gR1/one/jrockit_160_05_R27.6.2-20') setOption('OverwriteDomain', 'true') # Create Domain to File System print('Writing Domain To File System') writeDomain('D:/Oracle/11gR1/one/user_projects/domains/OfflineDomain_WLST') closeTemplate() # Read the Created Domain print('Reading the Domain from In Offline Mode') readDomain('D:/Oracle/11gR1/one/user_projects/domains/OfflineDomain_WLST') # Creating Managed Servers print('Creating Server - MS1 on Port # 8001') cd('/') create('MS1', 'Server') cd('Server/MS1') set('ListenPort', 8001) set('ListenAddress', 'localhost') print('Creating Server - MS2 on Port # 8011') cd('/') create('MS2', 'Server') cd('Server/MS2') set('ListenPort', 8011) set('ListenAddress', 'localhost') # Create and configure a cluster and assign the Managed Servers to that cluster.
Read MoreA continuation of previous post … with a logic which would make changes to all the servers in the domain connect('weblogic','weblogic','t3://localhost:7001') edit() startEdit() svrs = adminHome.getMBeansByType('Server') for s in svrs: name = s.getName() cd('/Servers/' + name + '/Log/' + name) cmo.setNumberOfFilesLimited(true) cmo.setFileCount(100) cmo.setDomainLogBroadcastSeverity('Warning') cmo.setMemoryBufferSeverity('Warning') cmo.setLogFileSeverity('Warning') cmo.setStdoutSeverity('Warning') activate() disconnect() Cheers:) Unni
Read MoreThis posting answers the questions asked in http://forums.oracle.com/forums/thread.jspa?forumID=570&threadID=886625 print('Connectting to Admin Server') connect('weblogic','weblogic','t3://localhost:7001') print('Stating a New Edit Session') edit() startEdit() print('Navigating to Servers/AdminServer/Log/AdminServer MBean') cd('/Servers/AdminServer/Log/AdminServer') print('Setting NumberOfFilesLimited to true') cmo.setNumberOfFilesLimited(true) print('Setting FileCount to 10') cmo.setFileCount(10) print('Setting DomainLogBroadcastSeverity to Critical') cmo.setDomainLogBroadcastSeverity('Critical') print('Setting MemoryBufferSeverity to Critical') cmo.setMemoryBufferSeverity('Critical') print('Setting LogFileSeverity to Info') cmo.setLogFileSeverity('Info') print('Setting StdoutSeverity to Error') cmo.setStdoutSeverity('Error') print('\n\n --- \n\n') print('Navigating to Servers/AdminServer/WebServer/AdminServer/WebServerLog/AdminServer\n') cd('/Servers/AdminServer/WebServer/AdminServer/WebServerLog/AdminServer') print('Setting NumberOfFilesLimited to true') cmo.setNumberOfFilesLimited(true) print('Setting FileCount to
Read MoreA multi data source can be thought of as a pool of data sources. Multi data sources are best used for failover or load balancing between nodes of a highly available database system, such as redundant databases or Oracle Real Application Clusters (RAC). Note that multi data sources do not provide any synchronization between databases. It is assumed that database synchronization is handled properly outside of WebLogic Server so that data integrity is maintained.
Read MoreHiya, Last evening I was trying to create a JDBC Data Source using WLST for one of my colleagues. After a lot of hit-n-trial I was able to do it, so thought I would share it here. May come handing sometime while writing scripts to automate domain creations. ;) # This python program would create a DataSource named 'DS1' and targets it to (AdminServer and MS). # Please change the code as per your environment and needs: # Change the username and password with admin username and password.
Read MoreSomeone asked me this question few days back: Is there a way to find out the number of http sessions using WLST? I can query this information by clicking on Deployments and then clicking on Monitoring tab in Admin console. Here’s the answer: There is a MBEAN in the ‘RunTimeMbeans’ named ‘WebAppComponentRuntimeMBean’, which has these three attributes for retrieving session count related info: OpenSessionsCurrentCount: Provides a count of the current total number of open sessions in this module.
Read MoreAre you frustrated of adding ‘( )’ to the end of ‘ls’ every time you had to view the list of ‘Child MBeans and Attributes’ or when using ‘cd’ to navigate through Mbeans ? SATYA (WLST’s author) recently relieved a new (he kept it a secret till now) feature which can help you in reducing all that keystrokes which you waste when typing the ‘(’ and ‘)’ ’s Introducing the easeSyntax() command You can supply the easeSyntax() command after starting WLST in interactive mode to ease the python syntax.
Read MoreMany times JVM misbehaves, and we may have to force GC. The best way to do it is using WLST. Although the script doesn’t guarantee that GC would run, but many cases a force GC runs and a lot of memory gets freed up. I expect you to have: A Weblogic Server Domain Name of the server for which you want to perform GC User name and password for the server The Script: Open a text editor and Copy – paste the text given below into the editor.
Read MoreCreate a copy of ‘installSvc.cmd’ and name it ‘installSvcMS.cmd’ Replace the line in the file which calls the ‘beasvc’ command with the below given line: "%WL_HOME%\server\bin\beasvc" -install -svcname:"%DOMAIN_NAME%_%SERVER_NAME%" -depend:"domain92_AdminServer" -delay:"120000" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -extrapath:"%WL_HOME%\server\bin" -password:"%WLS_PW%" -cmdline:%CMDLINE% Here, ’-depend:“domain92_AdminServer”’ is the name of the Administration Server Windows service. To verify the service name, look on the Windows Services Control Panel.(‘services.msc’) ’-delay:“120000”’ is the time delay you want between the starting of admin server and managed server.
Read More