Blog Post Archive

    Tuning JRockit Posted on Sep 1, 2014
    Tuning JRockit


    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 More

    Weblogic Server Administration Server Interview Questions Posted on Sep 4, 2010
    Weblogic Server Administration Server Interview Questions


    What 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 More

    Add and Remove targets from a Deploy-able system resource Posted on Jun 2, 2010
    Add and Remove targets from a Deploy-able system resource


    Add 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 More

    Why sub-deployments are used in WebLogic Servers Posted on Mar 26, 2010
    Why sub-deployments are used in WebLogic Servers


    Ever 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 More

    Using WLS 8.1 Threading Model in WLS 9.x / 10.x Posted on Mar 26, 2010
    Using WLS 8.1 Threading Model in WLS 9.x / 10.x


    When 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 More

    Delete Admin Server for a running Weblogic domain Posted on Mar 24, 2010
    Delete Admin Server for a running Weblogic domain


    There 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 More

    Use userConfigFile for connecting to WebLogic Server Posted on Feb 25, 2010
    Use userConfigFile for connecting to WebLogic Server


    We 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 More

    WLST Script to enable Log4j Logger on WebLogic Server Posted on Jan 19, 2010
    WLST Script to enable Log4j Logger on WebLogic Server


    By 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 More

    Java HotSpot VM Options Posted on Jan 19, 2010
    Java HotSpot VM Options


    Find 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 More

    BEA-000388 - JVM called WLS shutdown hook. The server will force shutdown now Posted on Dec 7, 2009
    BEA-000388 - JVM called WLS shutdown hook. The server will force shutdown now


    Issue 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 More

    Reached maximum capacity of pool MyPoolDS making 0 new resource instances instead of 10 Posted on Dec 7, 2009
    Reached maximum capacity of pool MyPoolDS making 0 new resource instances instead of 10


    Issue: 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 More

    Infinite loop in hasmap.put caused high CPU usage stuck threads in WebLogic Server Posted on Dec 7, 2009
    Infinite loop in hasmap.put caused high CPU usage stuck threads in WebLogic Server


    Issue: 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

    Offline WLST script to create domain in Weblogic Server 11gR1 Posted on Oct 4, 2009
    Offline WLST script to create domain in Weblogic Server 11gR1


    # 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 More

    WLST script to change logging setting for all server in the domain Posted on Apr 17, 2009
    WLST script to change logging setting for all server in the domain


    A 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 More

    WLST script to change logging setting for AdminServer Posted on Apr 16, 2009
    WLST script to change logging setting for AdminServer


    This 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 More

    Create Multi Data Source in WebLogic Server using WLST Posted on Mar 2, 2009
    Create Multi Data Source in WebLogic Server using WLST


    A 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 More

    Creating a JDBC Data Source using WLST Posted on Feb 22, 2009
    Creating a JDBC Data Source using WLST


    Hiya, 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 More

    Retrieve HTTP Session Counts using WLST Posted on Feb 22, 2009
    Retrieve HTTP Session Counts using WLST


    Someone 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 More

    WLST made easy easeSyntax() Posted on Feb 8, 2009
    WLST made easy easeSyntax()


    Are 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 More

    How To: Force Garbage Collection using WLST on WebLogic Server Posted on Feb 7, 2009
    How To: Force Garbage Collection using WLST on WebLogic Server


    Many 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 More

    How To: Configure a Managed Server as a Windows Service in 5 Simple Steps Posted on Feb 7, 2009
    How To: Configure a Managed Server as a Windows Service in 5 Simple Steps


    Create 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

Connect. Socialize.

Sponsors