Saturday, July 6, 2013

How to handle stuck thread into WLS 10.3.6.0

Hello all,

   I just want to publish today one item that is very helpful, from administration perspective and it is not covered that much. Basically are these parameters below that helps you to control stuck threads into you WLS.

Fig1: Domain--> environment --> Servers--> AdminServer-->Tuning

Basically the first one (Stuck Thread Max Time) is The number of seconds that a thread must be continually working before this server considers the thread stuck.
For example, if you set this to 450 seconds, WLS Server considers a thread to be "stuck" after 450 seconds of continuous use.

And Stuck Thread Max Interval is the number of seconds after which WebLogic Server periodically scans threads to see if they have been continually working for the configured maximum length of time.


I hope this helps you,
Thiago Leoncio.



Saturday, June 8, 2013

HOW TO DELETE MESSAGES FROM JMS QUEUE USING WLST

HOW TO DELETE MESSAGES FROM JMS QUEUE USING WLST

hey everybody,

  Today, into this specific case, I've configured a UMS Server to be my 'E-mail Server' and where it has my destination folder. So, your situation('where destination folder is') will depend of the configuration you have in your server.

STEP 1)Connecting using WLST.(OIM_HOME/common/bin)
[oracle@thiagoleoncio-server bin]$ ../../common/bin/wlst.sh

.....
Initializing WebLogic Scripting Tool (WLST) ...

Jython scans all the jar files it can find at first startup.
Depending on the system, this process may take a few minutes to complete, and WLST may not return a                                                       prompt right away.


Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

STEP 2)#Connect using your wls user/pwd and t3 url#
wls:/offline> connect('oim_leoncio','yourpwd','t3://thiagoleoncio-server:14000'                                                                                                                                                             )
Connecting to t3://thiagoleoncio-server:14000 with userid oim_leoncio ...
Successfully connected to managed Server 'oim-leoncio1' that belongs to domain 'o                                                                                                                                                             im_domain'.

Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.

STEP 3) #Get configuration and runtime details#
wls:/oim_domain/serverConfig> serverRuntime()
Location changed to serverRuntime tree. This is a read-only tree with ServerRunt                                                                                                                                                             imeMBean as the root.
For more help, use help(serverRuntime)

wls:/oim_domain/serverRuntime> ls()
dr--   ApplicationRuntimes
dr--   AsyncReplicationRuntime
dr--   ClusterRuntime
dr--   ConnectorServiceRuntime
dr--   DefaultExecuteQueueRuntime
dr--   EntityCacheCumulativeRuntime
dr--   EntityCacheCurrentStateRuntime
dr--   EntityCacheHistoricalRuntime
dr--   ExecuteQueueRuntimes
dr--   JDBCServiceRuntime
dr--   JMSRuntime
dr--   JTARuntime
dr--   JVMRuntime
dr--   JoltRuntime
dr--   LibraryRuntimes
dr--   LogBroadcasterRuntime
dr--   LogRuntime
dr--   MANAsyncReplicationRuntime
dr--   MANReplicationRuntime
dr--   MailSessionRuntimes
dr--   MaxThreadsConstraintRuntimes
dr--   MessagingBridgeRuntime
dr--   MinThreadsConstraintRuntimes
dr--   PathServiceRuntime
dr--   PersistentStoreRuntimes
dr--   RequestClassRuntimes
dr--   SAFRuntime
dr--   SNMPAgentRuntime
dr--   ServerChannelRuntimes
dr--   ServerSecurityRuntime
dr--   ServerServices
dr--   SingleSignOnServicesRuntime
dr--   ThreadPoolRuntime
dr--   TimerRuntime
dr--   WANReplicationRuntime
dr--   WLDFRuntime
dr--   WTCRuntime
dr--   WebServerRuntimes
dr--   WorkManagerRuntimes
dr--   WseeClusterFrontEndRuntime
dr--   WseeWsrmRuntime

-r--   ActivationTime                               1369348255930
-r--   AdminServer                                  false
-r--   AdminServerHost                              144.23.146.127
-r--   AdminServerListenPort                        17001
-r--   AdminServerListenPortSecure                  false
-r--   AdministrationPort                           9002
-r--   AdministrationPortEnabled                    false
-r--   AdministrationURL                            t3://thiagoleoncio-server.thiagoleoncio                                                                                                                                                         .com:14000
-r--   CurrentDirectory                             /thiagoleoncio-server/oim/user_projects/d                                                                                                                                                             omains/oim_domain/.
-r--   CurrentMachine                               Node1
-r--   DefaultExecuteQueueRuntime                   null
-r--   DefaultURL                                   t3://thiagoleoncio-server.thiagoleoncio                                                                                                                                                             .com:14000
-r--   EntityCacheCumulativeRuntime                 null
-r--   EntityCacheCurrentStateRuntime               null
-r--   EntityCacheHistoricalRuntime                 null
-r--   HealthState                                  Component:ServerRuntime,Stat                                                                                                                                                             e:HEALTH_OK,MBean:oim_leoncio1,ReasonCode:[]
-r--   JoltRuntime                                  null
-r--   ListenAddress                                thiagoleoncio-server.thiagoleoncio                                                                                                                                                         .com/144.23.146.127
-r--   ListenPort                                   14000
-r--   ListenPortEnabled                            true
-r--   MANAsyncReplicationRuntime                   null
-r--   MANReplicationRuntime                        null
-r--   MessagingBridgeRuntime                       null
-r--   MiddlewareHome                               /thiagoleoncio-server/oim
-r--   Name                                         oim_leoncio1
-r--   OpenSocketsCurrentCount                      3
-r--   OracleHome                                   /thiagoleoncio-server/oim
-r--   OverallHealthState                           Component:ServerRuntime,Stat                                                                                                                                                             e:HEALTH_OK,MBean:oim_leoncio1,ReasonCode:[]
-r--   Parent                                       null
-r--   PathServiceRuntime                           null
-r--   RestartRequired                              false
-r--   RestartsTotalCount                           0
-r--   SSLListenAddress                             null
-r--   SSLListenPort                                14001
-r--   SSLListenPortEnabled                         false
-r--   ServerClasspath                              /thiagoleoncio-server/oim/jrockit_160_24_                                                                                                                                                             D1.1.2-4/jre/lib/resources.jar:/thiagoleoncio-server/oim/jrockit_160_24_D1.1.2-4/jre/lib/rt.j                                                                                                                                                             ar:/thiagoleoncio-server/oim/jrockit_160_24_D1.1.2-4/jre/lib/sunrsasign.jar:/thiagoleoncio-server/oim/jroc                                                                                                                                                             kit_160_24_D1.1.2-4/jre/lib/jsse.jar:/thiagoleoncio-server/oim/jrockit_160_24_D1.1.2-4/jre/li                                                                                                                                                             b/jce.jar:/thiagoleoncio-server/oim/jrockit_160_24_D1.1.2-4/jre/lib/charsets.jar:/thiagoleoncio-server/oim                                                                                                                                                             /jrockit_160_24_D1.1.2-4/jre/classes:/oracle-path/thiagoleoncio/oim/oracle_common/modules/oracle.jdbc_                                                                                                                                                             11.1.1/ojdbc6dms.jar:/oracle-path/thiagoleoncio/oim/soa_home/soa/modules/user-patch.jar:/oracle-path/thiagoleoncio/oim/soa_h                                                                                                                                                             ome/soa/modules/soa-startup.jar::/oracle-path/thiagoleoncio/oim/oim_home/oam/server/policy/sts-policie                                                                                                                                                             s.jar:/oracle-path/thiagoleoncio/oim/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_pa                                                                                                                                                             tch.jar:/oracle-path/thiagoleoncio/oim/patch_ocp371/profiles/default/sys_manifest_classpath/weblogic_p                                                                                                                                                             atch.jar:/oracle-path/thiagoleoncio/oim/jrockit_160_24_D1.1.2-4/lib/tools.jar:/oracle-path/thiagoleoncio/oim/wlserver_10.3/s                                                                                                                                                             erver/lib/weblogic_sp.jar:/oracle-path/thiagoleoncio/oim/wlserver_10.3/server/lib/weblogic.jar:/u01/oi                                                                                                                                                             m/modules/features/weblogic.server.modules_10.3.6.0.jar:/oracle-path/thiagoleoncio/oim/wlserver_10.3/s                                                                                                                                                             erver/lib/webservices.jar:/oracle-path/thiagoleoncio/oim/modules/org.apache.ant_1.7.1/lib/ant-all.jar:                                                                                                                                                             /oracle-path/thiagoleoncio/oim/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/oracle-path/thiagoleoncio/oim/so                                                                                                                                                             a_home/soa/modules/oracle.soa.common.adapters_11.1.1/oracle.soa.common.adapters.                                                                                                                                                             jar:/oracle-path/thiagoleoncio/oim/soa_home/communications/modules/usermessaging-config_11.1.1.jar:/u0                                                                                                                                                             1/oim/oracle_common/soa/modules/commons-cli-1.1.jar:/oracle-path/thiagoleoncio/oim/oracle_common/soa/m                                                                                                                                                             odules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:/oracle-path/thiagoleoncio/oim/oracle_common/modules/                                                                                                                                                             oracle.xdk_11.1.0/xsu12.jar:/oracle-path/thiagoleoncio/oim/modules/features/weblogic.server.modules.xq                                                                                                                                                             uery_10.3.1.0.jar:/oracle-path/thiagoleoncio/oim/soa_home/soa/modules/db2jcc4.jar:/oracle-path/thiagoleoncio/oim/user_projec                                                                                                                                                             ts/domains/oim_domain/config/soa-infra:/oracle-path/thiagoleoncio/oim/soa_home/soa/modules/fabric-url-                                                                                                                                                             handler_11.1.1.jar:/oracle-path/thiagoleoncio/oim/soa_home/soa/modules/quartz-all-1.6.5.jar:/oracle-path/thiagoleoncio/oim/s                                                                                                                                                             oa_home/soa/modules/oracle.soa.fabric_11.1.1/oracle.soa.fabric.jar:/oracle-path/thiagoleoncio/oim/soa_                                                                                                                                                             home/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime-ext-wls.jar:/oracle-path/thiagoleoncio/oim/so                                                                                                                                                             a_home/soa/modules/oracle.soa.adapter_11.1.1/oracle.soa.adapter.jar:/oracle-path/thiagoleoncio/oim/soa                                                                                                                                                             _home/soa/modules/oracle.soa.b2b_11.1.1/oracle.soa.b2b.jar:/oracle-path/thiagoleoncio/oim/oim_home/ser                                                                                                                                                             ver/lib/oim-manifest.jar:/oracle-path/thiagoleoncio/oim/oracle_common/modules/oracle.owasp_11.1.1/ESAP                                                                                                                                                             I-2.0-rc4.jar:/oracle-path/thiagoleoncio/oim/oracle_common/modules/oracle.owasp_11.1.1/antisamy-bin.1.                                                                                                                                                             3.jar:/oracle-path/thiagoleoncio/oim/oracle_common/modules/oracle.owasp_11.1.1/commons-configuration-1                                                                                                                                                             .5.jar:/oracle-path/thiagoleoncio/oim/oracle_common/modules/oracle.owasp_11.1.1/commons-fileupload-1.2                                                                                                                                                             .jar:/oracle-path/thiagoleoncio/oim/oracle_common/modules/oracle.owasp_11.1.1/commons-lang-2.3.jar:/u0                                                                                                                                                             1/oim/oracle_common/modules/oracle.owasp_11.1.1/nekohtml-0.9.5.jar:/oracle-path/thiagoleoncio/oim/orac                                                                                                                                                             le_common/modules/oracle.owasp_11.1.1/xercesImpl-2.9.1.jar:/oracle-path/thiagoleoncio/oim/oim_home/oam                                                                                                                                                             /agent/modules/oracle.oam.wlsagent_11.1.1/oam-wlsagent.jar:/oracle-path/thiagoleoncio/oim/oracle_commo                                                                                                                                                             n/modules/oracle.jrf_11.1.1/jrf.jar:/oracle-path/thiagoleoncio/oim/wlserver_10.3/common/derby/lib/derb                                                                                                                                                             yclient.jar:/oracle-path/thiagoleoncio/oim/wlserver_10.3/server/lib/xqrl.jar
-r--   SocketsOpenedTotalCount                      3
-r--   State                                        RUNNING
-r--   StateVal                                     2
-r--   Type                                         ServerRuntime
-r--   WANReplicationRuntime                        null
-r--   WLECConnectionServiceRuntime                 null
-r--   WeblogicHome                                 /thiagoLeoncio-server/oim/wlserver_10.3
-r--   WeblogicVersion                              WebLogic Server 10.3.6.0  Tu                                                                                                                                                             e Nov 15 08:52:36 PST 2011 1441050
-r--   WseeClusterFrontEndRuntime                   null

-r-x   addRequestClassRuntime                       Boolean : WebLogicMBean(webl                                                                                                                                                             ogic.management.runtime.RequestClassRuntimeMBean)
-r-x   forceShutdown                                Void :
-r-x   forceSuspend                                 Void :
-r-x   getIPv4URL                                   String : String(protocol)
-r-x   getIPv6URL                                   String : String(protocol)
-r-x   getServerChannel                             java.net.InetSocketAddress :                                                                                                                                                              String(protocol)
-r-x   getURL                                       String : String(protocol)
-r-x   preDeregister                                Void :
-r-x   restartSSLChannels                           Void :
-r-x   resume                                       Void :
-r-x   shutdown                                     Void :
-r-x   shutdown                                     Void : Integer(timeout),Bool                                                                                                                                                             ean(ignoreSessions)
-r-x   start                                        Void :
-r-x   suspend                                      Void :
-r-x   suspend                                      Void : Integer(timeout),Bool                                                                                                                                                             ean(ignoreSessions)


cd('JMSRuntime')

--> cd('JMSServers')
wls:/oim_domain/serverConfig> cd('JMSServers')
wls:/oim_domain/serverConfig/JMSServers> ls()
dr--   BPMJMSServer
dr--   OIMJMSServer
dr--   SOAJMSServer
dr--   UMSJMSServer


--> cd('UMSJMSServer')
wls:/oim_domain/serverConfig/JMSServers> cd('UMSJMSServer')
wls:/oim_domain/serverConfig/JMSServers/UMSJMSServer> ls()
dr--   Destinations
dr--   JMSMessageLogFile
dr--   JMSSessionPools
dr--   PersistentStore
dr--   SessionPools
dr--   Targets

-r--   AllowsPersistentDowngrade                    false
-r--   BlockingSendPolicy                           FIFO
-r--   BytesMaximum                                 -1
-r--   BytesPagingEnabled                           false
-r--   BytesThresholdHigh                           -1
-r--   BytesThresholdLow                            -1
-r--   ConsumptionPausedAtStartup                   default
-r--   DeploymentOrder                              1000
-r--   ExpirationScanInterval                       30
-r--   HostingTemporaryDestinations                 true
-r--   InsertionPausedAtStartup                     default
-r--   MaximumMessageSize                           2147483647
-r--   MessageBufferSize                            -1
-r--   MessagesMaximum                              -1
-r--   MessagesPagingEnabled                        false
-r--   MessagesThresholdHigh                        -1
-r--   MessagesThresholdLow                         -1
-r--   Name                                         UMSJMSServer
-r--   Notes                                        null
-r--   PagingBlockSize                              -1
-r--   PagingDirectory                              null
-r--   PagingFileLockingEnabled                     true
-r--   PagingIoBufferSize                           -1
-r--   PagingMaxFileSize                            1342177280
-r--   PagingMaxWindowBufferSize                    -1
-r--   PagingMinWindowBufferSize                    -1
-r--   ProductionPausedAtStartup                    default
-r--   StoreEnabled                                 true
-r--   TemporaryTemplateName                        null
-r--   TemporaryTemplateResource                    null
-r--   Type                                         JMSServer

-r-x   freezeCurrentValue                           Void : String(attributeName)
-r-x   isSet                                        Boolean : String(propertyName)
-r-x   unSet                                        Void : String(propertyName)

#Going to destinations folder#

- cd('Destinations')
- cd(‘FRModule!FRQ’)
STEP 4) #Deleting an specific message that you would like to#
wls:/oim_domain/serverConfig/JMSServers/UMSJMSServer>cmo.deleteMessages(“JMSMessageID IN(‘ID:<752398.1277114865349.0>’)”)


JMS TIP with OIM11G: If you are looking from Identity Manager perspective and you would like to 'unlock' your recon process. For example: When we are stuck in between some recon job. We used to clean up jms messages by deleting .DAT file and this file is located into: 

eg: 
$DOMAIN_HOME/user_projects/domains/oim_domain/OIMJMSFileStore/OIMJMSFILESTORE_AUTO_1000000.DAT




I hope this helps you,
Thiago Leoncio.