public class org.hibernate.jmx.internal.JmxServiceImpl implements org.hibernate.jmx.spi.JmxService, org.hibernate.service.spi.Stoppable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.hibernate.jmx.internal.JmxServiceImpl
super_class: java.lang.Object
{
private static final org.hibernate.internal.CoreMessageLogger LOG;
descriptor: Lorg/hibernate/internal/CoreMessageLogger;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
public static final java.lang.String OBJ_NAME_TEMPLATE;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: "%s:sessionFactory=%s,serviceRole=%s,serviceType=%s"
private final boolean usePlatformServer;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String agentId;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String defaultDomain;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String sessionFactoryName;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private boolean startedServer;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private java.util.ArrayList<javax.management.ObjectName> registeredMBeans;
descriptor: Ljava/util/ArrayList;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/ArrayList<Ljavax/management/ObjectName;>;
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc Lorg/hibernate/jmx/internal/JmxServiceImpl;
invokestatic org.hibernate.internal.CoreLogging.messageLogger:(Ljava/lang/Class;)Lorg/hibernate/internal/CoreMessageLogger;
putstatic org.hibernate.jmx.internal.JmxServiceImpl.LOG:Lorg/hibernate/internal/CoreMessageLogger;
1: return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(java.util.Map);
descriptor: (Ljava/util/Map;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
ldc "hibernate.jmx.usePlatformServer"
aload 1
invokestatic org.hibernate.internal.util.config.ConfigurationHelper.getBoolean:(Ljava/lang/String;Ljava/util/Map;)Z
putfield org.hibernate.jmx.internal.JmxServiceImpl.usePlatformServer:Z
2: aload 0
aload 1
ldc "hibernate.jmx.agentId"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
putfield org.hibernate.jmx.internal.JmxServiceImpl.agentId:Ljava/lang/String;
3: aload 0
aload 1
ldc "hibernate.jmx.defaultDomain"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
putfield org.hibernate.jmx.internal.JmxServiceImpl.defaultDomain:Ljava/lang/String;
4: aload 0
5: ldc "hibernate.jmx.sessionFactoryName"
6: aload 1
7: ldc "hibernate.session_factory_name"
aload 1
invokestatic org.hibernate.internal.util.config.ConfigurationHelper.getString:(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/String;
8: invokestatic org.hibernate.internal.util.config.ConfigurationHelper.getString:(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;)Ljava/lang/String;
putfield org.hibernate.jmx.internal.JmxServiceImpl.sessionFactoryName:Ljava/lang/String;
9: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/hibernate/jmx/internal/JmxServiceImpl;
0 10 1 configValues Ljava/util/Map;
MethodParameters:
Name Flags
configValues
public void stop();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=1
start local 0 0: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.startedServer:Z
ifne 1
aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
ifnull 31
1: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.hibernate.jmx.internal.JmxServiceImpl.findServer:()Ljavax/management/MBeanServer;
astore 1
start local 1 2: aload 1
ifnonnull 9
3: getstatic org.hibernate.jmx.internal.JmxServiceImpl.LOG:Lorg/hibernate/internal/CoreMessageLogger;
invokeinterface org.hibernate.internal.CoreMessageLogger.unableToLocateMBeanServer:()V
4: aload 0
iconst_0
putfield org.hibernate.jmx.internal.JmxServiceImpl.startedServer:Z
5: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
ifnull 8
6: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.clear:()V
7: aload 0
aconst_null
putfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
8: StackMap locals: javax.management.MBeanServer
StackMap stack:
return
9: StackMap locals:
StackMap stack:
aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
ifnull 18
10: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.iterator:()Ljava/util/Iterator;
astore 3
goto 17
StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl javax.management.MBeanServer top java.util.Iterator
StackMap stack:
11: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast javax.management.ObjectName
astore 2
start local 2 12: getstatic org.hibernate.jmx.internal.JmxServiceImpl.LOG:Lorg/hibernate/internal/CoreMessageLogger;
ldc "Unregistering registered MBean [ON={0}]"
aload 2
invokeinterface org.hibernate.internal.CoreMessageLogger.tracev:(Ljava/lang/String;Ljava/lang/Object;)V
13: aload 1
aload 2
invokeinterface javax.management.MBeanServer.unregisterMBean:(Ljavax/management/ObjectName;)V
14: goto 17
15: StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl javax.management.MBeanServer javax.management.ObjectName java.util.Iterator
StackMap stack: java.lang.Exception
astore 4
start local 4 16: getstatic org.hibernate.jmx.internal.JmxServiceImpl.LOG:Lorg/hibernate/internal/CoreMessageLogger;
ldc "Unable to unregsiter registered MBean [ON=%s] : %s"
aload 2
aload 4
invokevirtual java.lang.Exception.toString:()Ljava/lang/String;
invokeinterface org.hibernate.internal.CoreMessageLogger.debugf:(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V
end local 4 end local 2 17: StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl javax.management.MBeanServer top java.util.Iterator
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 11
18: StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl javax.management.MBeanServer
StackMap stack:
aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.startedServer:Z
ifeq 31
19: getstatic org.hibernate.jmx.internal.JmxServiceImpl.LOG:Lorg/hibernate/internal/CoreMessageLogger;
ldc "Attempting to release created MBeanServer"
invokeinterface org.hibernate.internal.CoreMessageLogger.trace:(Ljava/lang/Object;)V
20: aload 1
invokestatic javax.management.MBeanServerFactory.releaseMBeanServer:(Ljavax/management/MBeanServer;)V
21: goto 31
22: StackMap locals:
StackMap stack: java.lang.Exception
astore 2
start local 2 23: getstatic org.hibernate.jmx.internal.JmxServiceImpl.LOG:Lorg/hibernate/internal/CoreMessageLogger;
aload 2
invokevirtual java.lang.Exception.toString:()Ljava/lang/String;
invokeinterface org.hibernate.internal.CoreMessageLogger.unableToReleaseCreatedMBeanServer:(Ljava/lang/String;)V
end local 2 end local 1 24: goto 31
25: StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl
StackMap stack: java.lang.Throwable
astore 5
26: aload 0
iconst_0
putfield org.hibernate.jmx.internal.JmxServiceImpl.startedServer:Z
27: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
ifnull 30
28: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.clear:()V
29: aload 0
aconst_null
putfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
30: StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl top top top top java.lang.Throwable
StackMap stack:
aload 5
athrow
31: StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl
StackMap stack:
aload 0
iconst_0
putfield org.hibernate.jmx.internal.JmxServiceImpl.startedServer:Z
32: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
ifnull 35
33: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
invokevirtual java.util.ArrayList.clear:()V
34: aload 0
aconst_null
putfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
35: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 36 0 this Lorg/hibernate/jmx/internal/JmxServiceImpl;
2 24 1 mBeanServer Ljavax/management/MBeanServer;
12 17 2 objectName Ljavax/management/ObjectName;
16 17 4 e Ljava/lang/Exception;
23 24 2 e Ljava/lang/Exception;
Exception table:
from to target type
12 14 15 Class java.lang.Exception
20 21 22 Class java.lang.Exception
0 4 25 any
9 25 25 any
public void registerService(org.hibernate.service.spi.Manageable, java.lang.Class<? extends org.hibernate.service.Service>);
descriptor: (Lorg/hibernate/service/spi/Manageable;Ljava/lang/Class;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=6, args_size=3
start local 0 start local 1 start local 2 0: ldc Lorg/hibernate/service/spi/OptionallyManageable;
aload 1
invokevirtual java.lang.Class.isInstance:(Ljava/lang/Object;)Z
ifeq 6
1: aload 1
checkcast org.hibernate.service.spi.OptionallyManageable
invokeinterface org.hibernate.service.spi.OptionallyManageable.getRealManageables:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 4
goto 4
StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl org.hibernate.service.spi.Manageable java.lang.Class top java.util.Iterator
StackMap stack:
2: aload 4
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.hibernate.service.spi.Manageable
astore 3
start local 3 3: aload 0
aload 3
aload 2
invokevirtual org.hibernate.jmx.internal.JmxServiceImpl.registerService:(Lorg/hibernate/service/spi/Manageable;Ljava/lang/Class;)V
end local 3 4: StackMap locals:
StackMap stack:
aload 4
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
5: return
6: StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl org.hibernate.service.spi.Manageable java.lang.Class
StackMap stack:
aload 1
invokeinterface org.hibernate.service.spi.Manageable.getManagementDomain:()Ljava/lang/String;
ifnonnull 8
7: ldc "org.hibernate.core"
goto 9
8: StackMap locals:
StackMap stack:
aload 1
invokeinterface org.hibernate.service.spi.Manageable.getManagementDomain:()Ljava/lang/String;
9: StackMap locals:
StackMap stack: java.lang.String
astore 3
start local 3 10: aload 1
invokeinterface org.hibernate.service.spi.Manageable.getManagementServiceType:()Ljava/lang/String;
ifnonnull 12
11: aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
goto 13
12: StackMap locals: java.lang.String
StackMap stack:
aload 1
invokeinterface org.hibernate.service.spi.Manageable.getManagementServiceType:()Ljava/lang/String;
13: StackMap locals:
StackMap stack: java.lang.String
astore 4
start local 4 14: new javax.management.ObjectName
dup
15: ldc "%s:sessionFactory=%s,serviceRole=%s,serviceType=%s"
iconst_4
anewarray java.lang.Object
dup
iconst_0
16: aload 3
aastore
dup
iconst_1
17: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.sessionFactoryName:Ljava/lang/String;
aastore
dup
iconst_2
18: aload 2
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
aastore
dup
iconst_3
19: aload 4
aastore
20: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
21: invokespecial javax.management.ObjectName.<init>:(Ljava/lang/String;)V
astore 5
start local 5 22: aload 0
aload 5
aload 1
invokeinterface org.hibernate.service.spi.Manageable.getManagementBean:()Ljava/lang/Object;
invokevirtual org.hibernate.jmx.internal.JmxServiceImpl.registerMBean:(Ljavax/management/ObjectName;Ljava/lang/Object;)V
end local 5 23: goto 26
24: StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl org.hibernate.service.spi.Manageable java.lang.Class java.lang.String java.lang.String
StackMap stack: javax.management.MalformedObjectNameException
astore 5
start local 5 25: new org.hibernate.HibernateException
dup
ldc "Unable to generate service IbjectName"
aload 5
invokespecial org.hibernate.HibernateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 5 26: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 27 0 this Lorg/hibernate/jmx/internal/JmxServiceImpl;
0 27 1 service Lorg/hibernate/service/spi/Manageable;
0 27 2 serviceRole Ljava/lang/Class<+Lorg/hibernate/service/Service;>;
3 4 3 realManageable Lorg/hibernate/service/spi/Manageable;
10 27 3 domain Ljava/lang/String;
14 27 4 serviceType Ljava/lang/String;
22 23 5 objectName Ljavax/management/ObjectName;
25 26 5 e Ljavax/management/MalformedObjectNameException;
Exception table:
from to target type
14 23 24 Class javax.management.MalformedObjectNameException
Signature: (Lorg/hibernate/service/spi/Manageable;Ljava/lang/Class<+Lorg/hibernate/service/Service;>;)V
MethodParameters:
Name Flags
service
serviceRole
public void registerMBean(javax.management.ObjectName, java.lang.Object);
descriptor: (Ljavax/management/ObjectName;Ljava/lang/Object;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.hibernate.jmx.internal.JmxServiceImpl.findServer:()Ljavax/management/MBeanServer;
astore 3
start local 3 1: aload 3
ifnonnull 6
2: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.startedServer:Z
ifeq 4
3: new org.hibernate.HibernateException
dup
ldc "Could not locate previously started MBeanServer"
invokespecial org.hibernate.HibernateException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals: javax.management.MBeanServer
StackMap stack:
aload 0
invokevirtual org.hibernate.jmx.internal.JmxServiceImpl.startMBeanServer:()Ljavax/management/MBeanServer;
astore 3
5: aload 0
iconst_1
putfield org.hibernate.jmx.internal.JmxServiceImpl.startedServer:Z
6: StackMap locals:
StackMap stack:
aload 3
aload 2
aload 1
invokeinterface javax.management.MBeanServer.registerMBean:(Ljava/lang/Object;Ljavax/management/ObjectName;)Ljavax/management/ObjectInstance;
pop
7: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
ifnonnull 9
8: aload 0
new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
putfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
9: StackMap locals:
StackMap stack:
aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.registeredMBeans:Ljava/util/ArrayList;
aload 1
invokevirtual java.util.ArrayList.add:(Ljava/lang/Object;)Z
pop
10: goto 13
11: StackMap locals:
StackMap stack: java.lang.Exception
astore 4
start local 4 12: new org.hibernate.HibernateException
dup
new java.lang.StringBuilder
dup
ldc "Unable to register MBean [ON="
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "]"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
aload 4
invokespecial org.hibernate.HibernateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 13: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/hibernate/jmx/internal/JmxServiceImpl;
0 14 1 objectName Ljavax/management/ObjectName;
0 14 2 mBean Ljava/lang/Object;
1 14 3 mBeanServer Ljavax/management/MBeanServer;
12 13 4 e Ljava/lang/Exception;
Exception table:
from to target type
6 10 11 Class java.lang.Exception
MethodParameters:
Name Flags
objectName
mBean
private javax.management.MBeanServer findServer();
descriptor: ()Ljavax/management/MBeanServer;
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=4, args_size=1
start local 0 0: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.usePlatformServer:Z
ifeq 2
1: invokestatic java.lang.management.ManagementFactory.getPlatformMBeanServer:()Ljavax/management/MBeanServer;
areturn
2: StackMap locals:
StackMap stack:
aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.agentId:Ljava/lang/String;
invokestatic javax.management.MBeanServerFactory.findMBeanServer:(Ljava/lang/String;)Ljava/util/ArrayList;
astore 1
start local 1 3: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.defaultDomain:Ljava/lang/String;
ifnonnull 5
4: aload 1
iconst_0
invokevirtual java.util.ArrayList.get:(I)Ljava/lang/Object;
checkcast javax.management.MBeanServer
areturn
5: StackMap locals: java.util.ArrayList
StackMap stack:
aload 1
invokevirtual java.util.ArrayList.iterator:()Ljava/util/Iterator;
astore 3
goto 9
StackMap locals: org.hibernate.jmx.internal.JmxServiceImpl java.util.ArrayList top java.util.Iterator
StackMap stack:
6: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast javax.management.MBeanServer
astore 2
start local 2 7: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.defaultDomain:Ljava/lang/String;
aload 2
invokeinterface javax.management.MBeanServer.getDefaultDomain:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 9
8: aload 2
areturn
end local 2 9: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 6
10: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/hibernate/jmx/internal/JmxServiceImpl;
3 11 1 mbeanServers Ljava/util/ArrayList<Ljavax/management/MBeanServer;>;
7 9 2 mbeanServer Ljavax/management/MBeanServer;
private javax.management.MBeanServer startMBeanServer();
descriptor: ()Ljavax/management/MBeanServer;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
getfield org.hibernate.jmx.internal.JmxServiceImpl.defaultDomain:Ljava/lang/String;
invokestatic javax.management.MBeanServerFactory.createMBeanServer:(Ljava/lang/String;)Ljavax/management/MBeanServer;
1: areturn
2: StackMap locals:
StackMap stack: java.lang.Exception
astore 1
start local 1 3: new org.hibernate.HibernateException
dup
ldc "Unable to start MBeanServer"
aload 1
invokespecial org.hibernate.HibernateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/hibernate/jmx/internal/JmxServiceImpl;
3 4 1 e Ljava/lang/Exception;
Exception table:
from to target type
0 1 2 Class java.lang.Exception
}
SourceFile: "JmxServiceImpl.java"