Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Examples/JMX/MBeans WebLogic"

m (JMX MBeans via SE Client)
m (Setting Breakpoints)
Line 6: Line 6:
 
===Prerequisites===
 
===Prerequisites===
 
====Setting Breakpoints====
 
====Setting Breakpoints====
The eclipselink.jar deployed in the weblogic domain/lib will need a source attachment.  The fastest way is to set a breakpoint on org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.undeploy(), point to the src jar or your workspace projects and redeploy.  Any breakpoints in the predeploy or prior to the first login will now be hit.
+
The eclipselink.jar deployed in $WEBLOGIC_HOME/modules/org.eclipse.persistence_1.0.0.0_1-0.jar will need a source attachment.  The fastest way is to set a breakpoint on org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.undeploy(), point to the src jar or your workspace projects and redeploy.  Any breakpoints in the predeploy or prior to the first login will now be hit.
  
 
====Enabling remote access on the WebLogic JVM====
 
====Enabling remote access on the WebLogic JVM====

Revision as of 11:33, 25 September 2008

EclipseLink JMX MBean support in WebLogic

The API discussed here has been checked in as part of enhancement [235168]

JPA EAR WebLogic 10.3 J2EE application and J2SE table populator Eclipse project zip files

Prerequisites

Setting Breakpoints

The eclipselink.jar deployed in $WEBLOGIC_HOME/modules/org.eclipse.persistence_1.0.0.0_1-0.jar will need a source attachment. The fastest way is to set a breakpoint on org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.undeploy(), point to the src jar or your workspace projects and redeploy. Any breakpoints in the predeploy or prior to the first login will now be hit.

Enabling remote access on the WebLogic JVM

Add the following JVM option to your WebLogic startup script

C:\opt\wls103\user_projects\domains\base_domain\bin\startWebLogic.cmd
set JAVA_OPTIONS=%JAVA_OPTIONS% -Dcom.sun.management.jmxremote

System properties to enable EclipseLink MBeans

MBean registration is enabled by adding one or both of the two mbean system properties If [eclipselink.register.dev.mbean] or [eclipselink.register.run.mbean] properties are missing then MBean registration will not proceed for that bean.

rem set JAVA_OPTIONS=%JAVA_OPTIONS% -Declipselink.register.dev.mbean=true
rem set JAVA_OPTIONS=%JAVA_OPTIONS% -Declipselink.register.run.mbean=true

Configuring WebLogic Server Domain Security

  • If you are running your MBeans unsecured or in a development environment - you will need to disable security to see them outside of WebLogic
  • Select the [Anonymous Admin Lookup Enabled checkbox] on the admin console security tab and restart. (Or you will get the following security warning).
[EL Warning]: 2008.06.19 13:37:01.875--Thread(Thread[[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Failed to find MBean Server: javax.naming.NoPermissionException: 
User <anonymous> does not have permission on weblogic.management.home to perform lookup operation. 

Weblogic103 console jmx anon security.jpg

JMX MBeans via SE Client

See the SUN JMX Tutorial.

For Java6 only - A proxy can be used to invoke methods on the MBean via JMX.newMBeanProxy().

JMX MBeans via JConsole

The standard SUN JDK <JAVA_HOME>/bin/jconsole.exe application can be used to view the MBeans exposed by the WebLogic server JVM instance.

Start jconsole at the run|cmd prompt and select the running weblogic.Server local process.

Jconsole attach to weblogic server jvm.jpg

You should see the following EclipseLink MBeans off the root of the JNDI tree. In this example there are 2 separate EARs deployed to WebLogic - each with its own set of MBeans based on the login session.

Eclipselink jmx mbeans in jconsole.jpg

Back to the top