Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 148461 | Differences between
and this patch

Collapse All | Expand All

(-).classpath (+1 lines)
Lines 10-14 Link Here
10
	<classpathentry kind="src" path="src-logging"/>
10
	<classpathentry kind="src" path="src-logging"/>
11
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
11
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
12
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
12
	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
13
	<classpathentry kind="lib" path="C:/Program Files/IBM/WebSphere/AppServer/lib/j2ee.jar"/>
13
	<classpathentry kind="output" path="bin"/>
14
	<classpathentry kind="output" path="bin"/>
14
</classpath>
15
</classpath>
(-)build.properties (-5 / +8 lines)
Lines 3-11 Link Here
3
                        src-arm-core/
3
                        src-arm-core/
4
output.armLibrary.jar = bin/
4
output.armLibrary.jar = bin/
5
bin.includes = about.html,\
5
bin.includes = about.html,\
6
			   about.ini,\
6
               about.ini,\
7
			   about.mappings,\
7
               about.mappings,\
8
			   about.properties,\
8
               about.properties,\
9
               META-INF/,\
9
               META-INF/,\
10
               armLibrary.jar,\
10
               armLibrary.jar,\
11
               plugin.properties,\
11
               plugin.properties,\
Lines 16-23 Link Here
16
               cbeLogging.jar,\
16
               cbeLogging.jar,\
17
               plugin.xml,\
17
               plugin.xml,\
18
               armProbes.jar,\
18
               armProbes.jar,\
19
               eclipse32.png
19
               eclipse32.png,\
20
jars.extra.classpath = ../../external-jars/j2ee-arm.jar
20
               src-probes/EJB.probescript,\
21
               src-probes/GenericArm.probescript,\
22
               src-probes/JDBC.probescript,\
23
               src-probes/Servlet.probescript
21
source.config.jar = src-config/
24
source.config.jar = src-config/
22
output.config.jar = bin/
25
output.config.jar = bin/
23
jars.compile.order = config.jar,\
26
jars.compile.order = config.jar,\
(-)src-probes/GenericArm.probe (-27 / +6 lines)
Lines 3-12 Link Here
3
  <probe>
3
  <probe>
4
    <target className="*" method="doPost" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="exclude"/>
4
    <target className="*" method="doPost" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="exclude"/>
5
    <target className="*" method="doGet" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="exclude"/>
5
    <target className="*" method="doGet" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="exclude"/>
6
    <import text="java.util.Properties"/>
6
    <import text="org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader"/>
7
    <import text="org.eclipse.tptp.trace.arm.internal.model.impl.GenericDataImpl"/>
7
    <import text="org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler"/>
8
    <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentManager"/>
9
    <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider"/>
10
    <fragmentAtClassScope>/**********************************************************************
8
    <fragmentAtClassScope>/**********************************************************************
11
 * Copyright (c) 2006, 2007 IBM Corporation and others.
9
 * Copyright (c) 2006, 2007 IBM Corporation and others.
12
 * All rights reserved.   This program and the accompanying materials
10
 * All rights reserved.   This program and the accompanying materials
Lines 19-61 Link Here
19
 * IBM - Initial API and implementation
17
 * IBM - Initial API and implementation
20
 **********************************************************************/
18
 **********************************************************************/
21
static {
19
static {
22
	Properties p = System.getProperties();
20
	BootClassLoader.init();
23
	String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
24
	InstrumentManager.getInstance().initTransaction(appName);
25
}</fragmentAtClassScope>
21
}</fragmentAtClassScope>
26
    <fragment type="entry">
22
    <fragment type="entry">
27
      <data name="_className" type="className"/>
23
      <data name="_className" type="className"/>
28
      <data name="_methodName" type="methodName"/>
24
      <data name="_methodName" type="methodName"/>
29
      <data name="_thisObject" type="thisObject"/>
25
      <data name="_thisObject" type="thisObject"/>
30
      <data name="_methodArgs" type="args"/>
26
      <data name="_methodArgs" type="args"/>
31
      <code>try {
27
      <code>ProbeHandler._entry(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe&quot;, _className, _methodName, _thisObject, _methodArgs);</code>
32
	InstrumentDataProvider data = new GenericDataImpl();
33
		data.setClassName(_className);
34
		data.setMethodArguments(_methodArgs);
35
		data.setMethodName(_methodName);
36
		data.setObject(_thisObject);
37
		InstrumentManager.getInstance().transactionStart(data);
38
} catch (Throwable t) {
39
		InstrumentManager.getInstance().logException(t, _className, _methodName);
40
}</code>
41
    </fragment>
28
    </fragment>
42
    <fragment type="exit">
29
    <fragment type="exit">
43
      <data name="_className" type="className"/>
30
      <data name="_className" type="className"/>
44
      <data name="_methodName" type="methodName"/>
31
      <data name="_methodName" type="methodName"/>
45
      <code>try {&#xD;
32
      <code>ProbeHandler._exit(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe&quot;, _className, _methodName);</code>
46
	InstrumentManager.getInstance().transactionStop();&#xD;
47
} catch (Throwable t) {&#xD;
48
	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
49
}</code>
50
    </fragment>
33
    </fragment>
51
    <fragment type="catch">
34
    <fragment type="catch">
52
      <data name="_className" type="className"/>
35
      <data name="_className" type="className"/>
53
      <data name="_methodName" type="methodName"/>
36
      <data name="_methodName" type="methodName"/>
54
      <code>try {&#xD;
37
      <code>ProbeHandler._catch(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe&quot;, _className, _methodName);</code>
55
	InstrumentManager.getInstance().transactionStopError();&#xD;
56
} catch (Throwable t) {&#xD;
57
 	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
58
}</code>
59
    </fragment>
38
    </fragment>
60
  </probe>
39
  </probe>
61
</probekit>
40
</probekit>
(-)src-probes/EJB.probe (-26 / +6 lines)
Lines 13-22 Link Here
13
    <target className="*" method="getEJBLocalHome" package="*" signature="*" type="exclude"/>
13
    <target className="*" method="getEJBLocalHome" package="*" signature="*" type="exclude"/>
14
    <target className="*" method="ejbRemove" package="*" signature="*" type="exclude"/>
14
    <target className="*" method="ejbRemove" package="*" signature="*" type="exclude"/>
15
    <target className="*" method="createPrimaryKey" package="*" signature="*" type="exclude"/>
15
    <target className="*" method="createPrimaryKey" package="*" signature="*" type="exclude"/>
16
    <import text="java.util.Properties"/>
16
    <import text="org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader"/>
17
    <import text="org.eclipse.tptp.trace.arm.internal.model.impl.EJBDataImpl"/>
17
    <import text="org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler"/>
18
    <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentManager"/>
19
    <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider"/>
20
    <fragmentAtClassScope>/**********************************************************************&#xD;
18
    <fragmentAtClassScope>/**********************************************************************&#xD;
21
 * Copyright (c) 2006, 2007 IBM Corporation and others.&#xD;
19
 * Copyright (c) 2006, 2007 IBM Corporation and others.&#xD;
22
 * All rights reserved.   This program and the accompanying materials&#xD;
20
 * All rights reserved.   This program and the accompanying materials&#xD;
Lines 29-70 Link Here
29
 * IBM - Initial API and implementation&#xD;
27
 * IBM - Initial API and implementation&#xD;
30
 **********************************************************************/&#xD;
28
 **********************************************************************/&#xD;
31
static {&#xD;
29
static {&#xD;
32
	Properties p = System.getProperties();&#xD;
30
	BootClassLoader.init();&#xD;
33
	String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);&#xD;
34
	InstrumentManager.getInstance().initTransaction(appName);&#xD;
35
}</fragmentAtClassScope>
31
}</fragmentAtClassScope>
36
    <fragment type="entry">
32
    <fragment type="entry">
37
      <data name="_className" type="className"/>
33
      <data name="_className" type="className"/>
38
      <data name="_methodName" type="methodName"/>
34
      <data name="_methodName" type="methodName"/>
39
      <data name="_thisObject" type="thisObject"/>
35
      <data name="_thisObject" type="thisObject"/>
40
      <data name="_methodArgs" type="args"/>
36
      <data name="_methodArgs" type="args"/>
41
      <code>try {&#xD;
37
      <code>ProbeHandler._entry(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe&quot;, _className, _methodName, _thisObject, _methodArgs);</code>
42
InstrumentDataProvider data = new EJBDataImpl();&#xD;
43
	data.setClassName(_className);&#xD;
44
	data.setMethodArguments(_methodArgs);&#xD;
45
	data.setObject(_thisObject);&#xD;
46
	InstrumentManager.getInstance().transactionStart(data);&#xD;
47
} catch (Throwable t) {&#xD;
48
	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
49
}</code>
50
    </fragment>
38
    </fragment>
51
    <fragment type="exit">
39
    <fragment type="exit">
52
      <data name="_className" type="className"/>
40
      <data name="_className" type="className"/>
53
      <data name="_methodName" type="methodName"/>
41
      <data name="_methodName" type="methodName"/>
54
      <code>try {&#xD;
42
      <code>ProbeHandler._exit(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe&quot;, _className, _methodName);</code>
55
	InstrumentManager.getInstance().transactionStop();&#xD;
56
} catch (Throwable t) {&#xD;
57
	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
58
}</code>
59
    </fragment>
43
    </fragment>
60
    <fragment type="catch">
44
    <fragment type="catch">
61
      <data name="_className" type="className"/>
45
      <data name="_className" type="className"/>
62
      <data name="_methodName" type="methodName"/>
46
      <data name="_methodName" type="methodName"/>
63
      <code>try {&#xD;
47
      <code>ProbeHandler._catch(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe&quot;, _className, _methodName);</code>
64
	InstrumentManager.getInstance().transactionStopError();&#xD;
65
} catch (Throwable t) {&#xD;
66
	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
67
}</code>
68
    </fragment>
48
    </fragment>
69
  </probe>
49
  </probe>
70
</probekit>
50
</probekit>
(-)src-probes/JDBC_probe.java (-28 / +7 lines)
Lines 2-11 Link Here
2
/* probekit \org.eclipse.tptp.trace.arm\src-probes\JDBC.probe
2
/* probekit \org.eclipse.tptp.trace.arm\src-probes\JDBC.probe
3
*/
3
*/
4
// "imports" specifications for probes (if any):
4
// "imports" specifications for probes (if any):
5
import java.util.Properties; // from unnamed_probe
5
import org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader; // from unnamed_probe
6
import org.eclipse.tptp.trace.arm.internal.model.impl.JDBCDataImpl; // from unnamed_probe
6
import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler; // from unnamed_probe
7
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; // from unnamed_probe
8
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; // from unnamed_probe
9
class JDBC_probe {
7
class JDBC_probe {
10
  // Class for probe unnamed_probe
8
  // Class for probe unnamed_probe
11
  public static class Probe_0 {
9
  public static class Probe_0 {
Lines 16-30 Link Here
16
 * are made available under the terms of the Eclipse Public License v1.0
14
 * are made available under the terms of the Eclipse Public License v1.0
17
 * which accompanies this distribution, and is available at
15
 * which accompanies this distribution, and is available at
18
 * http://www.eclipse.org/legal/epl-v10.html
16
 * http://www.eclipse.org/legal/epl-v10.html
19
 * $Id: JDBC_probe.java,v 1.3 2007/04/26 14:58:53 mmings Exp $
17
 * $Id: JDBC.probe,v 1.3 2007/04/26 14:58:34 mmings Exp $
20
 * 
18
 * 
21
 * Contributors: 
19
 * Contributors: 
22
 * IBM - Initial API and implementation
20
 * IBM - Initial API and implementation
23
 **********************************************************************/
21
 **********************************************************************/
24
static {
22
static {
25
	Properties p = System.getProperties();
23
	BootClassLoader.init();
26
	String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
27
	InstrumentManager.getInstance().initTransaction(appName);
28
}
24
}
29
    public static void _entry (
25
    public static void _entry (
30
      String /*className*/ _className,
26
      String /*className*/ _className,
Lines 33-48 Link Here
33
      Object[] /*args*/ _methodArgs      ) {
29
      Object[] /*args*/ _methodArgs      ) {
34
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V
30
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V
35
//------------------ begin user-written fragment code ----------------
31
//------------------ begin user-written fragment code ----------------
36
try {
32
ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe", _className, _methodName, _thisObject, _methodArgs);
37
	InstrumentDataProvider data = new JDBCDataImpl();
38
		data.setClassName(_className);
39
		data.setMethodArguments(_methodArgs);
40
		data.setMethodName(_methodName);
41
		data.setObject(_thisObject);
42
		InstrumentManager.getInstance().transactionStart(data);
43
} catch (Throwable t) {
44
	InstrumentManager.getInstance().logException(t, _className, _methodName);
45
}
46
//------------------- end user-written fragment code -----------------
33
//------------------- end user-written fragment code -----------------
47
    }
34
    }
48
    public static void _exit (
35
    public static void _exit (
Lines 50-60 Link Here
50
      String /*methodName*/ _methodName      ) {
37
      String /*methodName*/ _methodName      ) {
51
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
38
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
52
//------------------ begin user-written fragment code ----------------
39
//------------------ begin user-written fragment code ----------------
53
try {
40
ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe", _className, _methodName);
54
	InstrumentManager.getInstance().transactionStop();
55
} catch (Throwable t) {
56
	InstrumentManager.getInstance().logException(t, _className, _methodName);
57
}
58
//------------------- end user-written fragment code -----------------
41
//------------------- end user-written fragment code -----------------
59
    }
42
    }
60
    public static void _catch (
43
    public static void _catch (
Lines 62-72 Link Here
62
      String /*methodName*/ _methodName      ) {
45
      String /*methodName*/ _methodName      ) {
63
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
46
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
64
//------------------ begin user-written fragment code ----------------
47
//------------------ begin user-written fragment code ----------------
65
try {
48
ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe", _className, _methodName);
66
	InstrumentManager.getInstance().transactionStopError();
67
} catch (Throwable t) {
68
	InstrumentManager.getInstance().logException(t, _className, _methodName);
69
}
70
//------------------- end user-written fragment code -----------------
49
//------------------- end user-written fragment code -----------------
71
    }
50
    }
72
  }
51
  }
(-)src-probes/Servlet.probe (-29 / +6 lines)
Lines 4-14 Link Here
4
    <target className="*" method="doPost" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="include"/>
4
    <target className="*" method="doPost" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="include"/>
5
    <target className="*" method="doGet" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="include"/>
5
    <target className="*" method="doGet" package="*" signature="(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V" type="include"/>
6
    <target className="*" method="*" package="*" signature="*" type="exclude"/>
6
    <target className="*" method="*" package="*" signature="*" type="exclude"/>
7
    <import text="java.util.Properties"/>
7
    <import text="org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader"/>
8
    <import text="org.eclipse.tptp.trace.arm.internal.model.impl.ServletDataImpl"/>
8
    <import text="org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler"/>
9
    <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentManager"/>
10
    <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider"/>
11
    <import text="org.eclipse.tptp.trace.arm.internal.model.TransactionUtil"/>
12
    <fragmentAtClassScope>/**********************************************************************&#xD;
9
    <fragmentAtClassScope>/**********************************************************************&#xD;
13
 * Copyright (c) 2006, 2007 IBM Corporation and others.&#xD;
10
 * Copyright (c) 2006, 2007 IBM Corporation and others.&#xD;
14
 * All rights reserved.   This program and the accompanying materials&#xD;
11
 * All rights reserved.   This program and the accompanying materials&#xD;
Lines 21-64 Link Here
21
 * IBM - Initial API and implementation&#xD;
18
 * IBM - Initial API and implementation&#xD;
22
 **********************************************************************/&#xD;
19
 **********************************************************************/&#xD;
23
static {&#xD;
20
static {&#xD;
24
	Properties p = System.getProperties();&#xD;
21
	BootClassLoader.init();&#xD;
25
	String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);&#xD;
26
	InstrumentManager.getInstance().initTransaction(appName);&#xD;
27
}</fragmentAtClassScope>
22
}</fragmentAtClassScope>
28
    <fragment type="entry">
23
    <fragment type="entry">
29
      <data name="_className" type="className"/>
24
      <data name="_className" type="className"/>
30
      <data name="_methodName" type="methodName"/>
25
      <data name="_methodName" type="methodName"/>
31
      <data name="_thisObject" type="thisObject"/>
26
      <data name="_thisObject" type="thisObject"/>
32
      <data name="_methodArgs" type="args"/>
27
      <data name="_methodArgs" type="args"/>
33
      <code>try {&#xD;
28
      <code>ProbeHandler._entry(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe&quot;, _className, _methodName, _thisObject, _methodArgs);</code>
34
InstrumentDataProvider data = new ServletDataImpl();&#xD;
35
		data.setClassName(_className);&#xD;
36
		data.setMethodArguments(_methodArgs);&#xD;
37
		data.setMethodName(_methodName);&#xD;
38
		data.setObject(_thisObject);&#xD;
39
		data.setCorrelator(TransactionUtil.parentCorrelatorFromRequest(data));&#xD;
40
		InstrumentManager.getInstance().transactionStart(data);&#xD;
41
} catch (Throwable t) {&#xD;
42
		InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
43
}</code>
44
    </fragment>
29
    </fragment>
45
    <fragment type="exit">
30
    <fragment type="exit">
46
      <data name="_className" type="className"/>
31
      <data name="_className" type="className"/>
47
      <data name="_methodName" type="methodName"/>
32
      <data name="_methodName" type="methodName"/>
48
      <code>try {&#xD;
33
      <code>ProbeHandler._exit(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe&quot;, _className, _methodName);</code>
49
	InstrumentManager.getInstance().transactionStop();&#xD;
50
} catch (Throwable t) {&#xD;
51
	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
52
}</code>
53
    </fragment>
34
    </fragment>
54
    <fragment type="catch">
35
    <fragment type="catch">
55
      <data name="_className" type="className"/>
36
      <data name="_className" type="className"/>
56
      <data name="_methodName" type="methodName"/>
37
      <data name="_methodName" type="methodName"/>
57
      <code>try {&#xD;
38
      <code>ProbeHandler._catch(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe&quot;, _className, _methodName);</code>
58
	InstrumentManager.getInstance().transactionStopError();&#xD;
59
} catch (Throwable t) {&#xD;
60
	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
61
}</code>
62
    </fragment>
39
    </fragment>
63
  </probe>
40
  </probe>
64
</probekit>
41
</probekit>
(-)src-probes/EJB_probe.java (-27 / +7 lines)
Lines 4-13 Link Here
4
Version: 4.3
4
Version: 4.3
5
*/
5
*/
6
// "imports" specifications for probes (if any):
6
// "imports" specifications for probes (if any):
7
import java.util.Properties; // from unnamed_probe
7
import org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader; // from unnamed_probe
8
import org.eclipse.tptp.trace.arm.internal.model.impl.EJBDataImpl; // from unnamed_probe
8
import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler; // from unnamed_probe
9
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; // from unnamed_probe
10
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; // from unnamed_probe
11
class EJB_probe {
9
class EJB_probe {
12
  // Class for probe unnamed_probe
10
  // Class for probe unnamed_probe
13
  public static class Probe_0 {
11
  public static class Probe_0 {
Lines 18-32 Link Here
18
 * are made available under the terms of the Eclipse Public License v1.0
16
 * are made available under the terms of the Eclipse Public License v1.0
19
 * which accompanies this distribution, and is available at
17
 * which accompanies this distribution, and is available at
20
 * http://www.eclipse.org/legal/epl-v10.html
18
 * http://www.eclipse.org/legal/epl-v10.html
21
 * $Id: EJB_probe.java,v 1.4 2007/04/26 14:58:53 mmings Exp $
19
 * $Id: EJB.probe,v 1.5 2007/04/26 14:58:34 mmings Exp $
22
 * 
20
 * 
23
 * Contributors: 
21
 * Contributors: 
24
 * IBM - Initial API and implementation
22
 * IBM - Initial API and implementation
25
 **********************************************************************/
23
 **********************************************************************/
26
static {
24
static {
27
	Properties p = System.getProperties();
25
	BootClassLoader.init();
28
	String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
29
	InstrumentManager.getInstance().initTransaction(appName);
30
}
26
}
31
    public static void _entry (
27
    public static void _entry (
32
      String /*className*/ _className,
28
      String /*className*/ _className,
Lines 35-49 Link Here
35
      Object[] /*args*/ _methodArgs      ) {
31
      Object[] /*args*/ _methodArgs      ) {
36
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V
32
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V
37
//------------------ begin user-written fragment code ----------------
33
//------------------ begin user-written fragment code ----------------
38
try {
34
ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe", _className, _methodName, _thisObject, _methodArgs);
39
InstrumentDataProvider data = new EJBDataImpl();
40
	data.setClassName(_className);
41
	data.setMethodArguments(_methodArgs);
42
	data.setObject(_thisObject);
43
	InstrumentManager.getInstance().transactionStart(data);
44
} catch (Throwable t) {
45
	InstrumentManager.getInstance().logException(t, _className, _methodName);
46
}
47
//------------------- end user-written fragment code -----------------
35
//------------------- end user-written fragment code -----------------
48
    }
36
    }
49
    public static void _exit (
37
    public static void _exit (
Lines 51-61 Link Here
51
      String /*methodName*/ _methodName      ) {
39
      String /*methodName*/ _methodName      ) {
52
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
40
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
53
//------------------ begin user-written fragment code ----------------
41
//------------------ begin user-written fragment code ----------------
54
try {
42
ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe", _className, _methodName);
55
	InstrumentManager.getInstance().transactionStop();
56
} catch (Throwable t) {
57
	InstrumentManager.getInstance().logException(t, _className, _methodName);
58
}
59
//------------------- end user-written fragment code -----------------
43
//------------------- end user-written fragment code -----------------
60
    }
44
    }
61
    public static void _catch (
45
    public static void _catch (
Lines 63-73 Link Here
63
      String /*methodName*/ _methodName      ) {
47
      String /*methodName*/ _methodName      ) {
64
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
48
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
65
//------------------ begin user-written fragment code ----------------
49
//------------------ begin user-written fragment code ----------------
66
try {
50
ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.EJBProbe", _className, _methodName);
67
	InstrumentManager.getInstance().transactionStopError();
68
} catch (Throwable t) {
69
	InstrumentManager.getInstance().logException(t, _className, _methodName);
70
}
71
//------------------- end user-written fragment code -----------------
51
//------------------- end user-written fragment code -----------------
72
    }
52
    }
73
  }
53
  }
(-)src-probes/GenericArm_probe.java (-28 / +7 lines)
Lines 4-13 Link Here
4
Version: 4.3
4
Version: 4.3
5
*/
5
*/
6
// "imports" specifications for probes (if any):
6
// "imports" specifications for probes (if any):
7
import java.util.Properties; // from unnamed_probe
7
import org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader; // from unnamed_probe
8
import org.eclipse.tptp.trace.arm.internal.model.impl.GenericDataImpl; // from unnamed_probe
8
import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler; // from unnamed_probe
9
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; // from unnamed_probe
10
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; // from unnamed_probe
11
class GenericArm_probe {
9
class GenericArm_probe {
12
  // Class for probe unnamed_probe
10
  // Class for probe unnamed_probe
13
  public static class Probe_0 {
11
  public static class Probe_0 {
Lines 18-32 Link Here
18
 * are made available under the terms of the Eclipse Public License v1.0
16
 * are made available under the terms of the Eclipse Public License v1.0
19
 * which accompanies this distribution, and is available at
17
 * which accompanies this distribution, and is available at
20
 * http://www.eclipse.org/legal/epl-v10.html
18
 * http://www.eclipse.org/legal/epl-v10.html
21
 * $Id: GenericArm_probe.java,v 1.6 2007/04/26 14:58:54 mmings Exp $
19
 * $Id: GenericArm.probe,v 1.7 2007/04/26 14:58:34 mmings Exp $
22
 * 
20
 * 
23
 * Contributors: 
21
 * Contributors: 
24
 * IBM - Initial API and implementation
22
 * IBM - Initial API and implementation
25
 **********************************************************************/
23
 **********************************************************************/
26
static {
24
static {
27
	Properties p = System.getProperties();
25
	BootClassLoader.init();
28
	String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
29
	InstrumentManager.getInstance().initTransaction(appName);
30
}
26
}
31
    public static void _entry (
27
    public static void _entry (
32
      String /*className*/ _className,
28
      String /*className*/ _className,
Lines 35-50 Link Here
35
      Object[] /*args*/ _methodArgs      ) {
31
      Object[] /*args*/ _methodArgs      ) {
36
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V
32
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V
37
//------------------ begin user-written fragment code ----------------
33
//------------------ begin user-written fragment code ----------------
38
try {
34
ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe", _className, _methodName, _thisObject, _methodArgs);
39
	InstrumentDataProvider data = new GenericDataImpl();
40
		data.setClassName(_className);
41
		data.setMethodArguments(_methodArgs);
42
		data.setMethodName(_methodName);
43
		data.setObject(_thisObject);
44
		InstrumentManager.getInstance().transactionStart(data);
45
} catch (Throwable t) {
46
		InstrumentManager.getInstance().logException(t, _className, _methodName);
47
}
48
//------------------- end user-written fragment code -----------------
35
//------------------- end user-written fragment code -----------------
49
    }
36
    }
50
    public static void _exit (
37
    public static void _exit (
Lines 52-62 Link Here
52
      String /*methodName*/ _methodName      ) {
39
      String /*methodName*/ _methodName      ) {
53
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
40
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
54
//------------------ begin user-written fragment code ----------------
41
//------------------ begin user-written fragment code ----------------
55
try {
42
ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe", _className, _methodName);
56
	InstrumentManager.getInstance().transactionStop();
57
} catch (Throwable t) {
58
	InstrumentManager.getInstance().logException(t, _className, _methodName);
59
}
60
//------------------- end user-written fragment code -----------------
43
//------------------- end user-written fragment code -----------------
61
    }
44
    }
62
    public static void _catch (
45
    public static void _catch (
Lines 64-74 Link Here
64
      String /*methodName*/ _methodName      ) {
47
      String /*methodName*/ _methodName      ) {
65
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
48
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
66
//------------------ begin user-written fragment code ----------------
49
//------------------ begin user-written fragment code ----------------
67
try {
50
ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.GenericProbe", _className, _methodName);
68
	InstrumentManager.getInstance().transactionStopError();
69
} catch (Throwable t) {
70
 	InstrumentManager.getInstance().logException(t, _className, _methodName);
71
}
72
//------------------- end user-written fragment code -----------------
51
//------------------- end user-written fragment code -----------------
73
    }
52
    }
74
  }
53
  }
(-)src-probes/JDBC.probe (-27 / +6 lines)
Lines 1-10 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<probekit>
2
<probekit>
3
  <probe>
3
  <probe>
4
    <import text="java.util.Properties"/>
4
    <import text="org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader"/>
5
    <import text="org.eclipse.tptp.trace.arm.internal.model.impl.JDBCDataImpl"/>
5
    <import text="org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler"/>
6
    <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentManager"/>
7
    <import text="org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider"/>
8
    <fragmentAtClassScope>/**********************************************************************&#xD;
6
    <fragmentAtClassScope>/**********************************************************************&#xD;
9
 * Copyright (c) 2006, 2007 IBM Corporation and others.&#xD;
7
 * Copyright (c) 2006, 2007 IBM Corporation and others.&#xD;
10
 * All rights reserved.   This program and the accompanying materials&#xD;
8
 * All rights reserved.   This program and the accompanying materials&#xD;
Lines 17-59 Link Here
17
 * IBM - Initial API and implementation&#xD;
15
 * IBM - Initial API and implementation&#xD;
18
 **********************************************************************/&#xD;
16
 **********************************************************************/&#xD;
19
static {&#xD;
17
static {&#xD;
20
	Properties p = System.getProperties();&#xD;
18
	BootClassLoader.init();&#xD;
21
	String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);&#xD;
22
	InstrumentManager.getInstance().initTransaction(appName);&#xD;
23
}</fragmentAtClassScope>
19
}</fragmentAtClassScope>
24
    <fragment type="entry">
20
    <fragment type="entry">
25
      <data name="_className" type="className"/>
21
      <data name="_className" type="className"/>
26
      <data name="_methodName" type="methodName"/>
22
      <data name="_methodName" type="methodName"/>
27
      <data name="_thisObject" type="thisObject"/>
23
      <data name="_thisObject" type="thisObject"/>
28
      <data name="_methodArgs" type="args"/>
24
      <data name="_methodArgs" type="args"/>
29
      <code>try {&#xD;
25
      <code>ProbeHandler._entry(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe&quot;, _className, _methodName, _thisObject, _methodArgs);</code>
30
	InstrumentDataProvider data = new JDBCDataImpl();&#xD;
31
		data.setClassName(_className);&#xD;
32
		data.setMethodArguments(_methodArgs);&#xD;
33
		data.setMethodName(_methodName);&#xD;
34
		data.setObject(_thisObject);&#xD;
35
		InstrumentManager.getInstance().transactionStart(data);&#xD;
36
} catch (Throwable t) {&#xD;
37
	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
38
}</code>
39
    </fragment>
26
    </fragment>
40
    <fragment type="exit">
27
    <fragment type="exit">
41
      <data name="_className" type="className"/>
28
      <data name="_className" type="className"/>
42
      <data name="_methodName" type="methodName"/>
29
      <data name="_methodName" type="methodName"/>
43
      <code>try {&#xD;
30
      <code>ProbeHandler._exit(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe&quot;, _className, _methodName);</code>
44
	InstrumentManager.getInstance().transactionStop();&#xD;
45
} catch (Throwable t) {&#xD;
46
	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
47
}</code>
48
    </fragment>
31
    </fragment>
49
    <fragment type="catch">
32
    <fragment type="catch">
50
      <data name="_className" type="className"/>
33
      <data name="_className" type="className"/>
51
      <data name="_methodName" type="methodName"/>
34
      <data name="_methodName" type="methodName"/>
52
      <code>try {&#xD;
35
      <code>ProbeHandler._catch(&quot;org.eclipse.tptp.trace.arm.internal.model.probes.JDBCProbe&quot;, _className, _methodName);</code>
53
	InstrumentManager.getInstance().transactionStopError();&#xD;
54
} catch (Throwable t) {&#xD;
55
	InstrumentManager.getInstance().logException(t, _className, _methodName);&#xD;
56
}</code>
57
    </fragment>
36
    </fragment>
58
  </probe>
37
  </probe>
59
</probekit>
38
</probekit>
(-)src-probes/Servlet_probe.java (-30 / +7 lines)
Lines 4-14 Link Here
4
Version: 4.3
4
Version: 4.3
5
*/
5
*/
6
// "imports" specifications for probes (if any):
6
// "imports" specifications for probes (if any):
7
import java.util.Properties; // from unnamed_probe
7
import org.eclipse.tptp.trace.arm.internal.loader.BootClassLoader; // from unnamed_probe
8
import org.eclipse.tptp.trace.arm.internal.model.impl.ServletDataImpl; // from unnamed_probe
8
import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler; // from unnamed_probe
9
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager; // from unnamed_probe
10
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider; // from unnamed_probe
11
import org.eclipse.tptp.trace.arm.internal.model.TransactionUtil; // from unnamed_probe
12
class Servlet_probe {
9
class Servlet_probe {
13
  // Class for probe unnamed_probe
10
  // Class for probe unnamed_probe
14
  public static class Probe_0 {
11
  public static class Probe_0 {
Lines 19-33 Link Here
19
 * are made available under the terms of the Eclipse Public License v1.0
16
 * are made available under the terms of the Eclipse Public License v1.0
20
 * which accompanies this distribution, and is available at
17
 * which accompanies this distribution, and is available at
21
 * http://www.eclipse.org/legal/epl-v10.html
18
 * http://www.eclipse.org/legal/epl-v10.html
22
 * $Id: Servlet_probe.java,v 1.5 2007/04/26 14:58:54 mmings Exp $
19
 * $Id: Servlet.probe,v 1.6 2007/04/26 14:58:34 mmings Exp $
23
 * 
20
 * 
24
 * Contributors: 
21
 * Contributors: 
25
 * IBM - Initial API and implementation
22
 * IBM - Initial API and implementation
26
 **********************************************************************/
23
 **********************************************************************/
27
static {
24
static {
28
	Properties p = System.getProperties();
25
	BootClassLoader.init();
29
	String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
30
	InstrumentManager.getInstance().initTransaction(appName);
31
}
26
}
32
    public static void _entry (
27
    public static void _entry (
33
      String /*className*/ _className,
28
      String /*className*/ _className,
Lines 36-52 Link Here
36
      Object[] /*args*/ _methodArgs      ) {
31
      Object[] /*args*/ _methodArgs      ) {
37
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V
32
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)V
38
//------------------ begin user-written fragment code ----------------
33
//------------------ begin user-written fragment code ----------------
39
try {
34
ProbeHandler._entry("org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe", _className, _methodName, _thisObject, _methodArgs);
40
InstrumentDataProvider data = new ServletDataImpl();
41
		data.setClassName(_className);
42
		data.setMethodArguments(_methodArgs);
43
		data.setMethodName(_methodName);
44
		data.setObject(_thisObject);
45
		data.setCorrelator(TransactionUtil.parentCorrelatorFromRequest(data));
46
		InstrumentManager.getInstance().transactionStart(data);
47
} catch (Throwable t) {
48
		InstrumentManager.getInstance().logException(t, _className, _methodName);
49
}
50
//------------------- end user-written fragment code -----------------
35
//------------------- end user-written fragment code -----------------
51
    }
36
    }
52
    public static void _exit (
37
    public static void _exit (
Lines 54-64 Link Here
54
      String /*methodName*/ _methodName      ) {
39
      String /*methodName*/ _methodName      ) {
55
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
40
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
56
//------------------ begin user-written fragment code ----------------
41
//------------------ begin user-written fragment code ----------------
57
try {
42
ProbeHandler._exit("org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe", _className, _methodName);
58
	InstrumentManager.getInstance().transactionStop();
59
} catch (Throwable t) {
60
	InstrumentManager.getInstance().logException(t, _className, _methodName);
61
}
62
//------------------- end user-written fragment code -----------------
43
//------------------- end user-written fragment code -----------------
63
    }
44
    }
64
    public static void _catch (
45
    public static void _catch (
Lines 66-76 Link Here
66
      String /*methodName*/ _methodName      ) {
47
      String /*methodName*/ _methodName      ) {
67
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
48
      // Internal signature for this method: (Ljava/lang/String;Ljava/lang/String;)V
68
//------------------ begin user-written fragment code ----------------
49
//------------------ begin user-written fragment code ----------------
69
try {
50
ProbeHandler._catch("org.eclipse.tptp.trace.arm.internal.model.probes.ServletProbe", _className, _methodName);
70
	InstrumentManager.getInstance().transactionStopError();
71
} catch (Throwable t) {
72
	InstrumentManager.getInstance().logException(t, _className, _methodName);
73
}
74
//------------------- end user-written fragment code -----------------
51
//------------------- end user-written fragment code -----------------
75
    }
52
    }
76
  }
53
  }
(-)src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmCorrelatorImpl.java (-1 / +1 lines)
Lines 79-85 Link Here
79
79
80
		_buffer.append("<ArmCorrleator"); //$NON-NLS-1$
80
		_buffer.append("<ArmCorrleator"); //$NON-NLS-1$
81
		_buffer.append(" length=\""+_length+"\""); //$NON-NLS-1$ //$NON-NLS-2$
81
		_buffer.append(" length=\""+_length+"\""); //$NON-NLS-1$ //$NON-NLS-2$
82
		_buffer.append(" format=\""+_format+"\""); //$NON-NLS-1$ //$NON-NLS-2$
82
		_buffer.append(" format=\""+ (0xFF &_format) +"\""); //$NON-NLS-1$ //$NON-NLS-2$
83
		_buffer.append(" isAgentTrace=\""+isAgentTrace()+"\""); //$NON-NLS-1$ //$NON-NLS-2$
83
		_buffer.append(" isAgentTrace=\""+isAgentTrace()+"\""); //$NON-NLS-1$ //$NON-NLS-2$
84
		_buffer.append(" isApplicationTrace=\""+isApplicationTrace()+"\""); //$NON-NLS-1$ //$NON-NLS-2$
84
		_buffer.append(" isApplicationTrace=\""+isApplicationTrace()+"\""); //$NON-NLS-1$ //$NON-NLS-2$
85
		_buffer.append(" />"); //$NON-NLS-1$
85
		_buffer.append(" />"); //$NON-NLS-1$
(-)src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmIdentityPropertiesImpl.java (-1 / +1 lines)
Lines 235-241 Link Here
235
			} else if (index >= _contextProperties.size()) {
235
			} else if (index >= _contextProperties.size()) {
236
				return null;
236
				return null;
237
			} else {
237
			} else {
238
				return ((ArmIdentityProperty) _contextProperties.get(index)).getValue();
238
				return ((ArmContextProperty) _contextProperties.get(index)).getValue();
239
			}
239
			}
240
		}
240
		}
241
		return null;
241
		return null;
(-)src-arm/org/eclipse/tptp/trace/arm/internal/transaction/ArmTransactionImpl.java (-1 / +22 lines)
Lines 93-98 Link Here
93
93
94
	protected String _contextURIValue;
94
	protected String _contextURIValue;
95
95
96
	private boolean _isRemoteInvocation = false;
97
96
	private static IAgentMetadata _agentMetaData;
98
	private static IAgentMetadata _agentMetaData;
97
99
98
	static {
100
	static {
Lines 354-359 Link Here
354
356
355
	}
357
	}
356
 
358
 
359
	/**
360
	 * Indicates if this transaction was invoked by a remote method invocation
361
	 * 
362
	 * @return
363
	 */
364
	private boolean isRemoteInvocation() {
365
		// TODO: Optimize this routine - too much string-age.
366
		if (_contextProperties != null) {
367
			String[] contextValues = ((ArmIdentityPropertiesImpl) _contextProperties).getContextValues();
368
			for(int i=0; i < contextValues.length; i++) {
369
				if (contextValues[i].equalsIgnoreCase("RMI-IIOP")) {
370
					_isRemoteInvocation = true;
371
					break;
372
				}
373
			}
374
		}
375
		return _isRemoteInvocation;
376
	}
377
	
357
	/*
378
	/*
358
	 * (non-Javadoc)
379
	 * (non-Javadoc)
359
	 * 
380
	 * 
Lines 370-376 Link Here
370
		 * 
391
		 * 
371
		 * TODO: Do we need to check for a _status in order to execute start?
392
		 * TODO: Do we need to check for a _status in order to execute start?
372
		 */
393
		 */
373
		if (getAgentMetaData().isClientMonitoring()) {
394
		if (getAgentMetaData().isClientMonitoring() || isRemoteInvocation()) {
374
			/* Record the thread we're bound to */
395
			/* Record the thread we're bound to */
375
			_transactionStartThreadId = Thread.currentThread().hashCode();
396
			_transactionStartThreadId = Thread.currentThread().hashCode();
376
			bindThread();
397
			bindThread();
(-)src-arm-core/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelator.java (-3 / +3 lines)
Lines 70-81 Link Here
70
	/*
70
	/*
71
	 * Correlator format ID.
71
	 * Correlator format ID.
72
	 */
72
	 */
73
	static final int CORRELATOR_FORMAT = 200;
73
	static final byte CORRELATOR_FORMAT = (byte) 0xC8; // 200 - this is unsigned so make sure you do "0xFF & FORMAT_VALUE"
74
	
74
	
75
	/*
75
	/*
76
	 * Correlator flags.
76
	 * Correlator flags.
77
	 */
77
	 */
78
	static final int CORRELATOR_FLAGS = 0;
78
	static final byte CORRELATOR_FLAGS = 0;
79
	
79
	
80
	/*
80
	/*
81
	 * Number of bytes the header (length, flags, and format) bits take.
81
	 * Number of bytes the header (length, flags, and format) bits take.
Lines 114-120 Link Here
114
114
115
	/* Number of bytes that a long number occupies */
115
	/* Number of bytes that a long number occupies */
116
	static final int CORRELATOR_LONG = 8;
116
	static final int CORRELATOR_LONG = 8;
117
117
	
118
	/**
118
	/**
119
	 * Returns the machine identification tag.
119
	 * Returns the machine identification tag.
120
	 * 
120
	 * 
(-)src-model/org/eclipse/tptp/trace/arm/internal/model/impl/IIOPDataImpl.java (+22 lines)
Lines 11-16 Link Here
11
11
12
package org.eclipse.tptp.trace.arm.internal.model.impl;
12
package org.eclipse.tptp.trace.arm.internal.model.impl;
13
13
14
import java.util.ArrayList;
15
14
16
15
/**
17
/**
16
 * IIOPDataImpl is responsible for wrapping several pieces of data related
18
 * IIOPDataImpl is responsible for wrapping several pieces of data related
Lines 29-35 Link Here
29
	public static final String CONTEXT_NAME_IIOP_LOCAL_PORT = "IIOPLocalPort";
31
	public static final String CONTEXT_NAME_IIOP_LOCAL_PORT = "IIOPLocalPort";
30
32
31
	private static final String[] CONTEXT_NAMES = {
33
	private static final String[] CONTEXT_NAMES = {
34
		CONTEXT_NAME_COMPONENT
32
	};
35
	};
36
37
	/**
38
	 * Returns a string array of context name types.
39
	 */
40
	public String[] getContextTypes() {
41
		return CONTEXT_NAMES;
42
	}
43
44
	/**
45
	 * Returns a string array of context values
46
	 */
47
	public String[] getContextValues() {
48
		ArrayList contextValues = new ArrayList();
49
		contextValues.add("RMI-IIOP");
50
		
51
		String[] strContextValues = new String[CONTEXT_NAMES.length];
52
		System.arraycopy(contextValues.toArray(), 0, strContextValues, 0, contextValues.toArray().length);
53
		return strContextValues;
54
	}
33
	
55
	
34
	/**
56
	/**
35
	 * Returns the trascation object type.
57
	 * Returns the trascation object type.
(-)src-arm/org/eclipse/tptp/trace/arm/internal/correlator/TPTPArmCorrelatorImpl.java (-4 / +3 lines)
Lines 18-24 Link Here
18
18
19
import org.eclipse.tptp.trace.arm.internal.agent.AgentFacade;
19
import org.eclipse.tptp.trace.arm.internal.agent.AgentFacade;
20
import org.eclipse.tptp.trace.arm.internal.agent.IAgentMetadata;
20
import org.eclipse.tptp.trace.arm.internal.agent.IAgentMetadata;
21
import org.eclipse.tptp.trace.arm.internal.correlator.TPTPArmCorrelator;
22
import org.eclipse.tptp.trace.arm.internal.transaction.ArmCorrelatorImpl;
21
import org.eclipse.tptp.trace.arm.internal.transaction.ArmCorrelatorImpl;
23
import org.eclipse.tptp.trace.arm.internal.util.Convert;
22
import org.eclipse.tptp.trace.arm.internal.util.Convert;
24
23
Lines 368-375 Link Here
368
		 * Parse generic correlator format.
367
		 * Parse generic correlator format.
369
		 */
368
		 */
370
		_length = dataBuffer.getShort();
369
		_length = dataBuffer.getShort();
371
		_format = (int) dataBuffer.get();
370
		_format = 0xFF & (byte) dataBuffer.get();
372
		_flags = (int) dataBuffer.get();
371
		_flags = (byte) dataBuffer.get();
373
372
374
		/*
373
		/*
375
		 * Populate TPTP Correlator Specifics.
374
		 * Populate TPTP Correlator Specifics.
Lines 528-534 Link Here
528
527
529
		_buffer.append("<TPTPArmCorrleator"); //$NON-NLS-1$
528
		_buffer.append("<TPTPArmCorrleator"); //$NON-NLS-1$
530
		_buffer.append(" length=\"" + _length + "\""); //$NON-NLS-1$ //$NON-NLS-2$
529
		_buffer.append(" length=\"" + _length + "\""); //$NON-NLS-1$ //$NON-NLS-2$
531
		_buffer.append(" format=\"" + _format + "\""); //$NON-NLS-1$ //$NON-NLS-2$
530
		_buffer.append(" format=\"" + (0xFF & _format) + "\""); //$NON-NLS-1$ //$NON-NLS-2$
532
		_buffer.append(" isAgentTrace=\"" + isAgentTrace() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
531
		_buffer.append(" isAgentTrace=\"" + isAgentTrace() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
533
		_buffer.append(" isApplicationTrace=\"" + isApplicationTrace() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
532
		_buffer.append(" isApplicationTrace=\"" + isApplicationTrace() + "\""); //$NON-NLS-1$ //$NON-NLS-2$
534
		_buffer.append(" threadId=\"" + _threadId + "\""); //$NON-NLS-1$ //$NON-NLS-2$
533
		_buffer.append(" threadId=\"" + _threadId + "\""); //$NON-NLS-1$ //$NON-NLS-2$
(-)src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java (-212 lines)
Removed Link Here
1
/**********************************************************************
2
 * Copyright (c) 2006 IBM Corporation and others.
3
 * All rights reserved.   This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors: 
9
 * IBM - Initial API and implementation
10
 ***********************************************************************/
11
12
13
package org.eclipse.tptp.trace.arm.internal.model.iiop;
14
15
import java.util.Properties;
16
17
import org.eclipse.tptp.trace.arm.internal.correlator.TPTPArmCorrelatorImpl;
18
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider;
19
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager;
20
import org.eclipse.tptp.trace.arm.internal.model.impl.IIOPDataImpl;
21
import org.omg.CORBA.LocalObject;
22
import org.omg.IOP.ServiceContext;
23
import org.omg.PortableInterceptor.ClientRequestInfo;
24
import org.omg.PortableInterceptor.ClientRequestInterceptor;
25
import org.omg.PortableInterceptor.ForwardRequest;
26
import org.omg.PortableInterceptor.ORBInitInfo;
27
import org.omg.PortableInterceptor.ORBInitializer;
28
import org.omg.PortableInterceptor.ServerRequestInfo;
29
import org.omg.PortableInterceptor.ServerRequestInterceptor;
30
import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName;
31
import org.opengroup.arm40.transaction.ArmCorrelator;
32
33
import com.ibm.CORBA.iiop.ExtendedORBInitInfo;
34
35
/**
36
 * The request interceptor responsible for transmitting the ARM correlator 
37
 * between machines when the IIOP calls are made. 
38
 * 
39
 * @author TPTP Development Team
40
 * @since TPTP 4.2.1
41
 */
42
public class ArmRequestInterceptor extends LocalObject implements
43
		ORBInitializer, ClientRequestInterceptor, ServerRequestInterceptor {
44
45
	private static final long serialVersionUID = -73971998689011509L;
46
47
	public static final int SERVICE_ID = 0x49424d1e;
48
49
	private static final String CLASS = ArmRequestInterceptor.class.getName();
50
	
51
	/*
52
	 * (non-Javadoc)
53
	 * @see org.omg.PortableInterceptor.ORBInitializerOperations#post_init(org.omg.PortableInterceptor.ORBInitInfo)
54
	 */
55
	public void post_init(ORBInitInfo arg0) {
56
	}
57
58
	/*
59
	 * (non-Javadoc)
60
	 * @see org.omg.PortableInterceptor.ORBInitializerOperations#pre_init(org.omg.PortableInterceptor.ORBInitInfo)
61
	 */
62
	public void pre_init(ORBInitInfo info) {
63
		try {
64
			((ExtendedORBInitInfo) info).add_server_request_interceptor(this,
65
					false);
66
			((ExtendedORBInitInfo) info).add_client_request_interceptor(this,
67
					false);
68
69
			/* Set the ARM Application name */
70
			Properties p = System.getProperties();
71
			String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
72
			InstrumentManager.getInstance().initTransaction(appName);
73
		} catch (DuplicateName e) {
74
			// following should appear in WebSphere's SystemErr.log file. 
75
			e.printStackTrace();
76
		}
77
	}
78
79
	/*
80
	 * (non-Javadoc)
81
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_exception(org.omg.PortableInterceptor.ClientRequestInfo)
82
	 */
83
	public void receive_exception(ClientRequestInfo arg0) throws ForwardRequest {
84
	}
85
86
	/*
87
	 * (non-Javadoc)
88
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_other(org.omg.PortableInterceptor.ClientRequestInfo)
89
	 */
90
	public void receive_other(ClientRequestInfo arg0) throws ForwardRequest {
91
	}
92
93
	/*
94
	 * (non-Javadoc)
95
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_reply(org.omg.PortableInterceptor.ClientRequestInfo)
96
	 */
97
	public void receive_reply(ClientRequestInfo arg0) {
98
	}
99
100
	/*
101
	 * (non-Javadoc)
102
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#send_poll(org.omg.PortableInterceptor.ClientRequestInfo)
103
	 */
104
	public void send_poll(ClientRequestInfo arg0) {
105
	}
106
107
	/*
108
	 * (non-Javadoc)
109
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#send_request(org.omg.PortableInterceptor.ClientRequestInfo)
110
	 */
111
	public void send_request(ClientRequestInfo ri) throws ForwardRequest {
112
113
		/* Get the Arm Correlator */
114
115
		ArmCorrelator correlator = InstrumentManager.getInstance()
116
				.getCorrelator();
117
		InstrumentDataProvider data = new IIOPDataImpl();
118
		data.setClassName(ri.effective_target().getClass().getName());
119
		data.setMethodArguments(null);
120
		data.setMethodName(ri.operation());
121
		data.setObject(ri);
122
		data.setCorrelator(correlator); 
123
124
		/* Need to start the transaction coming in */
125
		correlator = InstrumentManager.getInstance().transactionStart(data);
126
127
		if (correlator != null) {
128
			ServiceContext serviceContext = new ServiceContext(SERVICE_ID,
129
					correlator.getBytes());
130
			ri.add_request_service_context(serviceContext, false);
131
		}
132
133
		if (!ri.response_expected()) {
134
			InstrumentManager.getInstance().transactionStop();
135
		}
136
137
	}
138
139
	/*
140
	 * (non-Javadoc)
141
	 * @see org.omg.PortableInterceptor.InterceptorOperations#destroy()
142
	 */
143
	public void destroy() {
144
	}
145
146
	/*
147
	 * (non-Javadoc)
148
	 * @see org.omg.PortableInterceptor.InterceptorOperations#name()
149
	 */
150
	public String name() {
151
		return CLASS;
152
	}
153
154
	/*
155
	 * (non-Javadoc)
156
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#receive_request(org.omg.PortableInterceptor.ServerRequestInfo)
157
	 */
158
	public void receive_request(ServerRequestInfo arg0) throws ForwardRequest {
159
		byte[] corBytes = null;
160
		ArmCorrelator correlator;
161
		try {
162
			corBytes = arg0.get_request_service_context(SERVICE_ID).context_data;
163
			correlator = new TPTPArmCorrelatorImpl(corBytes, 0);
164
		} catch (Exception e) {
165
			return;
166
		}
167
168
		if (corBytes != null) {
169
			InstrumentDataProvider data = new IIOPDataImpl();
170
			data.setClassName(arg0.getClass().getName());
171
			data.setMethodArguments(null);
172
			data.setMethodName(arg0.operation());
173
			data.setObject(arg0);
174
			data.setCorrelator(correlator);
175
			InstrumentManager.getInstance().transactionStart(data);
176
177
			if (!arg0.response_expected()) {
178
				InstrumentManager.getInstance().transactionStop();
179
			}
180
		}
181
	}
182
183
	/*
184
	 * (non-Javadoc)
185
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#receive_request_service_contexts(org.omg.PortableInterceptor.ServerRequestInfo)
186
	 */
187
	public void receive_request_service_contexts(ServerRequestInfo arg0)
188
			throws ForwardRequest {
189
	}
190
191
	/*
192
	 * (non-Javadoc)
193
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_exception(org.omg.PortableInterceptor.ServerRequestInfo)
194
	 */
195
	public void send_exception(ServerRequestInfo arg0) throws ForwardRequest {
196
	}
197
198
	/*
199
	 * (non-Javadoc)
200
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_other(org.omg.PortableInterceptor.ServerRequestInfo)
201
	 */
202
	public void send_other(ServerRequestInfo arg0) throws ForwardRequest {
203
	}
204
205
	/*
206
	 * (non-Javadoc)
207
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_reply(org.omg.PortableInterceptor.ServerRequestInfo)
208
	 */
209
	public void send_reply(ServerRequestInfo arg0) {
210
	}
211
212
}
(-)src-model/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java (-128 lines)
Removed Link Here
1
package org.eclipse.tptp.trace.arm.internal.model.iiop;
2
3
import org.omg.CORBA.LocalObject;
4
import org.omg.IOP.ServiceContext;
5
import org.omg.PortableInterceptor.ClientRequestInfo;
6
import org.omg.PortableInterceptor.ClientRequestInterceptor;
7
import org.omg.PortableInterceptor.ForwardRequest;
8
import org.omg.PortableInterceptor.ORBInitInfo;
9
import org.omg.PortableInterceptor.ORBInitializer;
10
import org.omg.PortableInterceptor.ServerRequestInfo;
11
import org.omg.PortableInterceptor.ServerRequestInterceptor;
12
import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName;
13
14
import com.ibm.CORBA.iiop.ExtendedORBInitInfo;
15
16
/**
17
 * The request interceptor responsible for transmitting the ARM correlator 
18
 * between machines when the IIOP calls are made. 
19
 * 
20
 * @author TPTP Development Team
21
 * @since TPTP 4.2.1
22
 */
23
public class ArmTestInterceptor extends LocalObject implements
24
		ORBInitializer, ClientRequestInterceptor, ServerRequestInterceptor {
25
26
	private static final byte[] SEND_BYTE_ARRAY; 
27
	
28
	static {
29
		SEND_BYTE_ARRAY = new byte[147]; 
30
		for (int i = 0; i < SEND_BYTE_ARRAY.length; i++) {
31
			SEND_BYTE_ARRAY[i] = (byte)i; 
32
		}
33
	}
34
	
35
	private static final long serialVersionUID = -73971998689011509L;
36
37
	public static final int SERVICE_ID = 0x49424d1e;
38
39
	private static final String CLASS = ArmTestInterceptor.class.getName();
40
41
	public void post_init(ORBInitInfo arg0) {
42
	}
43
44
	public void pre_init(ORBInitInfo info) {
45
		try {
46
			((ExtendedORBInitInfo) info).add_server_request_interceptor(this,
47
					false);
48
			((ExtendedORBInitInfo) info).add_client_request_interceptor(this,
49
					false);
50
		} catch (DuplicateName e) {
51
			// following should appear in WebSphere's SystemErr.log file. 
52
			e.printStackTrace();
53
		}
54
	}
55
56
	public void receive_exception(ClientRequestInfo arg0) throws ForwardRequest {
57
	}
58
59
	public void receive_other(ClientRequestInfo arg0) throws ForwardRequest {
60
	}
61
62
	public void receive_reply(ClientRequestInfo arg0) {
63
	}
64
65
	public void send_poll(ClientRequestInfo arg0) {
66
	}
67
68
	public void send_request(ClientRequestInfo ri) throws ForwardRequest {
69
70
		ServiceContext serviceContext = new ServiceContext(SERVICE_ID,
71
				SEND_BYTE_ARRAY);
72
		ri.add_request_service_context(serviceContext, false);
73
		
74
		System.err.println("SEND_REQUEST adding byte arry to service context: "); 
75
		printArr(SEND_BYTE_ARRAY);
76
		System.err.println(); 
77
78
	}
79
80
	public void destroy() {
81
	}
82
83
	public String name() {
84
		return CLASS;
85
	}
86
87
	public void receive_request(ServerRequestInfo arg0) throws ForwardRequest {
88
		byte[] corBytes = null;
89
		try {
90
			corBytes = arg0.get_request_service_context(SERVICE_ID).context_data;
91
		} catch (Exception e) {
92
			e.printStackTrace(); 
93
			return; 
94
		}
95
		System.err.println("RECEIVE REQUEST received byte array: ");
96
		printArr(corBytes); 
97
		System.err.println(); 
98
99
100
	}
101
	
102
	void printArr(byte[] arr) {
103
		for (int i = 0; i < arr.length; i++) {
104
			System.err.print(arr[i]); 
105
			System.err.print(", "); 
106
		}
107
	}
108
109
	public void receive_request_service_contexts(ServerRequestInfo arg0)
110
			throws ForwardRequest {
111
112
	}
113
114
	public void send_exception(ServerRequestInfo arg0) throws ForwardRequest {
115
116
117
	}
118
119
	public void send_other(ServerRequestInfo arg0) throws ForwardRequest {
120
121
122
	}
123
124
	public void send_reply(ServerRequestInfo arg0) {
125
126
	}
127
128
}
(-)src-probes/org/eclipse/tptp/trace/arm/internal/loader/BootClassLoader.java (+100 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2006 IBM Corporation and others.
3
 * All rights reserved.   This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors: 
9
 * IBM - Initial API and implementation
10
 ***********************************************************************/
11
package org.eclipse.tptp.trace.arm.internal.loader;
12
13
import java.io.File;
14
import java.net.MalformedURLException;
15
import java.net.URL;
16
import java.net.URLClassLoader;
17
import java.util.ArrayList;
18
import java.util.HashMap;
19
import java.util.List;
20
import java.util.Map;
21
22
/**
23
 * The boot class loader loads all the dependencies for the build to manage toolkit
24
 * during instrumentation into a separate classloader so that it doesn't interfere
25
 * with the execution environment's classloaders (such as WAS).
26
 * 
27
 * @author ashishp
28
 * @since 4.4
29
 */
30
public class BootClassLoader {
31
32
	public static final String ARM_LIBRARY_PATH = "arm.library.path";
33
	
34
	private static Map classMap = null;
35
	
36
	private static URLClassLoader ucl = null;
37
38
	/**
39
	 * Initialization of the boot class loader
40
	 */
41
	public static void init() {
42
		if (ucl == null) {
43
			classMap = new HashMap();
44
			
45
			// Get the directory (URL) of the reloadable class
46
			List urls = new ArrayList();
47
			String[] arm_library_path = System.getProperty(ARM_LIBRARY_PATH, "").split(";");
48
			for (int j=0; j < arm_library_path.length; j++) {
49
				File dir = new File(arm_library_path[j] + File.separator);
50
				File[] library = dir.listFiles();
51
				for (int i = 0; i < library.length; i++) {
52
					try {
53
						urls.add( library[i].toURL() );
54
					} catch (MalformedURLException mue) {
55
					}
56
				}
57
			}
58
			try {
59
				// Create a new class loader with the directory
60
				URL[] urlss = new URL[urls.size()];
61
				System.arraycopy(urls.toArray(), 0, urlss, 0, urlss.length);
62
				ucl = new URLClassLoader(urlss, ClassLoader.getSystemClassLoader());
63
			} catch (SecurityException e) {
64
				e.printStackTrace(System.err);
65
			} catch (IllegalArgumentException e) {
66
				e.printStackTrace(System.err);
67
			}
68
		}
69
	}
70
71
	/**
72
	 * Returns a in-instance representation of the class requested.
73
	 * 
74
	 * @param clazz
75
	 * @param initializeClazz
76
	 * @return
77
	 * @throws ClassNotFoundException
78
	 */
79
	public static Class getClass(String clazz, boolean initializeClazz) throws ClassNotFoundException {
80
		Class clazzObject = null;
81
		if (getClassLoader() != null){
82
			if (classMap.containsKey(clazz)) {
83
				clazzObject = (Class)classMap.get(clazz);
84
			} else {
85
				clazzObject = Class.forName(clazz, initializeClazz, getClassLoader());
86
				classMap.put(clazz, clazzObject);
87
			}
88
		}
89
		return clazzObject;
90
	}
91
	
92
	/**
93
	 * Returns the URL Class Loader used for loading the ARM component and its dependencies.
94
	 * 
95
	 * @return
96
	 */
97
	public static URLClassLoader getClassLoader() {
98
		return ucl;
99
	}
100
}
(-)src-probes/org/eclipse/tptp/trace/arm/internal/loader/ProbeHandler.java (+129 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2007 IBM Corporation and others.
3
 * All rights reserved.   This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors: 
9
 * IBM - Initial API and implementation
10
 ***********************************************************************/
11
package org.eclipse.tptp.trace.arm.internal.loader;
12
13
import java.lang.reflect.InvocationTargetException;
14
import java.lang.reflect.Method;
15
16
/**
17
 * Brokers probe invocations from probekit probes to probe implementation found
18
 * in the src-model package. 
19
 * 
20
 * @author ashishp
21
 * @since 4.4
22
 */
23
public class ProbeHandler {
24
	
25
	/**
26
	 * Returns a handle to the method in the probe for invocation purposes.
27
	 * 
28
	 * @param probeClassName is the name of the class that implements the probe.
29
	 * @param methodName is the entry point in the probe.
30
	 * @param parameterTypes indicates teh method signature of the entry point in the probe.
31
	 * @return handle to the method in the probe for invocation purposes.
32
	 * @throws ClassNotFoundException
33
	 * @throws SecurityException
34
	 * @throws NoSuchMethodException
35
	 */
36
	public static Method getMethod(String probeClassName, String methodName, Class[] parameterTypes) 
37
	throws ClassNotFoundException, SecurityException, NoSuchMethodException {
38
		Class probeClass = BootClassLoader.getClass(probeClassName, true);
39
		return probeClass.getMethod(methodName, parameterTypes);
40
	}
41
42
	/**
43
	 * Entry point in the Probe.
44
	 * 
45
	 * @param probeClassName is the name of the class that implements the probe.
46
	 * @param _className is the class name that the probe was injected into.
47
	 * @param _methodName is the name of the method that was injected.
48
	 * @param _thisObject a reference to the object instance that this probe was invoked on.
49
	 * @param _methodArgs is a reference to the arguments of the instrumented method.
50
	 */
51
	public static void _entry(String probeClassName, 
52
			String _className, String _methodName,
53
			Object _thisObject, Object[] _methodArgs) {
54
		try {
55
			Method m = getMethod(probeClassName, "_entry", 
56
					new Class[] { String.class, String.class, Object.class, Object[].class });
57
			m.invoke(null, new Object[] { _className, _methodName, _thisObject, _methodArgs });
58
		} catch (IllegalArgumentException e) {
59
			e.printStackTrace(System.err);
60
		} catch (IllegalAccessException e) {
61
			e.printStackTrace(System.err);
62
		} catch (InvocationTargetException e) {
63
			e.printStackTrace(System.err);
64
		} catch (SecurityException e) {
65
			e.printStackTrace(System.err);
66
		} catch (ClassNotFoundException e) {
67
			e.printStackTrace(System.err);
68
		} catch (NoSuchMethodException e) {
69
			e.printStackTrace(System.err);
70
		}
71
	}
72
73
	/**
74
	 * Exit point in the Probe.
75
	 * 
76
	 * @param probeClassName is the name of the class that implements the probe.
77
	 * @param _className is the class name that the probe was injected into.
78
	 * @param _methodName is the name of the method that was injected.
79
	 */
80
	public static void _exit(String probeClassName, 
81
			String _className, String _methodName) {
82
		try {
83
			Method m = getMethod(probeClassName, "_exit", 
84
					new Class[] { String.class, String.class });
85
			m.invoke(null, new Object[] { _className, _methodName });
86
		} catch (IllegalArgumentException e) {
87
			e.printStackTrace(System.err);
88
		} catch (IllegalAccessException e) {
89
			e.printStackTrace(System.err);
90
		} catch (InvocationTargetException e) {
91
			e.printStackTrace(System.err);
92
		} catch (SecurityException e) {
93
			e.printStackTrace(System.err);
94
		} catch (ClassNotFoundException e) {
95
			e.printStackTrace(System.err);
96
		} catch (NoSuchMethodException e) {
97
			e.printStackTrace(System.err);
98
		}
99
	}
100
101
	/**
102
	 * Catch point in the Probe.
103
	 * 
104
	 * @param probeClassName is the name of the class that implements the probe.
105
	 * @param _className is the class name that the probe was injected into.
106
	 * @param _methodName is the name of the method that was injected.
107
	 */
108
	public static void _catch(String probeClassName, 
109
			String _className, String _methodName) {
110
		try {
111
			Method m = getMethod(probeClassName, "_catch", 
112
					new Class[] { String.class, String.class });
113
			m.invoke(null, new Object[] { _className, _methodName });
114
		} catch (IllegalArgumentException e) {
115
			e.printStackTrace(System.err);
116
		} catch (IllegalAccessException e) {
117
			e.printStackTrace(System.err);
118
		} catch (InvocationTargetException e) {
119
			e.printStackTrace(System.err);
120
		} catch (SecurityException e) {
121
			e.printStackTrace(System.err);
122
		} catch (ClassNotFoundException e) {
123
			e.printStackTrace(System.err);
124
		} catch (NoSuchMethodException e) {
125
			e.printStackTrace(System.err);
126
		}
127
	}
128
129
}
(-)src-model/org/eclipse/tptp/trace/arm/internal/model/probes/GenericProbe.java (+61 lines)
Added Link Here
1
/**
2
 * 
3
 */
4
package org.eclipse.tptp.trace.arm.internal.model.probes;
5
6
import java.util.Properties;
7
8
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider;
9
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager;
10
import org.eclipse.tptp.trace.arm.internal.model.impl.GenericDataImpl;
11
12
/**
13
 * @author Ashish
14
 *
15
 */
16
public class GenericProbe {
17
18
	static {
19
		Properties p = System.getProperties();
20
		String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
21
		InstrumentManager.getInstance().initTransaction(appName);
22
	}
23
	
24
	/* (non-Javadoc)
25
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[])
26
	 */
27
	public static void _entry(String _className, String _methodName, Object _thisObject, Object[] _methodArgs) {
28
		try {
29
			InstrumentDataProvider data = new GenericDataImpl();
30
			data.setClassName(_className);
31
			data.setMethodName(_methodName);
32
			data.setMethodArguments(_methodArgs);
33
			data.setObject(_thisObject);
34
			InstrumentManager.getInstance().transactionStart(data);
35
		} catch (Throwable t) {
36
			InstrumentManager.getInstance().logException(t, _className, _methodName);
37
		}
38
	}
39
40
	/* (non-Javadoc)
41
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String)
42
	 */
43
	public static void _exit(String _className, String _methodName) {
44
		try {
45
			InstrumentManager.getInstance().transactionStop();
46
		} catch (Throwable t) {
47
			InstrumentManager.getInstance().logException(t, _className, _methodName);
48
		}
49
	}
50
51
	/* (non-Javadoc)
52
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_catch(java.lang.String, java.lang.String)
53
	 */
54
	public static void _catch(String _className, String _methodName) {
55
		try {
56
			InstrumentManager.getInstance().transactionStopError();
57
		} catch (Throwable t) {
58
		 	InstrumentManager.getInstance().logException(t, _className, _methodName);
59
		}
60
	}
61
}
(-)src-model/org/eclipse/tptp/trace/arm/internal/model/probes/IIOPProbe.java (+88 lines)
Added Link Here
1
/**
2
 * 
3
 */
4
package org.eclipse.tptp.trace.arm.internal.model.probes;
5
6
import java.util.Properties;
7
8
import org.eclipse.tptp.trace.arm.internal.correlator.TPTPArmCorrelatorImpl;
9
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider;
10
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager;
11
import org.eclipse.tptp.trace.arm.internal.model.impl.IIOPDataImpl;
12
import org.omg.IOP.ServiceContext;
13
import org.omg.PortableInterceptor.ClientRequestInfo;
14
import org.omg.PortableInterceptor.ServerRequestInfo;
15
import org.opengroup.arm40.transaction.ArmCorrelator;
16
17
/**
18
 * @author Ashish
19
 *
20
 */
21
public class IIOPProbe {
22
23
	public static final int SERVICE_ID = 0x49424d1e;
24
25
	static {
26
		Properties p = System.getProperties();
27
		String appName = p.getProperty(InstrumentManager.APPLICATION_KEY);
28
		InstrumentManager.getInstance().initTransaction(appName);
29
	}
30
	
31
	/* (non-Javadoc)
32
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[])
33
	 */
34
	public static void send_request(ClientRequestInfo ri) {
35
36
		/* Get the Arm Correlator */
37
38
		ArmCorrelator correlator = InstrumentManager.getInstance()
39
				.getCorrelator();
40
		InstrumentDataProvider data = new IIOPDataImpl();
41
		data.setClassName(ri.effective_target().getClass().getName());
42
		data.setMethodArguments(null);
43
		data.setMethodName(ri.operation());
44
		data.setObject(ri);
45
		data.setCorrelator(correlator); 
46
47
		/* Need to start the transaction coming in */
48
		correlator = InstrumentManager.getInstance().transactionStart(data);
49
50
		if (correlator != null) {
51
			ServiceContext serviceContext = new ServiceContext(SERVICE_ID,
52
					correlator.getBytes());
53
			ri.add_request_service_context(serviceContext, false);
54
		}
55
56
		if (!ri.response_expected()) {
57
			InstrumentManager.getInstance().transactionStop();
58
		}
59
	}
60
61
	/* (non-Javadoc)
62
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String)
63
	 */
64
	public static void receive_request(ServerRequestInfo arg0) {
65
		byte[] corBytes = null;
66
		ArmCorrelator correlator;
67
		try {
68
			corBytes = arg0.get_request_service_context(SERVICE_ID).context_data;
69
			correlator = new TPTPArmCorrelatorImpl(corBytes, 0);
70
		} catch (Exception e) {
71
			return;
72
		}
73
74
		if (corBytes != null) {
75
			InstrumentDataProvider data = new IIOPDataImpl();
76
			data.setClassName(arg0.getClass().getName());
77
			data.setMethodArguments(null);
78
			data.setMethodName(arg0.operation());
79
			data.setObject(arg0);
80
			data.setCorrelator(correlator);
81
			InstrumentManager.getInstance().transactionStart(data);
82
83
			if (!arg0.response_expected()) {
84
				InstrumentManager.getInstance().transactionStop();
85
			}
86
		}
87
	}
88
}
(-)src-model/org/eclipse/tptp/trace/arm/internal/model/probes/JDBCProbe.java (+53 lines)
Added Link Here
1
/**
2
 * 
3
 */
4
package org.eclipse.tptp.trace.arm.internal.model.probes;
5
6
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider;
7
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager;
8
import org.eclipse.tptp.trace.arm.internal.model.impl.JDBCDataImpl;
9
10
/**
11
 * @author Ashish
12
 *
13
 */
14
public class JDBCProbe extends GenericProbe {
15
16
	/* (non-Javadoc)
17
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[])
18
	 */
19
	public static void _entry(String _className, String _methodName, Object _thisObject, Object[] _methodArgs) {
20
		try {
21
			InstrumentDataProvider data = new JDBCDataImpl();
22
			data.setClassName(_className);
23
			data.setMethodName(_methodName);
24
			data.setMethodArguments(_methodArgs);
25
			data.setObject(_thisObject);
26
			InstrumentManager.getInstance().transactionStart(data);
27
		} catch (Throwable t) {
28
			InstrumentManager.getInstance().logException(t, _className, _methodName);
29
		}
30
	}
31
32
	/* (non-Javadoc)
33
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String)
34
	 */
35
	public static void _exit(String _className, String _methodName) {
36
		try {
37
			InstrumentManager.getInstance().transactionStop();
38
		} catch (Throwable t) {
39
			InstrumentManager.getInstance().logException(t, _className, _methodName);
40
		}
41
	}
42
43
	/* (non-Javadoc)
44
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_catch(java.lang.String, java.lang.String)
45
	 */
46
	public static void _catch(String _className, String _methodName) {
47
		try {
48
			InstrumentManager.getInstance().transactionStopError();
49
		} catch (Throwable t) {
50
		 	InstrumentManager.getInstance().logException(t, _className, _methodName);
51
		}
52
	}
53
}
(-)src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmTestInterceptor.java (+129 lines)
Added Link Here
1
package org.eclipse.tptp.trace.arm.internal.model.iiop;
2
3
import org.omg.CORBA.LocalObject;
4
import org.omg.IOP.ServiceContext;
5
import org.omg.PortableInterceptor.ClientRequestInfo;
6
import org.omg.PortableInterceptor.ClientRequestInterceptor;
7
import org.omg.PortableInterceptor.ForwardRequest;
8
import org.omg.PortableInterceptor.ORBInitInfo;
9
import org.omg.PortableInterceptor.ORBInitializer;
10
import org.omg.PortableInterceptor.ServerRequestInfo;
11
import org.omg.PortableInterceptor.ServerRequestInterceptor;
12
import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName;
13
14
import com.ibm.CORBA.iiop.ExtendedORBInitInfo;
15
16
/**
17
 * The request interceptor responsible for transmitting the ARM correlator 
18
 * between machines when the IIOP calls are made. 
19
 * 
20
 * @author rdanek
21
 * @version 4.4
22
 * @since 4.2.1
23
 */
24
public class ArmTestInterceptor extends LocalObject implements
25
		ORBInitializer, ClientRequestInterceptor, ServerRequestInterceptor {
26
27
	private static final byte[] SEND_BYTE_ARRAY; 
28
	
29
	static {
30
		SEND_BYTE_ARRAY = new byte[147]; 
31
		for (int i = 0; i < SEND_BYTE_ARRAY.length; i++) {
32
			SEND_BYTE_ARRAY[i] = (byte)i; 
33
		}
34
	}
35
	
36
	private static final long serialVersionUID = -73971998689011509L;
37
38
	public static final int SERVICE_ID = 0x49424d1e;
39
40
	private static final String CLASS = ArmTestInterceptor.class.getName();
41
42
	public void post_init(ORBInitInfo arg0) {
43
	}
44
45
	public void pre_init(ORBInitInfo info) {
46
		try {
47
			((ExtendedORBInitInfo) info).add_server_request_interceptor(this,
48
					false);
49
			((ExtendedORBInitInfo) info).add_client_request_interceptor(this,
50
					false);
51
		} catch (DuplicateName e) {
52
			// following should appear in WebSphere's SystemErr.log file. 
53
			e.printStackTrace();
54
		}
55
	}
56
57
	public void receive_exception(ClientRequestInfo arg0) throws ForwardRequest {
58
	}
59
60
	public void receive_other(ClientRequestInfo arg0) throws ForwardRequest {
61
	}
62
63
	public void receive_reply(ClientRequestInfo arg0) {
64
	}
65
66
	public void send_poll(ClientRequestInfo arg0) {
67
	}
68
69
	public void send_request(ClientRequestInfo ri) throws ForwardRequest {
70
71
		ServiceContext serviceContext = new ServiceContext(SERVICE_ID,
72
				SEND_BYTE_ARRAY);
73
		ri.add_request_service_context(serviceContext, false);
74
		
75
		System.err.println("SEND_REQUEST adding byte arry to service context: "); 
76
		printArr(SEND_BYTE_ARRAY);
77
		System.err.println(); 
78
79
	}
80
81
	public void destroy() {
82
	}
83
84
	public String name() {
85
		return CLASS;
86
	}
87
88
	public void receive_request(ServerRequestInfo arg0) throws ForwardRequest {
89
		byte[] corBytes = null;
90
		try {
91
			corBytes = arg0.get_request_service_context(SERVICE_ID).context_data;
92
		} catch (Exception e) {
93
			e.printStackTrace(); 
94
			return; 
95
		}
96
		System.err.println("RECEIVE REQUEST received byte array: ");
97
		printArr(corBytes); 
98
		System.err.println(); 
99
100
101
	}
102
	
103
	void printArr(byte[] arr) {
104
		for (int i = 0; i < arr.length; i++) {
105
			System.err.print(arr[i]); 
106
			System.err.print(", "); 
107
		}
108
	}
109
110
	public void receive_request_service_contexts(ServerRequestInfo arg0)
111
			throws ForwardRequest {
112
113
	}
114
115
	public void send_exception(ServerRequestInfo arg0) throws ForwardRequest {
116
117
118
	}
119
120
	public void send_other(ServerRequestInfo arg0) throws ForwardRequest {
121
122
123
	}
124
125
	public void send_reply(ServerRequestInfo arg0) {
126
127
	}
128
129
}
(-)src-model/org/eclipse/tptp/trace/arm/internal/model/probes/EJBProbe.java (+53 lines)
Added Link Here
1
/**
2
 * 
3
 */
4
package org.eclipse.tptp.trace.arm.internal.model.probes;
5
6
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider;
7
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager;
8
import org.eclipse.tptp.trace.arm.internal.model.impl.EJBDataImpl;
9
10
/**
11
 * @author Ashish
12
 *
13
 */
14
public class EJBProbe extends GenericProbe {
15
16
	/* (non-Javadoc)
17
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[])
18
	 */
19
	public static void _entry(String _className, String _methodName, Object _thisObject, Object[] _methodArgs) {
20
		try {
21
			InstrumentDataProvider data = new EJBDataImpl();
22
			data.setClassName(_className);
23
			data.setMethodName(_methodName);
24
			data.setMethodArguments(_methodArgs);
25
			data.setObject(_thisObject);
26
			InstrumentManager.getInstance().transactionStart(data);
27
		} catch (Throwable t) {
28
			InstrumentManager.getInstance().logException(t, _className, _methodName);
29
		}
30
	}
31
32
	/* (non-Javadoc)
33
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String)
34
	 */
35
	public static void _exit(String _className, String _methodName) {
36
		try {
37
			InstrumentManager.getInstance().transactionStop();
38
		} catch (Throwable t) {
39
			InstrumentManager.getInstance().logException(t, _className, _methodName);
40
		}
41
	}
42
43
	/* (non-Javadoc)
44
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_catch(java.lang.String, java.lang.String)
45
	 */
46
	public static void _catch(String _className, String _methodName) {
47
		try {
48
			InstrumentManager.getInstance().transactionStopError();
49
		} catch (Throwable t) {
50
		 	InstrumentManager.getInstance().logException(t, _className, _methodName);
51
		}
52
	}
53
}
(-)src-model/org/eclipse/tptp/trace/arm/internal/model/probes/ServletProbe.java (+53 lines)
Added Link Here
1
/**
2
 * 
3
 */
4
package org.eclipse.tptp.trace.arm.internal.model.probes;
5
6
import org.eclipse.tptp.trace.arm.internal.model.InstrumentDataProvider;
7
import org.eclipse.tptp.trace.arm.internal.model.InstrumentManager;
8
import org.eclipse.tptp.trace.arm.internal.model.impl.ServletDataImpl;
9
10
/**
11
 * @author Ashish
12
 *
13
 */
14
public class ServletProbe extends GenericProbe {
15
16
	/* (non-Javadoc)
17
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_entry(java.lang.String, java.lang.String, java.lang.Object, java.lang.Object[])
18
	 */
19
	public static void _entry(String _className, String _methodName, Object _thisObject, Object[] _methodArgs) {
20
		try {
21
			InstrumentDataProvider data = new ServletDataImpl();
22
			data.setClassName(_className);
23
			data.setMethodName(_methodName);
24
			data.setMethodArguments(_methodArgs);
25
			data.setObject(_thisObject);
26
			InstrumentManager.getInstance().transactionStart(data);
27
		} catch (Throwable t) {
28
			InstrumentManager.getInstance().logException(t, _className, _methodName);
29
		}
30
	}
31
32
	/* (non-Javadoc)
33
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_exit(java.lang.String, java.lang.String)
34
	 */
35
	public static void _exit(String _className, String _methodName) {
36
		try {
37
			InstrumentManager.getInstance().transactionStop();
38
		} catch (Throwable t) {
39
			InstrumentManager.getInstance().logException(t, _className, _methodName);
40
		}
41
	}
42
43
	/* (non-Javadoc)
44
	 * @see org.eclipse.tptp.trace.arm.internal.model.probes.IProbe#_catch(java.lang.String, java.lang.String)
45
	 */
46
	public static void _catch(String _className, String _methodName) {
47
		try {
48
			InstrumentManager.getInstance().transactionStopError();
49
		} catch (Throwable t) {
50
		 	InstrumentManager.getInstance().logException(t, _className, _methodName);
51
		}
52
	}
53
}
(-)src-probes/org/eclipse/tptp/trace/arm/internal/model/iiop/ArmRequestInterceptor.java (+186 lines)
Added Link Here
1
/**********************************************************************
2
 * Copyright (c) 2006 IBM Corporation and others.
3
 * All rights reserved.   This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors: 
9
 * IBM - Initial API and implementation
10
 ***********************************************************************/
11
12
package org.eclipse.tptp.trace.arm.internal.model.iiop;
13
14
import java.lang.reflect.InvocationTargetException;
15
import java.lang.reflect.Method;
16
17
import org.eclipse.tptp.trace.arm.internal.loader.ProbeHandler;
18
import org.omg.CORBA.LocalObject;
19
import org.omg.PortableInterceptor.ClientRequestInfo;
20
import org.omg.PortableInterceptor.ClientRequestInterceptor;
21
import org.omg.PortableInterceptor.ForwardRequest;
22
import org.omg.PortableInterceptor.ORBInitInfo;
23
import org.omg.PortableInterceptor.ORBInitializer;
24
import org.omg.PortableInterceptor.ServerRequestInfo;
25
import org.omg.PortableInterceptor.ServerRequestInterceptor;
26
import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName;
27
28
import com.ibm.CORBA.iiop.ExtendedORBInitInfo;
29
30
/**
31
 * The request interceptor responsible for transmitting the ARM correlator 
32
 * between machines when the IIOP calls are made. 
33
 * 
34
 * @author rdanek, ashishp
35
 * @version 4.4
36
 * @since 4.2.1
37
 */
38
public class ArmRequestInterceptor extends LocalObject implements
39
		ORBInitializer, ClientRequestInterceptor, ServerRequestInterceptor {
40
41
	private static final long serialVersionUID = -73971998689011509L;
42
43
	private static final String CLASS = ArmRequestInterceptor.class.getName();
44
	
45
	/*
46
	 * (non-Javadoc)
47
	 * @see org.omg.PortableInterceptor.ORBInitializerOperations#post_init(org.omg.PortableInterceptor.ORBInitInfo)
48
	 */
49
	public void post_init(ORBInitInfo arg0) {
50
	}
51
52
	/*
53
	 * (non-Javadoc)
54
	 * @see org.omg.PortableInterceptor.ORBInitializerOperations#pre_init(org.omg.PortableInterceptor.ORBInitInfo)
55
	 */
56
	public void pre_init(ORBInitInfo info) {
57
		try {
58
			((ExtendedORBInitInfo) info).add_server_request_interceptor(this, false);
59
			((ExtendedORBInitInfo) info).add_client_request_interceptor(this, false);
60
		} catch (DuplicateName e) {
61
			// following should appear in WebSphere's SystemErr.log file. 
62
			e.printStackTrace(System.err);
63
		}
64
	}
65
66
	/*
67
	 * (non-Javadoc)
68
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_exception(org.omg.PortableInterceptor.ClientRequestInfo)
69
	 */
70
	public void receive_exception(ClientRequestInfo arg0) throws ForwardRequest {
71
	}
72
73
	/*
74
	 * (non-Javadoc)
75
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_other(org.omg.PortableInterceptor.ClientRequestInfo)
76
	 */
77
	public void receive_other(ClientRequestInfo arg0) throws ForwardRequest {
78
	}
79
80
	/*
81
	 * (non-Javadoc)
82
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#receive_reply(org.omg.PortableInterceptor.ClientRequestInfo)
83
	 */
84
	public void receive_reply(ClientRequestInfo arg0) {
85
	}
86
87
	/*
88
	 * (non-Javadoc)
89
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#send_poll(org.omg.PortableInterceptor.ClientRequestInfo)
90
	 */
91
	public void send_poll(ClientRequestInfo arg0) {
92
	}
93
94
	/*
95
	 * (non-Javadoc)
96
	 * @see org.omg.PortableInterceptor.ClientRequestInterceptorOperations#send_request(org.omg.PortableInterceptor.ClientRequestInfo)
97
	 */
98
	public void send_request(ClientRequestInfo ri) throws ForwardRequest {
99
		try {
100
			Method m = ProbeHandler.getMethod("org.eclipse.tptp.trace.arm.internal.model.probes.IIOPProbe", 
101
					"send_request", new Class[] { ClientRequestInfo.class });
102
			m.invoke(null, new Object[] { ri });
103
		} catch (IllegalArgumentException e) {
104
			e.printStackTrace(System.err);
105
		} catch (IllegalAccessException e) {
106
			e.printStackTrace(System.err);
107
		} catch (InvocationTargetException e) {
108
			e.printStackTrace(System.err);
109
		} catch (SecurityException e) {
110
			e.printStackTrace(System.err);
111
		} catch (ClassNotFoundException e) {
112
			e.printStackTrace(System.err);
113
		} catch (NoSuchMethodException e) {
114
			e.printStackTrace(System.err);
115
		}
116
	}
117
118
	/*
119
	 * (non-Javadoc)
120
	 * @see org.omg.PortableInterceptor.InterceptorOperations#destroy()
121
	 */
122
	public void destroy() {
123
	}
124
125
	/*
126
	 * (non-Javadoc)
127
	 * @see org.omg.PortableInterceptor.InterceptorOperations#name()
128
	 */
129
	public String name() {
130
		return CLASS;
131
	}
132
133
	/*
134
	 * (non-Javadoc)
135
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#receive_request(org.omg.PortableInterceptor.ServerRequestInfo)
136
	 */
137
	public void receive_request(ServerRequestInfo arg0) throws ForwardRequest {
138
		try {
139
			Method m = ProbeHandler.getMethod("org.eclipse.tptp.trace.arm.internal.model.probes.IIOPProbe", 
140
					"receive_request", new Class[] { ServerRequestInfo.class });
141
			m.invoke(null, new Object[] { arg0 });
142
		} catch (IllegalArgumentException e) {
143
			e.printStackTrace(System.err);
144
		} catch (IllegalAccessException e) {
145
			e.printStackTrace(System.err);
146
		} catch (InvocationTargetException e) {
147
			e.printStackTrace(System.err);
148
		} catch (SecurityException e) {
149
			e.printStackTrace(System.err);
150
		} catch (ClassNotFoundException e) {
151
			e.printStackTrace(System.err);
152
		} catch (NoSuchMethodException e) {
153
			e.printStackTrace(System.err);
154
		}
155
	}
156
157
	/*
158
	 * (non-Javadoc)
159
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#receive_request_service_contexts(org.omg.PortableInterceptor.ServerRequestInfo)
160
	 */
161
	public void receive_request_service_contexts(ServerRequestInfo arg0)
162
			throws ForwardRequest {
163
	}
164
165
	/*
166
	 * (non-Javadoc)
167
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_exception(org.omg.PortableInterceptor.ServerRequestInfo)
168
	 */
169
	public void send_exception(ServerRequestInfo arg0) throws ForwardRequest {
170
	}
171
172
	/*
173
	 * (non-Javadoc)
174
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_other(org.omg.PortableInterceptor.ServerRequestInfo)
175
	 */
176
	public void send_other(ServerRequestInfo arg0) throws ForwardRequest {
177
	}
178
179
	/*
180
	 * (non-Javadoc)
181
	 * @see org.omg.PortableInterceptor.ServerRequestInterceptorOperations#send_reply(org.omg.PortableInterceptor.ServerRequestInfo)
182
	 */
183
	public void send_reply(ServerRequestInfo arg0) {
184
	}
185
186
}

Return to bug 148461