Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Installing TIBCO ActiveMatrix BusinessWorks ActiveAspects Plug-in : Aspect Development in Eclipse

Aspect Development in Eclipse
This section provides information about developing an aspect in an Eclipse environment.
Setting up Eclipse for TIBCO ActiveMatrix BusinessWorks ActiveAspects Plug-in Development
To setup eclipse for the TIBCO ActiveMatrix BusinessWorks ActiveAspects Plug-in development, do the following:
1.
Figure 2 Creating a Java Project
2.
Click Add External JARs to add all the required JARs contained in the installation to the build path.
poa-core.jar and poa-bwaa.jar - This is the core runtime library of this product.
poa-api.jar - Contains the public API of this product.
poa-samplesImpl.jar and poa-bwaa-samplesImpl-src.jar - Contains all the advice implementations for the sample advices.
bwaa-palette.jar - Contains information about the BWAA palette.
bwconfig-api.jar - Contains all the interfaces to get activity configuration data.
bwconfig-impl.jar - Contains all the Provider implementations to get read-only access to activity configuration data.
3.
To attach the source to the samplesImpl.jar, right-click on the JAR in the Referenced Libraries in the Eclipse Project Explorer and select properties. In the Java Source Attachment, select External File and browse to samplesImpl-src.jar.
This will attach the source code to the JAVA classes.
Figure 3 Jars and Class Folders on the Build Path
Creating an Advice Implementation
To create an advice implementation, you would need to extend the SyncAdvice class.
1.
2.
Extend the SyncAdvice or AsyncAdvice (for Async Advice Implementations) class with the required generics.
3.
Annotate the class with @AdviceImpl specify the dataAccess field for the annotation.
4.
Override the execute() and postExecute() and cancelled() for Async Advice Implementations method in the advice implementation class.
Figure 4 Creating an Advice Implementation
Debugging an Advice Implementation
To debug an advice implementation, use the Remote Debugging feature provided by Eclipse.
To debug the advice implementation:
1.
Export the class to debug in the bwengine classpath as a jar. (Adding in the hotfix/lib directory is recommended).
2.
java.extended.properties=-Xmx512m -Xms128m -XX:MaxPermSize=128m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
The port number (address=5005) can be changed as per the eclipse remote debugger settings.
3.
Create a new Debug Configuration of type Remote Java Application in Eclipse and add the IP address where the bwengine is running.
4.
5.
Figure 5 Debugging an Advice Implementation
6.
Click Debug to connect to the running TIBCO ActiveMatrixBusinessWorks engine.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved