Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318892

Summary: Extend SunAS9ServerPlatform with new Glassfish_3_Platform
Product: z_Archived Reporter: Michael OBrien <michael.f.obrien>
Component: EclipselinkAssignee: Michael OBrien <michael.f.obrien>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P4 CC: eclipselink.foundation-inbox
Version: unspecifiedFlags: michael.f.obrien: documentation+
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 316512, 316513, 321721, 333336    
Attachments:
Description Flags
Glassfish V2 screencap of remote JConsole view of JMX EclipseLink MBeans (POC)
none
Glassfish V3 3.0.1 of NetBeans 6.9 screencap of remote JConsole view of JMX EclipseLink MBeans (POC) none

Description Michael OBrien CLA 2010-07-05 09:35:38 EDT
>We need to discuss whether we should add a new platform for Glassfish V3 if we do not add JMX support also to V2
If enabling the EclipseLink services MBean on Glassfish V2 has issues that cause the two platforms to diverge we will need the existing SunAS9 platform for backwards compatibility.
If JMX support works seamlessly across all 2 Glassfish servers then we should leave the platform hierarchy as it is.
Comment 1 Michael OBrien CLA 2010-07-05 10:49:23 EDT
>Q: Is MBean support in Glassfish V2 the same as in Glassfish V2
>A: Yes (with the following initial differences)
- The JMXServiceURL is different - this affects MBean clients only so is not an issue here
- The non-JNDi spec registration is ok
mBeanServer = (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);

>Glassfish V2 (different than V3) via SUN JConsole working with remote and user:admin password:adminadmin
JMXServiceURL
service:jmx:rmi:///jndi/rmi://xps435:8686/jmxrmi

>Update EclipseLink bundles (5-6) via trunk ant target
ant dev-package-bundles

>2.1 MBean registration ok
[#|2010-07-05T10:34:29.841-0400|FINEST|sun-appserver2.1|org.eclipse.persistence.default|_ThreadID=14;_ThreadName=httpSSLWorkerThread-8080-0;ClassName=null;MethodName=null;_RequestID=d024ddab-f53b-4cab-b5e9-ad6820af471a;|Registered MBean: org.eclipse.persistence.services.glassfish.MBeanGlassfishRuntimeServices[TopLink:Name=Session(file_/C_/opt/glassfish/domains/domain1/applications/j2ee-apps/org.eclipse.persistence.example.jpa.server.glassfishv2.EnterpriseEAR/org.eclipse.persistence.example.jpa.server.glassfishv2.EnterpriseWeb_war/WEB-INF/classes/_enterprise)]|#]

>MBean Attributes and Operations are viewable and runable via JConsole like
[#|2010-07-05T10:41:36.767-0400|INFO|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/opt/glassfish/domains/domain1/applications/j2ee-apps/org.eclipse.persistence.example.jpa.server.glassfishv2.EnterpriseEAR/org.eclipse.persistence.example.jpa.server.glassfishv2.EnterpriseWeb_war/WEB-INF/classes/_enterprise.server|_ThreadID=16;_ThreadName=RMI TCP Connection(18)-192.168.0.194;|Statement cache cleared.|#]
or
[#|2010-07-05T10:42:11.914-0400|FINEST|sun-appserver2.1|org.eclipse.persistence.session.file:/C:/opt/glassfish/domains/domain1/applications/j2ee-apps/org.eclipse.persistence.example.jpa.server.glassfishv2.EnterpriseEAR/org.eclipse.persistence.example.jpa.server.glassfishv2.EnterpriseWeb_war/WEB-INF/classes/_enterprise.cache|_ThreadID=16;_ThreadName=RMI TCP Connection(18)-192.168.0.194;ClassName=null;MethodName=null;_RequestID=d5bbe2fd-36ba-4797-99b7-b789ad7896ea;|Current object locks:
End of locked objects.

>Summary: We can keep the SunAS9ServerPlatform as-is without subclassing for V3
Comment 2 Michael OBrien CLA 2010-07-05 10:52:11 EDT
Created attachment 173433 [details]
Glassfish V2 screencap of remote JConsole view of JMX EclipseLink MBeans (POC)
Comment 3 Michael OBrien CLA 2010-07-05 17:23:34 EDT
>Glassfish 3.0.1 support is the same as Glassfish 2.1 in the context of MBean registration


>Glassfish v3.0.1 install
https://glassfish.dev.java.net/downloads/3.0.1-final.html
or (in mixed english/spanish)
http://netbeans.org/downloads/start.html?platform=windows&lang=en&option=all

>netbeans 6.9
http://localhost:8080/GlassfishV3EAR-war/FrontController?action=demo
>original
INFO: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
>on top of modules in the GF install dir, need to also replace the single jar in the NB install dir
C:\opt\nb69\java\modules\ext\eclipselink\eclipselink-2.0.2.jar

>Override EclipseLink 2.0.2 with the 2.1.1 trunk - replace or do not rename jar
C:\opt\nb69\java\modules\org-netbeans-modules-j2ee-eclipselink\org\netbeans\modules\j2ee\eclipselink\eclipselink_lib.xml
<resource>jar:nbinst:///modules/ext/eclipselink/eclipselink-2.0.2.jar!/</resource>

>after hacking netbeans 6.9 - turns out that osgi does not return to a working state when a deployment failed because of a CNFE - ended up using an application managed EAR deployment to override both the modules and the JPA 2.0 spec jar

>Use the default DS
<jta-data-source>jdbc/__default</jta-data-source>

>Glassfish 3.0.1 MBean registration ok
FINEST: Registered MBean: org.eclipse.persistence.services.glassfish.MBeanGlassfishRuntimeServices[TopLink:Name=Session(file_/C_/wnb69/GlassfishV3EAR/dist/gfdeploy/GlassfishV3EAR/GlassfishV3EAR-ejb_jar/_example)]

>Some MBean operations - PrintClassesInSession() and printIdentityMapLocks()
FINEST: org.eclipse.persistence.example.jpa.server.business.Cell
FINEST: Current object locks:
End of locked objects.
Comment 4 Michael OBrien CLA 2010-07-05 17:26:57 EDT
Created attachment 173483 [details]
Glassfish V3 3.0.1 of NetBeans 6.9 screencap of remote JConsole view of JMX EclipseLink MBeans (POC)

>via different JMXServiceURL that gets us access to JMX MBeans registered
service:jmx:rmi://xps435:8686/jndi/rmi://xps435:8686/jmxrmi
Comment 5 Michael OBrien CLA 2010-07-05 17:28:12 EDT
>SunAS9 will continue to be the platform for both Glassfish V2 and V3
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:10:39 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink