Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 75786 Details for
Bug 148461
Dynamic discovery feature needs testing with the TPTP ARM tech preview
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch 1
BTMpatch.txt (text/plain), 84.65 KB, created by
Ashish Patel
on 2007-08-09 14:22:29 EDT
(
hide
)
Description:
patch 1
Filename:
MIME Type:
Creator:
Ashish Patel
Created:
2007-08-09 14:22:29 EDT
Size:
84.65 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.trace.arm >Index: .classpath >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/.classpath,v >retrieving revision 1.5 >diff -u -r1.5 .classpath >--- .classpath 16 Aug 2006 14:54:31 -0000 1.5 >+++ .classpath 9 Aug 2007 18:22:17 -0000 >@@ -10,5 +10,6 @@ > <classpathentry kind="src" path="src-logging"/> > <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> > <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> >+ <classpathentry kind="lib" path="C:/Program Files/IBM/WebSphere/AppServer/lib/j2ee.jar"/> > <classpathentry kind="output" path="bin"/> > </classpath> >Index: build.properties >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/build.properties,v >retrieving revision 1.20 >diff -u -r1.20 build.properties >--- build.properties 14 Jun 2007 00:26:17 -0000 1.20 >+++ build.properties 9 Aug 2007 18:22:17 -0000 >@@ -3,9 +3,9 @@ > src-arm-core/ > output.armLibrary.jar = bin/ > bin.includes = about.html,\ >- about.ini,\ >- about.mappings,\ >- about.properties,\ >+ about.ini,\ >+ about.mappings,\ >+ about.properties,\ > META-INF/,\ > armLibrary.jar,\ > plugin.properties,\ >@@ -16,8 +16,11 @@ > cbeLogging.jar,\ > plugin.xml,\ > armProbes.jar,\ >- eclipse32.png >-jars.extra.classpath = ../../external-jars/j2ee-arm.jar >+ eclipse32.png,\ >+ src-probes/EJB.probescript,\ >+ src-probes/GenericArm.probescript,\ >+ src-probes/JDBC.probescript,\ >+ src-probes/Servlet.probescript > source.config.jar = src-config/ > output.config.jar = bin/ > jars.compile.order = config.jar,\ >Index: src-probes/GenericArm.probe >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-probes/GenericArm.probe,v >retrieving revision 1.7 >diff -u -r1.7 GenericArm.probe >--- src-probes/GenericArm.probe 26 Apr 2007 14:58:34 -0000 1.7 >+++ src-probes/GenericArm.probe 9 Aug 2007 18:22:17 -0000 >@@ -3,10 +3,8 @@ > <probe> > <target className="*" method="doPost" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="exclude"/> > <target className="*" method="doGet" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="exclude"/> >- <import text="java.util.Properties"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.impl.GenericDataImpl"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentManager"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider"/> >+ <import text="org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader"/> >+ <import text="org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler"/> > <fragmentAtClassScope>/********************************************************************** > * Copyright (c) 2006, 2007 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials >@@ -19,43 +17,24 @@ > * IBM - Initial API and implementation > **********************************************************************/ > static { >- Properties p = System.getProperties(); >- String appName = p.getProperty(InstrumentManager.APPLICATION_KEY); >- InstrumentManager.getInstance().initTransaction(appName); >+ BootClassLoader.init(); > }</fragmentAtClassScope> > <fragment type="entry"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> > <data name="_thisObject" type="thisObject"/> > <data name="_methodArgs" type="args"/> >- <code>try { >- InstrumentDataProvider data = new GenericDataImpl(); >- data.setClassName(_className); >- data.setMethodArguments(_methodArgs); >- data.setMethodName(_methodName); >- data.setObject(_thisObject); >- InstrumentManager.getInstance().transactionStart(data); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-}</code> >+ <code>ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe", _className, _methodName, _thisObject, _methodArgs);</code> > </fragment> > <fragment type="exit"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> >- <code>try {
 >- InstrumentManager.getInstance().transactionStop();
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe", _className, _methodName);</code> > </fragment> > <fragment type="catch"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> >- <code>try {
 >- InstrumentManager.getInstance().transactionStopError();
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe", _className, _methodName);</code> > </fragment> > </probe> > </probekit> >\ No newline at end of file >Index: src-probes/EJB.probe >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-probes/EJB.probe,v >retrieving revision 1.5 >diff -u -r1.5 EJB.probe >--- src-probes/EJB.probe 26 Apr 2007 14:58:34 -0000 1.5 >+++ src-probes/EJB.probe 9 Aug 2007 18:22:17 -0000 >@@ -13,10 +13,8 @@ > <target className="*" method="getEJBLocalHome" package="*" signature="*" type="exclude"/> > <target className="*" method="ejbRemove" package="*" signature="*" type="exclude"/> > <target className="*" method="createPrimaryKey" package="*" signature="*" type="exclude"/> >- <import text="java.util.Properties"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.impl.EJBDataImpl"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentManager"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider"/> >+ <import text="org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader"/> >+ <import text="org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler"/> > <fragmentAtClassScope>/**********************************************************************
 > * Copyright (c) 2006, 2007 IBM Corporation and others.
 > * All rights reserved. This program and the accompanying materials
 >@@ -29,42 +27,24 @@ > * IBM - Initial API and implementation
 > **********************************************************************/
 > static {
 >- Properties p = System.getProperties();
 >- String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
 >- InstrumentManager.getInstance().initTransaction(appName);
 >+ BootClassLoader.init();
 > }</fragmentAtClassScope> > <fragment type="entry"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> > <data name="_thisObject" type="thisObject"/> > <data name="_methodArgs" type="args"/> >- <code>try {
 >-InstrumentDataProvider data = new EJBDataImpl();
 >- data.setClassName(_className);
 >- data.setMethodArguments(_methodArgs);
 >- data.setObject(_thisObject);
 >- InstrumentManager.getInstance().transactionStart(data);
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe", _className, _methodName, _thisObject, _methodArgs);</code> > </fragment> > <fragment type="exit"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> >- <code>try {
 >- InstrumentManager.getInstance().transactionStop();
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe", _className, _methodName);</code> > </fragment> > <fragment type="catch"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> >- <code>try {
 >- InstrumentManager.getInstance().transactionStopError();
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe", _className, _methodName);</code> > </fragment> > </probe> > </probekit> >\ No newline at end of file >Index: src-probes/JDBC_probe.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-probes/JDBC_probe.java,v >retrieving revision 1.3 >diff -u -r1.3 JDBC_probe.java >--- src-probes/JDBC_probe.java 26 Apr 2007 14:58:53 -0000 1.3 >+++ src-probes/JDBC_probe.java 9 Aug 2007 18:22:17 -0000 >@@ -2,10 +2,8 @@ > /* probekit \org.eclipse.tptp.trace.arm\src-probes\JDBC.probe > */ > // "imports" specifications for probes (if any): >-import java.util.Properties; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.impl.JDBCDataImpl; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; // from unnamed_probe >+import org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader; // from unnamed_probe >+import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler; // from unnamed_probe > class JDBC_probe { > // Class for probe unnamed_probe > public static class Probe_0 { >@@ -16,15 +14,13 @@ > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html >- * $Id: JDBC_probe.java,v 1.3 2007/04/26 14:58:53 mmings Exp $ >+ * $Id: JDBC.probe,v 1.3 2007/04/26 14:58:34 mmings Exp $ > * > * Contributors: > * IBM - Initial API and implementation > **********************************************************************/ > static { >- Properties p = System.getProperties(); >- String appName = p.getProperty(InstrumentManager.APPLICATION_KEY); >- InstrumentManager.getInstance().initTransaction(appName); >+ BootClassLoader.init(); > } > public static void _entry ( > String /*className*/ _className, >@@ -33,16 +29,7 @@ > Object[] /*args*/ _methodArgs ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentDataProvider data = new JDBCDataImpl(); >- data.setClassName(_className); >- data.setMethodArguments(_methodArgs); >- data.setMethodName(_methodName); >- data.setObject(_thisObject); >- InstrumentManager.getInstance().transactionStart(data); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe", _className, _methodName, _thisObject, _methodArgs); > //------------------- end user-written fragment code ----------------- > } > public static void _exit ( >@@ -50,11 +37,7 @@ > String /*methodName*/ _methodName ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentManager.getInstance().transactionStop(); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe", _className, _methodName); > //------------------- end user-written fragment code ----------------- > } > public static void _catch ( >@@ -62,11 +45,7 @@ > String /*methodName*/ _methodName ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentManager.getInstance().transactionStopError(); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe", _className, _methodName); > //------------------- end user-written fragment code ----------------- > } > } >Index: src-probes/Servlet.probe >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-probes/Servlet.probe,v >retrieving revision 1.6 >diff -u -r1.6 Servlet.probe >--- src-probes/Servlet.probe 26 Apr 2007 14:58:34 -0000 1.6 >+++ src-probes/Servlet.probe 9 Aug 2007 18:22:17 -0000 >@@ -4,11 +4,8 @@ > <target className="*" method="doPost" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="include"/> > <target className="*" method="doGet" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="include"/> > <target className="*" method="*" package="*" signature="*" type="exclude"/> >- <import text="java.util.Properties"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.impl.ServletDataImpl"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentManager"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.TransactionUtil"/> >+ <import text="org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader"/> >+ <import text="org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler"/> > <fragmentAtClassScope>/**********************************************************************
 > * Copyright (c) 2006, 2007 IBM Corporation and others.
 > * All rights reserved. This program and the accompanying materials
 >@@ -21,44 +18,24 @@ > * IBM - Initial API and implementation
 > **********************************************************************/
 > static {
 >- Properties p = System.getProperties();
 >- String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
 >- InstrumentManager.getInstance().initTransaction(appName);
 >+ BootClassLoader.init();
 > }</fragmentAtClassScope> > <fragment type="entry"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> > <data name="_thisObject" type="thisObject"/> > <data name="_methodArgs" type="args"/> >- <code>try {
 >-InstrumentDataProvider data = new ServletDataImpl();
 >- data.setClassName(_className);
 >- data.setMethodArguments(_methodArgs);
 >- data.setMethodName(_methodName);
 >- data.setObject(_thisObject);
 >- data.setCorrelator(TransactionUtil.parentCorrelatorFromRequest(data));
 >- InstrumentManager.getInstance().transactionStart(data);
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe", _className, _methodName, _thisObject, _methodArgs);</code> > </fragment> > <fragment type="exit"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> >- <code>try {
 >- InstrumentManager.getInstance().transactionStop();
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe", _className, _methodName);</code> > </fragment> > <fragment type="catch"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> >- <code>try {
 >- InstrumentManager.getInstance().transactionStopError();
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe", _className, _methodName);</code> > </fragment> > </probe> > </probekit> >\ No newline at end of file >Index: src-probes/EJB_probe.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-probes/EJB_probe.java,v >retrieving revision 1.4 >diff -u -r1.4 EJB_probe.java >--- src-probes/EJB_probe.java 26 Apr 2007 14:58:53 -0000 1.4 >+++ src-probes/EJB_probe.java 9 Aug 2007 18:22:17 -0000 >@@ -4,10 +4,8 @@ > Version: 4.3 > */ > // "imports" specifications for probes (if any): >-import java.util.Properties; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.impl.EJBDataImpl; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; // from unnamed_probe >+import org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader; // from unnamed_probe >+import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler; // from unnamed_probe > class EJB_probe { > // Class for probe unnamed_probe > public static class Probe_0 { >@@ -18,15 +16,13 @@ > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html >- * $Id: EJB_probe.java,v 1.4 2007/04/26 14:58:53 mmings Exp $ >+ * $Id: EJB.probe,v 1.5 2007/04/26 14:58:34 mmings Exp $ > * > * Contributors: > * IBM - Initial API and implementation > **********************************************************************/ > static { >- Properties p = System.getProperties(); >- String appName = p.getProperty(InstrumentManager.APPLICATION_KEY); >- InstrumentManager.getInstance().initTransaction(appName); >+ BootClassLoader.init(); > } > public static void _entry ( > String /*className*/ _className, >@@ -35,15 +31,7 @@ > Object[] /*args*/ _methodArgs ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V > //------------------ begin user-written fragment code ---------------- >-try { >-InstrumentDataProvider data = new EJBDataImpl(); >- data.setClassName(_className); >- data.setMethodArguments(_methodArgs); >- data.setObject(_thisObject); >- InstrumentManager.getInstance().transactionStart(data); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe", _className, _methodName, _thisObject, _methodArgs); > //------------------- end user-written fragment code ----------------- > } > public static void _exit ( >@@ -51,11 +39,7 @@ > String /*methodName*/ _methodName ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentManager.getInstance().transactionStop(); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe", _className, _methodName); > //------------------- end user-written fragment code ----------------- > } > public static void _catch ( >@@ -63,11 +47,7 @@ > String /*methodName*/ _methodName ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentManager.getInstance().transactionStopError(); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe", _className, _methodName); > //------------------- end user-written fragment code ----------------- > } > } >Index: src-probes/GenericArm_probe.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-probes/GenericArm_probe.java,v >retrieving revision 1.6 >diff -u -r1.6 GenericArm_probe.java >--- src-probes/GenericArm_probe.java 26 Apr 2007 14:58:54 -0000 1.6 >+++ src-probes/GenericArm_probe.java 9 Aug 2007 18:22:17 -0000 >@@ -4,10 +4,8 @@ > Version: 4.3 > */ > // "imports" specifications for probes (if any): >-import java.util.Properties; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.impl.GenericDataImpl; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; // from unnamed_probe >+import org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader; // from unnamed_probe >+import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler; // from unnamed_probe > class GenericArm_probe { > // Class for probe unnamed_probe > public static class Probe_0 { >@@ -18,15 +16,13 @@ > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html >- * $Id: GenericArm_probe.java,v 1.6 2007/04/26 14:58:54 mmings Exp $ >+ * $Id: GenericArm.probe,v 1.7 2007/04/26 14:58:34 mmings Exp $ > * > * Contributors: > * IBM - Initial API and implementation > **********************************************************************/ > static { >- Properties p = System.getProperties(); >- String appName = p.getProperty(InstrumentManager.APPLICATION_KEY); >- InstrumentManager.getInstance().initTransaction(appName); >+ BootClassLoader.init(); > } > public static void _entry ( > String /*className*/ _className, >@@ -35,16 +31,7 @@ > Object[] /*args*/ _methodArgs ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentDataProvider data = new GenericDataImpl(); >- data.setClassName(_className); >- data.setMethodArguments(_methodArgs); >- data.setMethodName(_methodName); >- data.setObject(_thisObject); >- InstrumentManager.getInstance().transactionStart(data); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe", _className, _methodName, _thisObject, _methodArgs); > //------------------- end user-written fragment code ----------------- > } > public static void _exit ( >@@ -52,11 +39,7 @@ > String /*methodName*/ _methodName ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentManager.getInstance().transactionStop(); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe", _className, _methodName); > //------------------- end user-written fragment code ----------------- > } > public static void _catch ( >@@ -64,11 +47,7 @@ > String /*methodName*/ _methodName ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentManager.getInstance().transactionStopError(); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe", _className, _methodName); > //------------------- end user-written fragment code ----------------- > } > } >Index: src-probes/JDBC.probe >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-probes/JDBC.probe,v >retrieving revision 1.3 >diff -u -r1.3 JDBC.probe >--- src-probes/JDBC.probe 26 Apr 2007 14:58:34 -0000 1.3 >+++ src-probes/JDBC.probe 9 Aug 2007 18:22:17 -0000 >@@ -1,10 +1,8 @@ > <?xml version="1.0" encoding="UTF-8"?> > <probekit> > <probe> >- <import text="java.util.Properties"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.impl.JDBCDataImpl"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentManager"/> >- <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider"/> >+ <import text="org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader"/> >+ <import text="org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler"/> > <fragmentAtClassScope>/**********************************************************************
 > * Copyright (c) 2006, 2007 IBM Corporation and others.
 > * All rights reserved. This program and the accompanying materials
 >@@ -17,43 +15,24 @@ > * IBM - Initial API and implementation
 > **********************************************************************/
 > static {
 >- Properties p = System.getProperties();
 >- String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
 >- InstrumentManager.getInstance().initTransaction(appName);
 >+ BootClassLoader.init();
 > }</fragmentAtClassScope> > <fragment type="entry"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> > <data name="_thisObject" type="thisObject"/> > <data name="_methodArgs" type="args"/> >- <code>try {
 >- InstrumentDataProvider data = new JDBCDataImpl();
 >- data.setClassName(_className);
 >- data.setMethodArguments(_methodArgs);
 >- data.setMethodName(_methodName);
 >- data.setObject(_thisObject);
 >- InstrumentManager.getInstance().transactionStart(data);
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe", _className, _methodName, _thisObject, _methodArgs);</code> > </fragment> > <fragment type="exit"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> >- <code>try {
 >- InstrumentManager.getInstance().transactionStop();
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe", _className, _methodName);</code> > </fragment> > <fragment type="catch"> > <data name="_className" type="className"/> > <data name="_methodName" type="methodName"/> >- <code>try {
 >- InstrumentManager.getInstance().transactionStopError();
 >-} catch (Throwable t) {
 >- InstrumentManager.getInstance().logException(t, _className, _methodName);
 >-}</code> >+ <code>ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe", _className, _methodName);</code> > </fragment> > </probe> > </probekit> >\ No newline at end of file >Index: src-probes/Servlet_probe.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-probes/Servlet_probe.java,v >retrieving revision 1.5 >diff -u -r1.5 Servlet_probe.java >--- src-probes/Servlet_probe.java 26 Apr 2007 14:58:54 -0000 1.5 >+++ src-probes/Servlet_probe.java 9 Aug 2007 18:22:17 -0000 >@@ -4,11 +4,8 @@ > Version: 4.3 > */ > // "imports" specifications for probes (if any): >-import java.util.Properties; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.impl.ServletDataImpl; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; // from unnamed_probe >-import org.eclipse.tptp.trace.arm.internal.model.TransactionUtil; // from unnamed_probe >+import org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader; // from unnamed_probe >+import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler; // from unnamed_probe > class Servlet_probe { > // Class for probe unnamed_probe > public static class Probe_0 { >@@ -19,15 +16,13 @@ > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html >- * $Id: Servlet_probe.java,v 1.5 2007/04/26 14:58:54 mmings Exp $ >+ * $Id: Servlet.probe,v 1.6 2007/04/26 14:58:34 mmings Exp $ > * > * Contributors: > * IBM - Initial API and implementation > **********************************************************************/ > static { >- Properties p = System.getProperties(); >- String appName = p.getProperty(InstrumentManager.APPLICATION_KEY); >- InstrumentManager.getInstance().initTransaction(appName); >+ BootClassLoader.init(); > } > public static void _entry ( > String /*className*/ _className, >@@ -36,17 +31,7 @@ > Object[] /*args*/ _methodArgs ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V > //------------------ begin user-written fragment code ---------------- >-try { >-InstrumentDataProvider data = new ServletDataImpl(); >- data.setClassName(_className); >- data.setMethodArguments(_methodArgs); >- data.setMethodName(_methodName); >- data.setObject(_thisObject); >- data.setCorrelator(TransactionUtil.parentCorrelatorFromRequest(data)); >- InstrumentManager.getInstance().transactionStart(data); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe", _className, _methodName, _thisObject, _methodArgs); > //------------------- end user-written fragment code ----------------- > } > public static void _exit ( >@@ -54,11 +39,7 @@ > String /*methodName*/ _methodName ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentManager.getInstance().transactionStop(); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe", _className, _methodName); > //------------------- end user-written fragment code ----------------- > } > public static void _catch ( >@@ -66,11 +47,7 @@ > String /*methodName*/ _methodName ) { > // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V > //------------------ begin user-written fragment code ---------------- >-try { >- InstrumentManager.getInstance().transactionStopError(); >-} catch (Throwable t) { >- InstrumentManager.getInstance().logException(t, _className, _methodName); >-} >+ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe", _className, _methodName); > //------------------- end user-written fragment code ----------------- > } > } >Index: src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmCorrelatorImpl.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmCorrelatorImpl.java,v >retrieving revision 1.2 >diff -u -r1.2 ArmCorrelatorImpl.java >--- src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmCorrelatorImpl.java 7 Jul 2006 16:39:30 -0000 1.2 >+++ src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmCorrelatorImpl.java 9 Aug 2007 18:22:17 -0000 >@@ -79,7 +79,7 @@ > > _buffer.append("<ArmCorrleator"); //$NON-NLS-1$ > _buffer.append(" length=\""+_length+"\""); //$NON-NLS-1$ //$NON-NLS-2$ >- _buffer.append(" format=\""+_format+"\""); //$NON-NLS-1$ //$NON-NLS-2$ >+ _buffer.append(" format=\""+ (0xFF &_format) +"\""); //$NON-NLS-1$ //$NON-NLS-2$ > _buffer.append(" isAgentTrace=\""+isAgentTrace()+"\""); //$NON-NLS-1$ //$NON-NLS-2$ > _buffer.append(" isApplicationTrace=\""+isApplicationTrace()+"\""); //$NON-NLS-1$ //$NON-NLS-2$ > _buffer.append(" />"); //$NON-NLS-1$ >Index: src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmIdentityPropertiesImpl.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmIdentityPropertiesImpl.java,v >retrieving revision 1.4 >diff -u -r1.4 ArmIdentityPropertiesImpl.java >--- src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmIdentityPropertiesImpl.java 24 Sep 2006 19:41:45 -0000 1.4 >+++ src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmIdentityPropertiesImpl.java 9 Aug 2007 18:22:17 -0000 >@@ -235,7 +235,7 @@ > } else if (index >= _contextProperties.size()) { > return null; > } else { >- return ((ArmIdentityProperty) _contextProperties.get(index)).getValue(); >+ return ((ArmContextProperty) _contextProperties.get(index)).getValue(); > } > } > return null; >Index: src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmTransactionImpl.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmTransactionImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 ArmTransactionImpl.java >--- src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmTransactionImpl.java 19 Jul 2007 21:06:41 -0000 1.7 >+++ src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmTransactionImpl.java 9 Aug 2007 18:22:17 -0000 >@@ -93,6 +93,8 @@ > > protected String _contextURIValue; > >+ private boolean _isRemoteInvocation = false; >+ > private static IAgentMetadata _agentMetaData; > > static { >@@ -354,6 +356,25 @@ > > } > >+ /** >+ * Indicates if this transaction was invoked by a remote method invocation >+ * >+ * @return >+ */ >+ private boolean isRemoteInvocation() { >+ // TODO: Optimize this routine - too much string-age. >+ if (_contextProperties != null) { >+ String[] contextValues = ((ArmIdentityPropertiesImpl) _contextProperties).getContextValues(); >+ for(int i=0; i < contextValues.length; i++) { >+ if (contextValues[i].equalsIgnoreCase("RMI-IIOP")) { >+ _isRemoteInvocation = true; >+ break; >+ } >+ } >+ } >+ return _isRemoteInvocation; >+ } >+ > /* > * (non-Javadoc) > * >@@ -370,7 +391,7 @@ > * > * TODO: Do we need to check for a _status in order to execute start? > */ >- if (getAgentMetaData().isClientMonitoring()) { >+ if (getAgentMetaData().isClientMonitoring() || isRemoteInvocation()) { > /* Record the thread we're bound to */ > _transactionStartThreadId = Thread.currentThread().hashCode(); > bindThread(); >Index: src-arm-core/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelator.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-arm-core/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelator.java,v >retrieving revision 1.3 >diff -u -r1.3 TPTPArmCorrelator.java >--- src-arm-core/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelator.java 20 Jul 2006 01:48:43 -0000 1.3 >+++ src-arm-core/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelator.java 9 Aug 2007 18:22:17 -0000 >@@ -70,12 +70,12 @@ > /* > * Correlator format ID. > */ >- static final int CORRELATOR_FORMAT = 200; >+ static final byte CORRELATOR_FORMAT = (byte) 0xC8; // 200 - this is unsigned so make sure you do "0xFF & FORMAT_VALUE" > > /* > * Correlator flags. > */ >- static final int CORRELATOR_FLAGS = 0; >+ static final byte CORRELATOR_FLAGS = 0; > > /* > * Number of bytes the header (length, flags, and format) bits take. >@@ -114,7 +114,7 @@ > > /* Number of bytes that a long number occupies */ > static final int CORRELATOR_LONG = 8; >- >+ > /** > * Returns the machine identification tag. > * >Index: src-model/org/eclipse/tptp/trace/arm/internal/model/impl/IIOPDataImpl.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-model/org/eclipse/tptp/trace/arm/internal/model/impl/IIOPDataImpl.java,v >retrieving revision 1.4 >diff -u -r1.4 IIOPDataImpl.java >--- src-model/org/eclipse/tptp/trace/arm/internal/model/impl/IIOPDataImpl.java 25 Oct 2006 21:27:15 -0000 1.4 >+++ src-model/org/eclipse/tptp/trace/arm/internal/model/impl/IIOPDataImpl.java 9 Aug 2007 18:22:17 -0000 >@@ -11,6 +11,8 @@ > > package org.eclipse.tptp.trace.arm.internal.model.impl; > >+import java.util.ArrayList; >+ > > /** > * IIOPDataImpl is responsible for wrapping several pieces of data related >@@ -29,7 +31,27 @@ > public static final String CONTEXT_NAME_IIOP_LOCAL_PORT = "IIOPLocalPort"; > > private static final String[] CONTEXT_NAMES = { >+ CONTEXT_NAME_COMPONENT > }; >+ >+ /** >+ * Returns a string array of context name types. >+ */ >+ public String[] getContextTypes() { >+ return CONTEXT_NAMES; >+ } >+ >+ /** >+ * Returns a string array of context values >+ */ >+ public String[] getContextValues() { >+ ArrayList contextValues = new ArrayList(); >+ contextValues.add("RMI-IIOP"); >+ >+ String[] strContextValues = new String[CONTEXT_NAMES.length]; >+ System.arraycopy(contextValues.toArray(), 0, strContextValues, 0, contextValues.toArray().length); >+ return strContextValues; >+ } > > /** > * Returns the trascation object type. >Index: src-arm/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelatorImpl.java >=================================================================== >RCS file: /cvsroot/tptp/trace/org.eclipse.tptp.trace.arm/src-arm/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelatorImpl.java,v >retrieving revision 1.4 >diff -u -r1.4 TPTPArmCorrelatorImpl.java >--- src-arm/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelatorImpl.java 20 Jul 2006 01:48:43 -0000 1.4 >+++ src-arm/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelatorImpl.java 9 Aug 2007 18:22:17 -0000 >@@ -18,7 +18,6 @@ > > import org.eclipse.tptp.trace.arm.internal.agent.AgentFacade; > import org.eclipse.tptp.trace.arm.internal.agent.IAgentMetadata; >-import org.eclipse.tptp.trace.arm.internal.correlator.TPTPArmCorrelator; > import org.eclipse.tptp.trace.arm.internal.transaction.ArmCorrelatorImpl; > import org.eclipse.tptp.trace.arm.internal.util.Convert; > >@@ -368,8 +367,8 @@ > * Parse generic correlator format. > */ > _length = dataBuffer.getShort(); >- _format = (int) dataBuffer.get(); >- _flags = (int) dataBuffer.get(); >+ _format = 0xFF & (byte) dataBuffer.get(); >+ _flags = (byte) dataBuffer.get(); > > /* > * Populate TPTP Correlator Specifics. >@@ -528,7 +527,7 @@ > > _buffer.append("<TPTPArmCorrleator"); //$NON-NLS-1$ > _buffer.append(" length=\"" + _length + "\""); //$NON-NLS-1$ //$NON-NLS-2$ >- _buffer.append(" format=\"" + _format + "\""); //$NON-NLS-1$ //$NON-NLS-2$ >+ _buffer.append(" format=\"" + (0xFF & _format) + "\""); //$NON-NLS-1$ //$NON-NLS-2$ > _buffer.append(" isAgentTrace=\"" + isAgentTrace() + "\""); //$NON-NLS-1$ //$NON-NLS-2$ > _buffer.append(" isApplicationTrace=\"" + isApplicationTrace() + "\""); //$NON-NLS-1$ //$NON-NLS-2$ > _buffer.append(" threadId=\"" + _threadId + "\""); //$NON-NLS-1$ //$NON-NLS-2$ >Index: src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java >=================================================================== >RCS file: src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java >diff -N src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java >--- src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java 2 Aug 2007 14:22:27 -0000 1.2 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,212 +0,0 @@ >-/********************************************************************** >- * Copyright (c) 2006 IBM Corporation and others. >- * All rights reserved. This program and the accompanying materials >- * are made available under the terms of the Eclipse Public License v1.0 >- * which accompanies this distribution, and is available at >- * http://www.eclipse.org/legal/epl-v10.html >- * >- * Contributors: >- * IBM - Initial API and implementation >- ***********************************************************************/ >- >- >-package org.eclipse.tptp.trace.arm.internal.model.iiop; >- >-import java.util.Properties; >- >-import org.eclipse.tptp.trace.arm.internal.correlator.TPTPArmCorrelatorImpl; >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; >-import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; >-import org.eclipse.tptp.trace.arm.internal.model.impl.IIOPDataImpl; >-import org.omg.CORBA.LocalObject; >-import org.omg.IOP.ServiceContext; >-import org.omg.PortableInterceptor.ClientRequestInfo; >-import org.omg.PortableInterceptor.ClientRequestInterceptor; >-import org.omg.PortableInterceptor.ForwardRequest; >-import org.omg.PortableInterceptor.ORBInitInfo; >-import org.omg.PortableInterceptor.ORBInitializer; >-import org.omg.PortableInterceptor.ServerRequestInfo; >-import org.omg.PortableInterceptor.ServerRequestInterceptor; >-import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; >-import org.opengroup.arm40.transaction.ArmCorrelator; >- >-import com.ibm.CORBA.iiop.ExtendedORBInitInfo; >- >-/** >- * The request interceptor responsible for transmitting the ARM correlator >- * between machines when the IIOP calls are made. >- * >- * @author TPTP Development Team >- * @since TPTP 4.2.1 >- */ >-public class ArmRequestInterceptor extends LocalObject implements >- ORBInitializer, ClientRequestInterceptor, ServerRequestInterceptor { >- >- private static final long serialVersionUID = -73971998689011509L; >- >- public static final int SERVICE_ID = 0x49424d1e; >- >- private static final String CLASS = ArmRequestInterceptor.class.getName(); >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ORBInitializerOperations#post_init(org.omg.PortableInterceptor.ORBInitInfo) >- */ >- public void post_init(ORBInitInfo arg0) { >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ORBInitializerOperations#pre_init(org.omg.PortableInterceptor.ORBInitInfo) >- */ >- public void pre_init(ORBInitInfo info) { >- try { >- ((ExtendedORBInitInfo) info).add_server_request_interceptor(this, >- false); >- ((ExtendedORBInitInfo) info).add_client_request_interceptor(this, >- false); >- >- /* Set the ARM Application name */ >- Properties p = System.getProperties(); >- String appName = p.getProperty(InstrumentManager.APPLICATION_KEY); >- InstrumentManager.getInstance().initTransaction(appName); >- } catch (DuplicateName e) { >- // following should appear in WebSphere's SystemErr.log file. >- e.printStackTrace(); >- } >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_exception(org.omg.PortableInterceptor.ClientRequestInfo) >- */ >- public void receive_exception(ClientRequestInfo arg0) throws ForwardRequest { >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_other(org.omg.PortableInterceptor.ClientRequestInfo) >- */ >- public void receive_other(ClientRequestInfo arg0) throws ForwardRequest { >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_reply(org.omg.PortableInterceptor.ClientRequestInfo) >- */ >- public void receive_reply(ClientRequestInfo arg0) { >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#send_poll(org.omg.PortableInterceptor.ClientRequestInfo) >- */ >- public void send_poll(ClientRequestInfo arg0) { >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#send_request(org.omg.PortableInterceptor.ClientRequestInfo) >- */ >- public void send_request(ClientRequestInfo ri) throws ForwardRequest { >- >- /* Get the Arm Correlator */ >- >- ArmCorrelator correlator = InstrumentManager.getInstance() >- .getCorrelator(); >- InstrumentDataProvider data = new IIOPDataImpl(); >- data.setClassName(ri.effective_target().getClass().getName()); >- data.setMethodArguments(null); >- data.setMethodName(ri.operation()); >- data.setObject(ri); >- data.setCorrelator(correlator); >- >- /* Need to start the transaction coming in */ >- correlator = InstrumentManager.getInstance().transactionStart(data); >- >- if (correlator != null) { >- ServiceContext serviceContext = new ServiceContext(SERVICE_ID, >- correlator.getBytes()); >- ri.add_request_service_context(serviceContext, false); >- } >- >- if (!ri.response_expected()) { >- InstrumentManager.getInstance().transactionStop(); >- } >- >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.InterceptorOperations#destroy() >- */ >- public void destroy() { >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.InterceptorOperations#name() >- */ >- public String name() { >- return CLASS; >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#receive_request(org.omg.PortableInterceptor.ServerRequestInfo) >- */ >- public void receive_request(ServerRequestInfo arg0) throws ForwardRequest { >- byte[] corBytes = null; >- ArmCorrelator correlator; >- try { >- corBytes = arg0.get_request_service_context(SERVICE_ID).context_data; >- correlator = new TPTPArmCorrelatorImpl(corBytes, 0); >- } catch (Exception e) { >- return; >- } >- >- if (corBytes != null) { >- InstrumentDataProvider data = new IIOPDataImpl(); >- data.setClassName(arg0.getClass().getName()); >- data.setMethodArguments(null); >- data.setMethodName(arg0.operation()); >- data.setObject(arg0); >- data.setCorrelator(correlator); >- InstrumentManager.getInstance().transactionStart(data); >- >- if (!arg0.response_expected()) { >- InstrumentManager.getInstance().transactionStop(); >- } >- } >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#receive_request_service_contexts(org.omg.PortableInterceptor.ServerRequestInfo) >- */ >- public void receive_request_service_contexts(ServerRequestInfo arg0) >- throws ForwardRequest { >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_exception(org.omg.PortableInterceptor.ServerRequestInfo) >- */ >- public void send_exception(ServerRequestInfo arg0) throws ForwardRequest { >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_other(org.omg.PortableInterceptor.ServerRequestInfo) >- */ >- public void send_other(ServerRequestInfo arg0) throws ForwardRequest { >- } >- >- /* >- * (non-Javadoc) >- * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_reply(org.omg.PortableInterceptor.ServerRequestInfo) >- */ >- public void send_reply(ServerRequestInfo arg0) { >- } >- >-} >Index: src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java >=================================================================== >RCS file: src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java >diff -N src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java >--- src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java 2 Aug 2007 14:22:27 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,128 +0,0 @@ >-package org.eclipse.tptp.trace.arm.internal.model.iiop; >- >-import org.omg.CORBA.LocalObject; >-import org.omg.IOP.ServiceContext; >-import org.omg.PortableInterceptor.ClientRequestInfo; >-import org.omg.PortableInterceptor.ClientRequestInterceptor; >-import org.omg.PortableInterceptor.ForwardRequest; >-import org.omg.PortableInterceptor.ORBInitInfo; >-import org.omg.PortableInterceptor.ORBInitializer; >-import org.omg.PortableInterceptor.ServerRequestInfo; >-import org.omg.PortableInterceptor.ServerRequestInterceptor; >-import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; >- >-import com.ibm.CORBA.iiop.ExtendedORBInitInfo; >- >-/** >- * The request interceptor responsible for transmitting the ARM correlator >- * between machines when the IIOP calls are made. >- * >- * @author TPTP Development Team >- * @since TPTP 4.2.1 >- */ >-public class ArmTestInterceptor extends LocalObject implements >- ORBInitializer, ClientRequestInterceptor, ServerRequestInterceptor { >- >- private static final byte[] SEND_BYTE_ARRAY; >- >- static { >- SEND_BYTE_ARRAY = new byte[147]; >- for (int i = 0; i < SEND_BYTE_ARRAY.length; i++) { >- SEND_BYTE_ARRAY[i] = (byte)i; >- } >- } >- >- private static final long serialVersionUID = -73971998689011509L; >- >- public static final int SERVICE_ID = 0x49424d1e; >- >- private static final String CLASS = ArmTestInterceptor.class.getName(); >- >- public void post_init(ORBInitInfo arg0) { >- } >- >- public void pre_init(ORBInitInfo info) { >- try { >- ((ExtendedORBInitInfo) info).add_server_request_interceptor(this, >- false); >- ((ExtendedORBInitInfo) info).add_client_request_interceptor(this, >- false); >- } catch (DuplicateName e) { >- // following should appear in WebSphere's SystemErr.log file. >- e.printStackTrace(); >- } >- } >- >- public void receive_exception(ClientRequestInfo arg0) throws ForwardRequest { >- } >- >- public void receive_other(ClientRequestInfo arg0) throws ForwardRequest { >- } >- >- public void receive_reply(ClientRequestInfo arg0) { >- } >- >- public void send_poll(ClientRequestInfo arg0) { >- } >- >- public void send_request(ClientRequestInfo ri) throws ForwardRequest { >- >- ServiceContext serviceContext = new ServiceContext(SERVICE_ID, >- SEND_BYTE_ARRAY); >- ri.add_request_service_context(serviceContext, false); >- >- System.err.println("SEND_REQUEST adding byte arry to service context: "); >- printArr(SEND_BYTE_ARRAY); >- System.err.println(); >- >- } >- >- public void destroy() { >- } >- >- public String name() { >- return CLASS; >- } >- >- public void receive_request(ServerRequestInfo arg0) throws ForwardRequest { >- byte[] corBytes = null; >- try { >- corBytes = arg0.get_request_service_context(SERVICE_ID).context_data; >- } catch (Exception e) { >- e.printStackTrace(); >- return; >- } >- System.err.println("RECEIVE REQUEST received byte array: "); >- printArr(corBytes); >- System.err.println(); >- >- >- } >- >- void printArr(byte[] arr) { >- for (int i = 0; i < arr.length; i++) { >- System.err.print(arr[i]); >- System.err.print(", "); >- } >- } >- >- public void receive_request_service_contexts(ServerRequestInfo arg0) >- throws ForwardRequest { >- >- } >- >- public void send_exception(ServerRequestInfo arg0) throws ForwardRequest { >- >- >- } >- >- public void send_other(ServerRequestInfo arg0) throws ForwardRequest { >- >- >- } >- >- public void send_reply(ServerRequestInfo arg0) { >- >- } >- >-} >\ No newline at end of file >Index: src-probes/org/eclipse/tptp/trace/arm/internal/loader/BootClassLoader.java >=================================================================== >RCS file: src-probes/org/eclipse/tptp/trace/arm/internal/loader/BootClassLoader.java >diff -N src-probes/org/eclipse/tptp/trace/arm/internal/loader/BootClassLoader.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-probes/org/eclipse/tptp/trace/arm/internal/loader/BootClassLoader.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,100 @@ >+/********************************************************************** >+ * Copyright (c) 2006 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM - Initial API and implementation >+ ***********************************************************************/ >+package org.eclipse.tptp.trace.arm.internal.loader; >+ >+import java.io.File; >+import java.net.MalformedURLException; >+import java.net.URL; >+import java.net.URLClassLoader; >+import java.util.ArrayList; >+import java.util.HashMap; >+import java.util.List; >+import java.util.Map; >+ >+/** >+ * The boot class loader loads all the dependencies for the build to manage toolkit >+ * during instrumentation into a separate classloader so that it doesn't interfere >+ * with the execution environment's classloaders (such as WAS). >+ * >+ * @author ashishp >+ * @since 4.4 >+ */ >+public class BootClassLoader { >+ >+ public static final String ARM_LIBRARY_PATH = "arm.library.path"; >+ >+ private static Map classMap = null; >+ >+ private static URLClassLoader ucl = null; >+ >+ /** >+ * Initialization of the boot class loader >+ */ >+ public static void init() { >+ if (ucl == null) { >+ classMap = new HashMap(); >+ >+ // Get the directory (URL) of the reloadable class >+ List urls = new ArrayList(); >+ String[] arm_library_path = System.getProperty(ARM_LIBRARY_PATH, "").split(";"); >+ for (int j=0; j < arm_library_path.length; j++) { >+ File dir = new File(arm_library_path[j] + File.separator); >+ File[] library = dir.listFiles(); >+ for (int i = 0; i < library.length; i++) { >+ try { >+ urls.add( library[i].toURL() ); >+ } catch (MalformedURLException mue) { >+ } >+ } >+ } >+ try { >+ // Create a new class loader with the directory >+ URL[] urlss = new URL[urls.size()]; >+ System.arraycopy(urls.toArray(), 0, urlss, 0, urlss.length); >+ ucl = new URLClassLoader(urlss, ClassLoader.getSystemClassLoader()); >+ } catch (SecurityException e) { >+ e.printStackTrace(System.err); >+ } catch (IllegalArgumentException e) { >+ e.printStackTrace(System.err); >+ } >+ } >+ } >+ >+ /** >+ * Returns a in-instance representation of the class requested. >+ * >+ * @param clazz >+ * @param initializeClazz >+ * @return >+ * @throws ClassNotFoundException >+ */ >+ public static Class getClass(String clazz, boolean initializeClazz) throws ClassNotFoundException { >+ Class clazzObject = null; >+ if (getClassLoader() != null){ >+ if (classMap.containsKey(clazz)) { >+ clazzObject = (Class)classMap.get(clazz); >+ } else { >+ clazzObject = Class.forName(clazz, initializeClazz, getClassLoader()); >+ classMap.put(clazz, clazzObject); >+ } >+ } >+ return clazzObject; >+ } >+ >+ /** >+ * Returns the URL Class Loader used for loading the ARM component and its dependencies. >+ * >+ * @return >+ */ >+ public static URLClassLoader getClassLoader() { >+ return ucl; >+ } >+} >Index: src-probes/org/eclipse/tptp/trace/arm/internal/loader/ProbeHandler.java >=================================================================== >RCS file: src-probes/org/eclipse/tptp/trace/arm/internal/loader/ProbeHandler.java >diff -N src-probes/org/eclipse/tptp/trace/arm/internal/loader/ProbeHandler.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-probes/org/eclipse/tptp/trace/arm/internal/loader/ProbeHandler.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,129 @@ >+/********************************************************************** >+ * Copyright (c) 2007 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM - Initial API and implementation >+ ***********************************************************************/ >+package org.eclipse.tptp.trace.arm.internal.loader; >+ >+import java.lang.reflect.InvocationTargetException; >+import java.lang.reflect.Method; >+ >+/** >+ * Brokers probe invocations from probekit probes to probe implementation found >+ * in the src-model package. >+ * >+ * @author ashishp >+ * @since 4.4 >+ */ >+public class ProbeHandler { >+ >+ /** >+ * Returns a handle to the method in the probe for invocation purposes. >+ * >+ * @param probeClassName is the name of the class that implements the probe. >+ * @param methodName is the entry point in the probe. >+ * @param parameterTypes indicates teh method signature of the entry point in the probe. >+ * @return handle to the method in the probe for invocation purposes. >+ * @throws ClassNotFoundException >+ * @throws SecurityException >+ * @throws NoSuchMethodException >+ */ >+ public static Method getMethod(String probeClassName, String methodName, Class[] parameterTypes) >+ throws ClassNotFoundException, SecurityException, NoSuchMethodException { >+ Class probeClass = BootClassLoader.getClass(probeClassName, true); >+ return probeClass.getMethod(methodName, parameterTypes); >+ } >+ >+ /** >+ * Entry point in the Probe. >+ * >+ * @param probeClassName is the name of the class that implements the probe. >+ * @param _className is the class name that the probe was injected into. >+ * @param _methodName is the name of the method that was injected. >+ * @param _thisObject a reference to the object instance that this probe was invoked on. >+ * @param _methodArgs is a reference to the arguments of the instrumented method. >+ */ >+ public static void _entry(String probeClassName, >+ String _className, String _methodName, >+ Object _thisObject, Object[] _methodArgs) { >+ try { >+ Method m = getMethod(probeClassName, "_entry", >+ new Class[] { String.class, String.class, Object.class, Object[].class }); >+ m.invoke(null, new Object[] { _className, _methodName, _thisObject, _methodArgs }); >+ } catch (IllegalArgumentException e) { >+ e.printStackTrace(System.err); >+ } catch (IllegalAccessException e) { >+ e.printStackTrace(System.err); >+ } catch (InvocationTargetException e) { >+ e.printStackTrace(System.err); >+ } catch (SecurityException e) { >+ e.printStackTrace(System.err); >+ } catch (ClassNotFoundException e) { >+ e.printStackTrace(System.err); >+ } catch (NoSuchMethodException e) { >+ e.printStackTrace(System.err); >+ } >+ } >+ >+ /** >+ * Exit point in the Probe. >+ * >+ * @param probeClassName is the name of the class that implements the probe. >+ * @param _className is the class name that the probe was injected into. >+ * @param _methodName is the name of the method that was injected. >+ */ >+ public static void _exit(String probeClassName, >+ String _className, String _methodName) { >+ try { >+ Method m = getMethod(probeClassName, "_exit", >+ new Class[] { String.class, String.class }); >+ m.invoke(null, new Object[] { _className, _methodName }); >+ } catch (IllegalArgumentException e) { >+ e.printStackTrace(System.err); >+ } catch (IllegalAccessException e) { >+ e.printStackTrace(System.err); >+ } catch (InvocationTargetException e) { >+ e.printStackTrace(System.err); >+ } catch (SecurityException e) { >+ e.printStackTrace(System.err); >+ } catch (ClassNotFoundException e) { >+ e.printStackTrace(System.err); >+ } catch (NoSuchMethodException e) { >+ e.printStackTrace(System.err); >+ } >+ } >+ >+ /** >+ * Catch point in the Probe. >+ * >+ * @param probeClassName is the name of the class that implements the probe. >+ * @param _className is the class name that the probe was injected into. >+ * @param _methodName is the name of the method that was injected. >+ */ >+ public static void _catch(String probeClassName, >+ String _className, String _methodName) { >+ try { >+ Method m = getMethod(probeClassName, "_catch", >+ new Class[] { String.class, String.class }); >+ m.invoke(null, new Object[] { _className, _methodName }); >+ } catch (IllegalArgumentException e) { >+ e.printStackTrace(System.err); >+ } catch (IllegalAccessException e) { >+ e.printStackTrace(System.err); >+ } catch (InvocationTargetException e) { >+ e.printStackTrace(System.err); >+ } catch (SecurityException e) { >+ e.printStackTrace(System.err); >+ } catch (ClassNotFoundException e) { >+ e.printStackTrace(System.err); >+ } catch (NoSuchMethodException e) { >+ e.printStackTrace(System.err); >+ } >+ } >+ >+} >Index: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/GenericProbe.java >=================================================================== >RCS file: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/GenericProbe.java >diff -N src-model/org/eclipse/tptp/trace/arm/internal/model/probes/GenericProbe.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-model/org/eclipse/tptp/trace/arm/internal/model/probes/GenericProbe.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,61 @@ >+/** >+ * >+ */ >+package org.eclipse.tptp.trace.arm.internal.model.probes; >+ >+import java.util.Properties; >+ >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; >+import org.eclipse.tptp.trace.arm.internal.model.impl.GenericDataImpl; >+ >+/** >+ * @author Ashish >+ * >+ */ >+public class GenericProbe { >+ >+ static { >+ Properties p = System.getProperties(); >+ String appName = p.getProperty(InstrumentManager.APPLICATION_KEY); >+ InstrumentManager.getInstance().initTransaction(appName); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[]) >+ */ >+ public static void _entry(String _className, String _methodName, Object _thisObject, Object[] _methodArgs) { >+ try { >+ InstrumentDataProvider data = new GenericDataImpl(); >+ data.setClassName(_className); >+ data.setMethodName(_methodName); >+ data.setMethodArguments(_methodArgs); >+ data.setObject(_thisObject); >+ InstrumentManager.getInstance().transactionStart(data); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String) >+ */ >+ public static void _exit(String _className, String _methodName) { >+ try { >+ InstrumentManager.getInstance().transactionStop(); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_catch(java.lang.String, java.lang.String) >+ */ >+ public static void _catch(String _className, String _methodName) { >+ try { >+ InstrumentManager.getInstance().transactionStopError(); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+} >Index: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/IIOPProbe.java >=================================================================== >RCS file: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/IIOPProbe.java >diff -N src-model/org/eclipse/tptp/trace/arm/internal/model/probes/IIOPProbe.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-model/org/eclipse/tptp/trace/arm/internal/model/probes/IIOPProbe.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,88 @@ >+/** >+ * >+ */ >+package org.eclipse.tptp.trace.arm.internal.model.probes; >+ >+import java.util.Properties; >+ >+import org.eclipse.tptp.trace.arm.internal.correlator.TPTPArmCorrelatorImpl; >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; >+import org.eclipse.tptp.trace.arm.internal.model.impl.IIOPDataImpl; >+import org.omg.IOP.ServiceContext; >+import org.omg.PortableInterceptor.ClientRequestInfo; >+import org.omg.PortableInterceptor.ServerRequestInfo; >+import org.opengroup.arm40.transaction.ArmCorrelator; >+ >+/** >+ * @author Ashish >+ * >+ */ >+public class IIOPProbe { >+ >+ public static final int SERVICE_ID = 0x49424d1e; >+ >+ static { >+ Properties p = System.getProperties(); >+ String appName = p.getProperty(InstrumentManager.APPLICATION_KEY); >+ InstrumentManager.getInstance().initTransaction(appName); >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[]) >+ */ >+ public static void send_request(ClientRequestInfo ri) { >+ >+ /* Get the Arm Correlator */ >+ >+ ArmCorrelator correlator = InstrumentManager.getInstance() >+ .getCorrelator(); >+ InstrumentDataProvider data = new IIOPDataImpl(); >+ data.setClassName(ri.effective_target().getClass().getName()); >+ data.setMethodArguments(null); >+ data.setMethodName(ri.operation()); >+ data.setObject(ri); >+ data.setCorrelator(correlator); >+ >+ /* Need to start the transaction coming in */ >+ correlator = InstrumentManager.getInstance().transactionStart(data); >+ >+ if (correlator != null) { >+ ServiceContext serviceContext = new ServiceContext(SERVICE_ID, >+ correlator.getBytes()); >+ ri.add_request_service_context(serviceContext, false); >+ } >+ >+ if (!ri.response_expected()) { >+ InstrumentManager.getInstance().transactionStop(); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String) >+ */ >+ public static void receive_request(ServerRequestInfo arg0) { >+ byte[] corBytes = null; >+ ArmCorrelator correlator; >+ try { >+ corBytes = arg0.get_request_service_context(SERVICE_ID).context_data; >+ correlator = new TPTPArmCorrelatorImpl(corBytes, 0); >+ } catch (Exception e) { >+ return; >+ } >+ >+ if (corBytes != null) { >+ InstrumentDataProvider data = new IIOPDataImpl(); >+ data.setClassName(arg0.getClass().getName()); >+ data.setMethodArguments(null); >+ data.setMethodName(arg0.operation()); >+ data.setObject(arg0); >+ data.setCorrelator(correlator); >+ InstrumentManager.getInstance().transactionStart(data); >+ >+ if (!arg0.response_expected()) { >+ InstrumentManager.getInstance().transactionStop(); >+ } >+ } >+ } >+} >Index: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/JDBCProbe.java >=================================================================== >RCS file: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/JDBCProbe.java >diff -N src-model/org/eclipse/tptp/trace/arm/internal/model/probes/JDBCProbe.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-model/org/eclipse/tptp/trace/arm/internal/model/probes/JDBCProbe.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,53 @@ >+/** >+ * >+ */ >+package org.eclipse.tptp.trace.arm.internal.model.probes; >+ >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; >+import org.eclipse.tptp.trace.arm.internal.model.impl.JDBCDataImpl; >+ >+/** >+ * @author Ashish >+ * >+ */ >+public class JDBCProbe extends GenericProbe { >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[]) >+ */ >+ public static void _entry(String _className, String _methodName, Object _thisObject, Object[] _methodArgs) { >+ try { >+ InstrumentDataProvider data = new JDBCDataImpl(); >+ data.setClassName(_className); >+ data.setMethodName(_methodName); >+ data.setMethodArguments(_methodArgs); >+ data.setObject(_thisObject); >+ InstrumentManager.getInstance().transactionStart(data); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String) >+ */ >+ public static void _exit(String _className, String _methodName) { >+ try { >+ InstrumentManager.getInstance().transactionStop(); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_catch(java.lang.String, java.lang.String) >+ */ >+ public static void _catch(String _className, String _methodName) { >+ try { >+ InstrumentManager.getInstance().transactionStopError(); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+} >Index: src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java >=================================================================== >RCS file: src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java >diff -N src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,129 @@ >+package org.eclipse.tptp.trace.arm.internal.model.iiop; >+ >+import org.omg.CORBA.LocalObject; >+import org.omg.IOP.ServiceContext; >+import org.omg.PortableInterceptor.ClientRequestInfo; >+import org.omg.PortableInterceptor.ClientRequestInterceptor; >+import org.omg.PortableInterceptor.ForwardRequest; >+import org.omg.PortableInterceptor.ORBInitInfo; >+import org.omg.PortableInterceptor.ORBInitializer; >+import org.omg.PortableInterceptor.ServerRequestInfo; >+import org.omg.PortableInterceptor.ServerRequestInterceptor; >+import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; >+ >+import com.ibm.CORBA.iiop.ExtendedORBInitInfo; >+ >+/** >+ * The request interceptor responsible for transmitting the ARM correlator >+ * between machines when the IIOP calls are made. >+ * >+ * @author rdanek >+ * @version 4.4 >+ * @since 4.2.1 >+ */ >+public class ArmTestInterceptor extends LocalObject implements >+ ORBInitializer, ClientRequestInterceptor, ServerRequestInterceptor { >+ >+ private static final byte[] SEND_BYTE_ARRAY; >+ >+ static { >+ SEND_BYTE_ARRAY = new byte[147]; >+ for (int i = 0; i < SEND_BYTE_ARRAY.length; i++) { >+ SEND_BYTE_ARRAY[i] = (byte)i; >+ } >+ } >+ >+ private static final long serialVersionUID = -73971998689011509L; >+ >+ public static final int SERVICE_ID = 0x49424d1e; >+ >+ private static final String CLASS = ArmTestInterceptor.class.getName(); >+ >+ public void post_init(ORBInitInfo arg0) { >+ } >+ >+ public void pre_init(ORBInitInfo info) { >+ try { >+ ((ExtendedORBInitInfo) info).add_server_request_interceptor(this, >+ false); >+ ((ExtendedORBInitInfo) info).add_client_request_interceptor(this, >+ false); >+ } catch (DuplicateName e) { >+ // following should appear in WebSphere's SystemErr.log file. >+ e.printStackTrace(); >+ } >+ } >+ >+ public void receive_exception(ClientRequestInfo arg0) throws ForwardRequest { >+ } >+ >+ public void receive_other(ClientRequestInfo arg0) throws ForwardRequest { >+ } >+ >+ public void receive_reply(ClientRequestInfo arg0) { >+ } >+ >+ public void send_poll(ClientRequestInfo arg0) { >+ } >+ >+ public void send_request(ClientRequestInfo ri) throws ForwardRequest { >+ >+ ServiceContext serviceContext = new ServiceContext(SERVICE_ID, >+ SEND_BYTE_ARRAY); >+ ri.add_request_service_context(serviceContext, false); >+ >+ System.err.println("SEND_REQUEST adding byte arry to service context: "); >+ printArr(SEND_BYTE_ARRAY); >+ System.err.println(); >+ >+ } >+ >+ public void destroy() { >+ } >+ >+ public String name() { >+ return CLASS; >+ } >+ >+ public void receive_request(ServerRequestInfo arg0) throws ForwardRequest { >+ byte[] corBytes = null; >+ try { >+ corBytes = arg0.get_request_service_context(SERVICE_ID).context_data; >+ } catch (Exception e) { >+ e.printStackTrace(); >+ return; >+ } >+ System.err.println("RECEIVE REQUEST received byte array: "); >+ printArr(corBytes); >+ System.err.println(); >+ >+ >+ } >+ >+ void printArr(byte[] arr) { >+ for (int i = 0; i < arr.length; i++) { >+ System.err.print(arr[i]); >+ System.err.print(", "); >+ } >+ } >+ >+ public void receive_request_service_contexts(ServerRequestInfo arg0) >+ throws ForwardRequest { >+ >+ } >+ >+ public void send_exception(ServerRequestInfo arg0) throws ForwardRequest { >+ >+ >+ } >+ >+ public void send_other(ServerRequestInfo arg0) throws ForwardRequest { >+ >+ >+ } >+ >+ public void send_reply(ServerRequestInfo arg0) { >+ >+ } >+ >+} >Index: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/EJBProbe.java >=================================================================== >RCS file: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/EJBProbe.java >diff -N src-model/org/eclipse/tptp/trace/arm/internal/model/probes/EJBProbe.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-model/org/eclipse/tptp/trace/arm/internal/model/probes/EJBProbe.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,53 @@ >+/** >+ * >+ */ >+package org.eclipse.tptp.trace.arm.internal.model.probes; >+ >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; >+import org.eclipse.tptp.trace.arm.internal.model.impl.EJBDataImpl; >+ >+/** >+ * @author Ashish >+ * >+ */ >+public class EJBProbe extends GenericProbe { >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[]) >+ */ >+ public static void _entry(String _className, String _methodName, Object _thisObject, Object[] _methodArgs) { >+ try { >+ InstrumentDataProvider data = new EJBDataImpl(); >+ data.setClassName(_className); >+ data.setMethodName(_methodName); >+ data.setMethodArguments(_methodArgs); >+ data.setObject(_thisObject); >+ InstrumentManager.getInstance().transactionStart(data); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String) >+ */ >+ public static void _exit(String _className, String _methodName) { >+ try { >+ InstrumentManager.getInstance().transactionStop(); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_catch(java.lang.String, java.lang.String) >+ */ >+ public static void _catch(String _className, String _methodName) { >+ try { >+ InstrumentManager.getInstance().transactionStopError(); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+} >Index: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/ServletProbe.java >=================================================================== >RCS file: src-model/org/eclipse/tptp/trace/arm/internal/model/probes/ServletProbe.java >diff -N src-model/org/eclipse/tptp/trace/arm/internal/model/probes/ServletProbe.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-model/org/eclipse/tptp/trace/arm/internal/model/probes/ServletProbe.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,53 @@ >+/** >+ * >+ */ >+package org.eclipse.tptp.trace.arm.internal.model.probes; >+ >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; >+import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; >+import org.eclipse.tptp.trace.arm.internal.model.impl.ServletDataImpl; >+ >+/** >+ * @author Ashish >+ * >+ */ >+public class ServletProbe extends GenericProbe { >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[]) >+ */ >+ public static void _entry(String _className, String _methodName, Object _thisObject, Object[] _methodArgs) { >+ try { >+ InstrumentDataProvider data = new ServletDataImpl(); >+ data.setClassName(_className); >+ data.setMethodName(_methodName); >+ data.setMethodArguments(_methodArgs); >+ data.setObject(_thisObject); >+ InstrumentManager.getInstance().transactionStart(data); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String) >+ */ >+ public static void _exit(String _className, String _methodName) { >+ try { >+ InstrumentManager.getInstance().transactionStop(); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_catch(java.lang.String, java.lang.String) >+ */ >+ public static void _catch(String _className, String _methodName) { >+ try { >+ InstrumentManager.getInstance().transactionStopError(); >+ } catch (Throwable t) { >+ InstrumentManager.getInstance().logException(t, _className, _methodName); >+ } >+ } >+} >Index: src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java >=================================================================== >RCS file: src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java >diff -N src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,186 @@ >+/********************************************************************** >+ * Copyright (c) 2006 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM - Initial API and implementation >+ ***********************************************************************/ >+ >+package org.eclipse.tptp.trace.arm.internal.model.iiop; >+ >+import java.lang.reflect.InvocationTargetException; >+import java.lang.reflect.Method; >+ >+import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler; >+import org.omg.CORBA.LocalObject; >+import org.omg.PortableInterceptor.ClientRequestInfo; >+import org.omg.PortableInterceptor.ClientRequestInterceptor; >+import org.omg.PortableInterceptor.ForwardRequest; >+import org.omg.PortableInterceptor.ORBInitInfo; >+import org.omg.PortableInterceptor.ORBInitializer; >+import org.omg.PortableInterceptor.ServerRequestInfo; >+import org.omg.PortableInterceptor.ServerRequestInterceptor; >+import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName; >+ >+import com.ibm.CORBA.iiop.ExtendedORBInitInfo; >+ >+/** >+ * The request interceptor responsible for transmitting the ARM correlator >+ * between machines when the IIOP calls are made. >+ * >+ * @author rdanek, ashishp >+ * @version 4.4 >+ * @since 4.2.1 >+ */ >+public class ArmRequestInterceptor extends LocalObject implements >+ ORBInitializer, ClientRequestInterceptor, ServerRequestInterceptor { >+ >+ private static final long serialVersionUID = -73971998689011509L; >+ >+ private static final String CLASS = ArmRequestInterceptor.class.getName(); >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ORBInitializerOperations#post_init(org.omg.PortableInterceptor.ORBInitInfo) >+ */ >+ public void post_init(ORBInitInfo arg0) { >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ORBInitializerOperations#pre_init(org.omg.PortableInterceptor.ORBInitInfo) >+ */ >+ public void pre_init(ORBInitInfo info) { >+ try { >+ ((ExtendedORBInitInfo) info).add_server_request_interceptor(this, false); >+ ((ExtendedORBInitInfo) info).add_client_request_interceptor(this, false); >+ } catch (DuplicateName e) { >+ // following should appear in WebSphere's SystemErr.log file. >+ e.printStackTrace(System.err); >+ } >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_exception(org.omg.PortableInterceptor.ClientRequestInfo) >+ */ >+ public void receive_exception(ClientRequestInfo arg0) throws ForwardRequest { >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_other(org.omg.PortableInterceptor.ClientRequestInfo) >+ */ >+ public void receive_other(ClientRequestInfo arg0) throws ForwardRequest { >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_reply(org.omg.PortableInterceptor.ClientRequestInfo) >+ */ >+ public void receive_reply(ClientRequestInfo arg0) { >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#send_poll(org.omg.PortableInterceptor.ClientRequestInfo) >+ */ >+ public void send_poll(ClientRequestInfo arg0) { >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#send_request(org.omg.PortableInterceptor.ClientRequestInfo) >+ */ >+ public void send_request(ClientRequestInfo ri) throws ForwardRequest { >+ try { >+ Method m = ProbeHandler.getMethod("org.eclipse.tptp.trace.arm.internal.model.probes.IIOPProbe", >+ "send_request", new Class[] { ClientRequestInfo.class }); >+ m.invoke(null, new Object[] { ri }); >+ } catch (IllegalArgumentException e) { >+ e.printStackTrace(System.err); >+ } catch (IllegalAccessException e) { >+ e.printStackTrace(System.err); >+ } catch (InvocationTargetException e) { >+ e.printStackTrace(System.err); >+ } catch (SecurityException e) { >+ e.printStackTrace(System.err); >+ } catch (ClassNotFoundException e) { >+ e.printStackTrace(System.err); >+ } catch (NoSuchMethodException e) { >+ e.printStackTrace(System.err); >+ } >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.InterceptorOperations#destroy() >+ */ >+ public void destroy() { >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.InterceptorOperations#name() >+ */ >+ public String name() { >+ return CLASS; >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#receive_request(org.omg.PortableInterceptor.ServerRequestInfo) >+ */ >+ public void receive_request(ServerRequestInfo arg0) throws ForwardRequest { >+ try { >+ Method m = ProbeHandler.getMethod("org.eclipse.tptp.trace.arm.internal.model.probes.IIOPProbe", >+ "receive_request", new Class[] { ServerRequestInfo.class }); >+ m.invoke(null, new Object[] { arg0 }); >+ } catch (IllegalArgumentException e) { >+ e.printStackTrace(System.err); >+ } catch (IllegalAccessException e) { >+ e.printStackTrace(System.err); >+ } catch (InvocationTargetException e) { >+ e.printStackTrace(System.err); >+ } catch (SecurityException e) { >+ e.printStackTrace(System.err); >+ } catch (ClassNotFoundException e) { >+ e.printStackTrace(System.err); >+ } catch (NoSuchMethodException e) { >+ e.printStackTrace(System.err); >+ } >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#receive_request_service_contexts(org.omg.PortableInterceptor.ServerRequestInfo) >+ */ >+ public void receive_request_service_contexts(ServerRequestInfo arg0) >+ throws ForwardRequest { >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_exception(org.omg.PortableInterceptor.ServerRequestInfo) >+ */ >+ public void send_exception(ServerRequestInfo arg0) throws ForwardRequest { >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_other(org.omg.PortableInterceptor.ServerRequestInfo) >+ */ >+ public void send_other(ServerRequestInfo arg0) throws ForwardRequest { >+ } >+ >+ /* >+ * (non-Javadoc) >+ * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_reply(org.omg.PortableInterceptor.ServerRequestInfo) >+ */ >+ public void send_reply(ServerRequestInfo arg0) { >+ } >+ >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 148461
: 75786 |
75798
|
76255
|
76860