Tuesday, January 28, 2014

Provide user with monitor role access to view JMS messages (via console & WLST)

1. enable JMX policy editor
Login to console - security realms - myrealm -configuration - general - enable :Use Authorization Providers to Protect JMX Access - save - activate changes - restart

2. create user with monitor role
Login to console - security realm - myrealm - users&groups - users-new - create new user -save - click on that user again - groups - select monitor on the left table and move it to right - save -

3. create policy
Login to console - security realm - myrealm - roles & policies - Realm Policies - JMX Policy Editor - global scope - next - weblogic.management.runtime - JMSDestinationRuntimeMBean - next - Operations: Permission to Invoke - create policy -add conditions - Predicate List: user - next -
type your user and add - finish - save

4. now login to console as user (with monitor role) and try reading a message


 For granular approach of specific permission of get messages only:

cmo.createPolicy('type=<jmx>, operation=invoke, application=, mbeanType=weblogic.management.runtime.JMSDestinationRuntimeMBean, target=getMessages','{Rol(Monitor)}')

For a broader permissions remove the targets:

cmo.createPolicy('type=<jmx>, operation=invoke, application=, mbeanType=weblogic.management.runtime.JMSDestinationRuntimeMBean','{Rol(Monitor)}')

I was able to get the resource details by enabling audit logging


Wednesday, January 15, 2014

java.lang.OutOfMemoryError: GC overhead limit exceeded

Issue : java.lang.OutOfMemoryError: GC overhead limit exceeded in jvm logs
details : Sun JDK 1.6, parallel collector GC,
solution : apply the param in java_options -XX:+UseGCOverheadLimit     
It uses a policy that limits the proportion of the machines time that is spent in GC before an OutOfMemory error is thrown.
however this parameter will not avoid outofmemory at a later stage.