savara SVN: r679 - in branches/experimental/2.0.x: tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor and 1 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-16 16:16:53 -0500 (Wed, 16 Feb 2011)
New Revision: 679
Added:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/
branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelatingServiceTracker.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationNotifier.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationSessionImpl.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationSessionManager.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/ServiceCorrelatorImpl.java
Modified:
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/pi4soa.xml
branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/ServiceTrackerClient.java
branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/TxnMonitor.java
Log:
Needed to take a copy of the pi4soa service correlator to enable it to support events from service descriptions based, and global/located based, endpoints - to support old and new style activity events.
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/configs/pi4soa.xml
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/configs/pi4soa.xml 2011-02-16 17:58:08 UTC (rev 678)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/configs/pi4soa.xml 2011-02-16 21:16:53 UTC (rev 679)
@@ -21,6 +21,7 @@
-->
<pi4soa>
+<!--
<monitor>
<serviceTracker class="org.savara.validator.pi4soa.JMSServiceTracker" >
<jmsConnectionFactory>ConnectionFactory</jmsConnectionFactory>
@@ -28,4 +29,5 @@
<recordMessagePayload>true</recordMessagePayload>
</serviceTracker>
</monitor>
+-->
</pi4soa>
\ No newline at end of file
Modified: branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/ServiceTrackerClient.java
===================================================================
--- branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/ServiceTrackerClient.java 2011-02-16 17:58:08 UTC (rev 678)
+++ branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/ServiceTrackerClient.java 2011-02-16 21:16:53 UTC (rev 679)
@@ -65,7 +65,8 @@
for (Analysis a : m_activity.getAnalysis()) {
if (a instanceof ProtocolAnalysis) {
- ret = ((ProtocolAnalysis)a).getProtocol();
+ ret = ((ProtocolAnalysis)a).getProtocol()+"@"+
+ ((ProtocolAnalysis)a).getRole();
break;
}
}
@@ -160,7 +161,7 @@
ret.setMessageIdentities(getPrimaryIdentities());
ret.setOperationName(m_activity.getOperationName());
ret.setFaultName(m_activity.getFaultName());
- ret.setServiceType(m_activity.getDestinationType());
+ //ret.setServiceType(m_activity.getDestinationType());
if (m_activity.getParameter().size() > 0) {
ret.setType(m_activity.getParameter().get(0).getType());
Modified: branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/TxnMonitor.java
===================================================================
--- branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/TxnMonitor.java 2011-02-16 17:58:08 UTC (rev 678)
+++ branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/TxnMonitor.java 2011-02-16 21:16:53 UTC (rev 679)
@@ -30,6 +30,7 @@
import org.pi4soa.service.correlator.ServiceCorrelatorFactory;
import org.pi4soa.service.correlator.ServiceCorrelatorListener;
import org.pi4soa.service.tracker.jms.JMSServiceTrackerClient;
+import org.savara.tools.monitor.correlator.ServiceCorrelatorImpl;
/**
* The TxnMonitor class is a generic transaction monitor class that
@@ -48,7 +49,7 @@
public void initialize() throws ServiceException
{
- m_correlator=ServiceCorrelatorFactory.getServiceCorrelator();
+ m_correlator=new ServiceCorrelatorImpl(); //ServiceCorrelatorFactory.getServiceCorrelator();
m_correlator.addServiceCorrelatorListener(new CorrelatorListener());
// Obtain service tracker client
Added: branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelatingServiceTracker.java
===================================================================
--- branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelatingServiceTracker.java (rev 0)
+++ branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelatingServiceTracker.java 2011-02-16 21:16:53 UTC (rev 679)
@@ -0,0 +1,491 @@
+/*
+ * Copyright 2005 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * Aug 25, 2005 : Initial version created by gary
+ */
+package org.savara.tools.monitor.correlator;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.pi4soa.cdl.CDLType;
+import org.pi4soa.cdl.ExchangeDetails;
+import org.pi4soa.cdl.util.CDLTypeUtil;
+import org.pi4soa.service.Channel;
+import org.pi4soa.service.Message;
+import org.pi4soa.service.behavior.MessageDefinition;
+import org.pi4soa.service.behavior.Receive;
+import org.pi4soa.service.behavior.Send;
+import org.pi4soa.service.behavior.ServiceDescription;
+import org.pi4soa.service.session.Session;
+import org.pi4soa.service.session.internal.InternalSession;
+import org.pi4soa.service.tracker.ServiceTracker;
+
+/**
+ * This class provides an implementation of the service tracker
+ * interface, used to detect tracker events from distributed
+ * service endpoints and correlate them back to the choreography
+ * description being monitored.
+ *
+ */
+public class CorrelatingServiceTracker implements ServiceTracker {
+
+ private static final String UNEXPECTED_MESSAGE_EXCEPTION = "UnexpectedMessageException";
+
+ private static final String UNHANDLED_EXCEPTION = "Unhandled exception: ";
+
+ private static final String CORRELATER_REPORTED = "[Correlater reported] ";
+
+ /**
+ * This is the constructor for the correlating service
+ * tracker.
+ *
+ * @param mgr The correlation session manager
+ * @param notifier The correlation notifier
+ */
+ public CorrelatingServiceTracker(CorrelationSessionManager mgr,
+ CorrelationNotifier notifier) {
+ m_sessionManager = mgr;
+ m_notifier = notifier;
+ }
+
+ /**
+ * This method initializes the service tracker.
+ *
+ */
+ public void initialize() {
+
+ }
+
+ /**
+ * This method indicates that a new service instance
+ * has started.
+ *
+ * @param service The service
+ * @param session The session
+ */
+ public void serviceStarted(ServiceDescription service,
+ Session session) {
+
+ // The CorrelationSessionManager overrides the 'addSession'
+ // method on the superclass DefaultSessionManager, to
+ // intercept the addition of new service sessions
+ // which are used to create or associated with existing
+ // correlation sessions. This overridden method is used
+ // instead of this tracker method, because by the time
+ // the overridden method is called, the session has
+ // identity information, whereas this method is invoked
+ // just after the newly created service session is
+ // instantiated.
+ }
+
+ /**
+ * This method indicates that a service instance
+ * has finished.
+ *
+ * @param service The service
+ * @param session The session
+ */
+ public void serviceFinished(ServiceDescription service,
+ Session session) {
+
+ // The overridden 'removeSession' method in the
+ // CorrelationSessionManager is used, instead of this
+ // tracker callback, to remove a session from the
+ // associated correlation session - to remain
+ // symmetrical with the way that the session is associated
+ // (see note above).
+ }
+
+ /**
+ * This method indicates that a new sub session
+ * has started within an existing service instance.
+ *
+ * @param parent The parent session
+ * @param session The session
+ */
+ public void subSessionStarted(Session parent, Session session) {
+ }
+
+ /**
+ * This method indicates that an existing
+ * sub session has finished.
+ *
+ * @param parent The parent session
+ * @param session The session
+ */
+ public void subSessionFinished(Session parent, Session session) {
+ }
+
+ /**
+ * This method registers the fact that a message has been
+ * sent.
+ *
+ * @param activity The behavioral activity, or null if a stateless service
+ * @param session The session, or null if a stateless service
+ * @param channel The channel, or null if a stateless service
+ * @param mesg The message that has been handled
+ */
+ public void sentMessage(Send activity, Session session,
+ Channel channel, Message mesg) {
+
+ // Get the correlation session for the service session
+ CorrelationSessionImpl corrSession=
+ getCorrelationSession(session, mesg);
+
+ if (corrSession != null) {
+
+ // Derive the choreography description node associated
+ // with the behavioral send activity
+ CDLType cdlType=CDLTypeUtil.getCDLType(
+ corrSession.getChoreographyDescription(),
+ activity.getGlobalDescriptionURI());
+
+ if (cdlType == null) {
+ logger.severe("Failed to locate CDL type associated " +
+ "with behavior activity '"+activity+
+ "' in choreography '"+
+ corrSession.getChoreographyDescription()+"'");
+
+ } else if (cdlType instanceof ExchangeDetails) {
+
+ corrSession.exchangeInitiated((ExchangeDetails)cdlType,
+ channel);
+
+ // Notify any registered listeners
+ m_notifier.exchangeInitiated((ExchangeDetails)cdlType,
+ channel, mesg, corrSession,
+ session.getId().getServiceDescriptionName());
+ } else {
+ logger.severe("CDL type '"+cdlType+
+ "', associated with behavior activity '"+
+ activity+"' is not an ExchangeDetails type");
+ }
+ }
+ }
+
+ /**
+ * This method registers the fact that a message has been
+ * sent from a stateless service.
+ *
+ * @param defn The message definition
+ * @param mesg The message that has been handled
+ */
+ public void sentMessage(MessageDefinition defn, Message mesg) {
+
+ // Get the correlation session for the service session
+ CorrelationSessionImpl corrSession=
+ getCorrelationSession(null, mesg);
+
+ if (corrSession != null) {
+
+ // TODO: Not sure if we need to report a stateless
+ // message event to the correlation session??
+ //corrSession.exchangeInitiated((ExchangeDetails)cdlType,
+ // channel);
+
+ // Notify any registered listeners
+ m_notifier.exchangeInitiated(null, null, mesg, corrSession,
+ defn.getServiceDescription().getName());
+ }
+ }
+
+ /**
+ * This method registers the fact that a message has been
+ * received.
+ *
+ * @param activity The behavioral activity, or null if a stateless service
+ * @param session The session, or null if a stateless service
+ * @param channel The channel, or null if a stateless service
+ * @param mesg The message that has been handled
+ */
+ public void receivedMessage(Receive activity, Session session,
+ Channel channel, Message mesg) {
+
+ // Get the correlation session for the service session
+ CorrelationSessionImpl corrSession=
+ getCorrelationSession(session, mesg);
+
+ if (corrSession != null) {
+
+ // Derive the choreography description node associated
+ // with the behavioral receive activity
+ CDLType cdlType=CDLTypeUtil.getCDLType(
+ corrSession.getChoreographyDescription(),
+ activity.getGlobalDescriptionURI());
+
+ if (cdlType == null) {
+ logger.severe("Failed to locate CDL type associated " +
+ "with behavior activity '"+activity+
+ "' in choreography '"+
+ corrSession.getChoreographyDescription()+"'");
+
+ } else if (cdlType instanceof ExchangeDetails) {
+
+ corrSession.exchangeCompleted((ExchangeDetails)cdlType,
+ channel);
+
+ // Notify any registered listeners
+ m_notifier.exchangeCompleted((ExchangeDetails)cdlType,
+ channel, mesg, corrSession,
+ session.getId().getServiceDescriptionName());
+
+ } else {
+ logger.severe("CDL type '"+cdlType+
+ "', associated with behavior activity '"+
+ activity+"' is not an ExchangeDetails type");
+ }
+ }
+ }
+
+ /**
+ * This method registers the fact that a message has been
+ * received from a stateless service.
+ *
+ * @param defn The message definition
+ * @param mesg The message that has been handled
+ */
+ public void receivedMessage(MessageDefinition defn, Message mesg) {
+
+ // Get the correlation session for the service session
+ CorrelationSessionImpl corrSession=
+ getCorrelationSession(null, mesg);
+
+ if (corrSession != null) {
+
+ // TODO: Not sure if we need to report a stateless
+ // message event to the correlation session??
+ //corrSession.exchangeCompleted((ExchangeDetails)cdlType,
+ // channel);
+
+ // Notify any registered listeners
+ m_notifier.exchangeCompleted(null, null, mesg, corrSession,
+ defn.getServiceDescription().getName());
+ }
+ }
+
+ /**
+ * This method registers that a message was not expected.
+ *
+ * @param session The session, or null if a stateless service
+ * @param mesg The message that was not expected
+ * @param reason The optional reason why the message was
+ * considered to be unexpected
+ * @deprecated Use unexpectedMessage(ServiceDescription sdesc,
+ * Session session, Message mesg, String reason)
+ */
+ public void unexpectedMessage(Session session, Message mesg,
+ String reason) {
+ }
+
+ /**
+ * This method registers that a message was not expected.
+ *
+ * @param sdesc The service description, if known
+ * @param session The session, or null if a stateless service,
+ * or cannot be associated with a session
+ * @param mesg The message that was not expected
+ * @param reason The optional reason why the message was
+ * considered to be unexpected
+ */
+ public void unexpectedMessage(ServiceDescription sdesc,
+ Session session, Message mesg, String reason) {
+ // Get the correlation session for the service session
+ CorrelationSessionImpl corrSession=
+ getCorrelationSession(session, null);
+
+ if (corrSession != null) {
+ m_notifier.error(CORRELATER_REPORTED+mesg,
+ UNEXPECTED_MESSAGE_EXCEPTION, corrSession,
+ session.getId().getServiceDescriptionName());
+ }
+ }
+
+ /**
+ * This method registers that an exception was not handled.
+ *
+ * @param session The session, or null if a stateless service
+ * @param excType The exception type
+ */
+ public void unhandledException(Session session, String excType) {
+ // Get the correlation session for the service session
+ CorrelationSessionImpl corrSession=
+ getCorrelationSession(session, null);
+
+ if (corrSession != null) {
+ m_notifier.error(CORRELATER_REPORTED+
+ UNHANDLED_EXCEPTION+excType,
+ excType, corrSession,
+ session.getId().getServiceDescriptionName());
+ }
+ }
+
+ /**
+ * This method reports information regarding the processing
+ * of a service session. The details can either be specified
+ * as a textual string (unstructured data),
+ * or as a structured XML fragment.<p>
+ *
+ * @param session The session, or null if a stateless service
+ * @param details The details
+ * @param type The optional type
+ */
+ public void information(Session session, String details) {
+ // Get the correlation session for the service session
+ CorrelationSessionImpl corrSession=
+ getCorrelationSession(session, null);
+
+ if (corrSession != null) {
+ m_notifier.information(CORRELATER_REPORTED+details,
+ corrSession,
+ session.getId().getServiceDescriptionName());
+ }
+ }
+
+ /**
+ * This method reports information regarding the processing
+ * of a service session. The details can either be specified
+ * as a textual string (unstructured data),
+ * or as a structured XML fragment.<p>
+ *
+ * @param session The session, or null if a stateless service
+ * @param details The details
+ * @param exc The optional exception
+ */
+ public void warning(Session session, String details, Throwable exc) {
+
+ // Get the correlation session for the service session
+ CorrelationSessionImpl corrSession=
+ getCorrelationSession(session, null);
+
+ if (corrSession != null) {
+ m_notifier.warning(CORRELATER_REPORTED+details,
+ exc.toString(), corrSession,
+ session.getId().getServiceDescriptionName());
+ }
+ }
+
+ /**
+ * This method reports information regarding the processing
+ * of a service session. The details can either be specified
+ * as a textual string (unstructured data),
+ * or as a structured XML fragment.<p>
+ *
+ * @param session The session, or null if a stateless service
+ * @param details The details
+ * @param exc The optional exception
+ */
+ public void error(Session session, String details, Throwable exc) {
+ // Get the correlation session for the service session
+ CorrelationSessionImpl corrSession=
+ getCorrelationSession(session, null);
+
+ if (corrSession != null) {
+ m_notifier.error(CORRELATER_REPORTED+details,
+ exc.toString(), corrSession,
+ session.getId().getServiceDescriptionName());
+ }
+ }
+
+ /**
+ * This method closes the service tracker.
+ *
+ */
+ public void close() {
+ }
+
+ /**
+ * This method returns the top level session associated with
+ * the supplied session.
+ *
+ * @param subsession The subsession
+ * @return The top level session
+ */
+ protected Session getTopLevelSession(Session subsession) {
+ Session ret=subsession;
+
+ while (ret instanceof InternalSession &&
+ ((InternalSession)ret).getParent() != null) {
+ ret = ((InternalSession)ret).getParent();
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method determines which correlation session should be
+ * used based on the supplied session and/or message.
+ *
+ * @param session The session, or null if stateless session
+ * @param mesg The message
+ * @return The correlation session, or null if not found
+ */
+ protected CorrelationSessionImpl getCorrelationSession(Session session,
+ Message mesg) {
+ CorrelationSessionImpl ret=null;
+
+ if (session != null) {
+
+ Session topLevelSession=getTopLevelSession(session);
+
+ if (topLevelSession != null) {
+ ret = m_sessionManager.getCorrelationSessionImpl(topLevelSession, mesg);
+ } else {
+ logger.warning("Failed to find top level session for '"+
+ session+"'");
+ }
+
+ if (ret == null) {
+ logger.severe("Failed to locate correlation session " +
+ "for service session '"+topLevelSession+"'");
+ }
+ } else if (mesg != null) {
+
+ // Stateless service
+ ret = m_sessionManager.getCorrelationSessionImpl(
+ mesg.getMessageIdentities());
+
+ if (ret == null) {
+ StringBuffer buf=new StringBuffer();
+
+ for (int i=0; mesg.getMessageIdentities() != null &&
+ i < mesg.getMessageIdentities().size(); i++) {
+
+ if (i > 0) {
+ buf.append(',');
+ }
+ buf.append(mesg.getMessageIdentities().get(i).getId());
+ }
+
+ logger.severe("Failed to locate correlation session " +
+ "for stateless service with identities '"+
+ buf.toString()+"'");
+
+ } else if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Found correlation session '"+ret+
+ "' for stateless service");
+ }
+ }
+
+ return(ret);
+ }
+
+ private static Logger logger = Logger.getLogger("org.pi4soa.service.correlator.impl");
+
+ private CorrelationSessionManager m_sessionManager=null;
+ private CorrelationNotifier m_notifier=null;
+}
Added: branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationNotifier.java
===================================================================
--- branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationNotifier.java (rev 0)
+++ branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationNotifier.java 2011-02-16 21:16:53 UTC (rev 679)
@@ -0,0 +1,279 @@
+/*
+ * Copyright 2005 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * Sep 9, 2005 : Initial version created by gary
+ */
+package org.savara.tools.monitor.correlator;
+
+import java.util.Vector;
+
+import org.pi4soa.cdl.ExchangeDetails;
+import org.pi4soa.service.Channel;
+import org.pi4soa.service.Message;
+import org.pi4soa.service.correlator.CorrelationSession;
+import org.pi4soa.service.correlator.ServiceCorrelatorListener;
+
+public class CorrelationNotifier implements ServiceCorrelatorListener {
+
+ /**
+ * This method indicates that the supplied choreography
+ * description has been registered with the service
+ * correlator.
+ *
+ * @param cdlpack The choreography description
+ */
+ public void choreographyDescriptionRegistered(org.pi4soa.cdl.Package cdlpack) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.choreographyDescriptionRegistered(cdlpack);
+ }
+ }
+ }
+
+ /**
+ * This method indicates that the supplied choreography
+ * description has been unregistered from the service
+ * correlator.
+ *
+ * @param cdlpack The choreography description
+ */
+ public void choreographyDescriptionUnregistered(org.pi4soa.cdl.Package cdlpack) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.choreographyDescriptionRegistered(cdlpack);
+ }
+ }
+ }
+
+ /**
+ * This method indicates that a new correlated session has
+ * been started.
+ *
+ * @param session The session
+ */
+ public void sessionStarted(CorrelationSession session) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.sessionStarted(session);
+ }
+ }
+ }
+
+ /**
+ * This method indicates that a correlated session has
+ * been finished.
+ *
+ * @param session The session
+ */
+ public void sessionFinished(CorrelationSession session) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.sessionFinished(session);
+ }
+ }
+ }
+
+ /**
+ * This method is invoked to indicate that a choreography
+ * exchange has been initiated by one participant.
+ *
+ * @param exchange The exchange details
+ * @param channel The channel associated with the exchange
+ * @param message The message
+ * @param session The session
+ * @param serviceDescriptionName The name of the service
+ * description that caused this exchange to
+ * be initiated
+ */
+ public void exchangeInitiated(ExchangeDetails exchange,
+ Channel channel, Message message,
+ CorrelationSession session, String serviceDescriptionName) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.exchangeInitiated(exchange,
+ channel, message, session,
+ serviceDescriptionName);
+ }
+ }
+ }
+
+ /**
+ * This method is invoked to indicate that a choreography
+ * exchange has been completed by the target participant.
+ *
+ * @param exchange The exchange details
+ * @param channel The channel associated with the exchange
+ * @param message The message
+ * @param session The session
+ * @param serviceDescriptionName The name of the service
+ * description that caused this exchange to
+ * be completed
+ */
+ public void exchangeCompleted(ExchangeDetails exchange,
+ Channel channel, Message message,
+ CorrelationSession session, String serviceDescriptionName) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.exchangeCompleted(exchange,
+ channel, message, session,
+ serviceDescriptionName);
+ }
+ }
+ }
+
+ /**
+ * This method is invoked to indicate that a message
+ * was unexpected at a participant.
+ *
+ * @param message The message
+ * @param session The session
+ * @param serviceDescriptionName The name of the service
+ * description that caused this unexpected
+ * message error
+ */
+ public void unexpectedMessage(Message message,
+ CorrelationSession session, String serviceDescriptionName) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.unexpectedMessage(message, session,
+ serviceDescriptionName);
+ }
+ }
+ }
+
+ /**
+ * An error occurred related to the specified correlation
+ * session.
+ *
+ * @param mesg The error message
+ * @param exception The optional exception details
+ * @param session The correlation session
+ * @param serviceDescriptionName The service name
+ */
+ public void error(String mesg, String exception,
+ CorrelationSession session, String serviceDescriptionName) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.error(mesg, exception, session,
+ serviceDescriptionName);
+ }
+ }
+ }
+
+ /**
+ * A warning occurred related to the specified correlation
+ * session.
+ *
+ * @param mesg The warning message
+ * @param exception The optional exception details
+ * @param session The correlation session
+ * @param serviceDescriptionName The service name
+ */
+ public void warning(String mesg, String exception,
+ CorrelationSession session, String serviceDescriptionName) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.warning(mesg, exception, session,
+ serviceDescriptionName);
+ }
+ }
+ }
+
+ /**
+ * An information event occurred related to the specified correlation
+ * session.
+ *
+ * @param mesg The information message
+ * @param session The correlation session
+ * @param serviceDescriptionName The service name
+ */
+ public void information(String mesg, CorrelationSession session,
+ String serviceDescriptionName) {
+
+ synchronized(m_listeners) {
+ for (int i=0; i < m_listeners.size(); i++) {
+ ServiceCorrelatorListener l=
+ (ServiceCorrelatorListener)m_listeners.get(i);
+
+ l.information(mesg, session,
+ serviceDescriptionName);
+ }
+ }
+ }
+
+ /**
+ * This method adds a listener for notifications regarding
+ * correlated sessions.
+ *
+ * @param l The listener
+ */
+ public void addServiceCorrelatorListener(ServiceCorrelatorListener l) {
+ synchronized(m_listeners) {
+ m_listeners.add(l);
+ }
+ }
+
+ /**
+ * This method removes a listener for notifications regarding
+ * correlated sessions.
+ *
+ * @param l The listener
+ */
+ public void removeServiceCorrelatorListener(ServiceCorrelatorListener l) {
+ synchronized(m_listeners) {
+ m_listeners.remove(l);
+ }
+ }
+
+ private Vector m_listeners=new Vector();
+}
Added: branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationSessionImpl.java
===================================================================
--- branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationSessionImpl.java (rev 0)
+++ branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationSessionImpl.java 2011-02-16 21:16:53 UTC (rev 679)
@@ -0,0 +1,277 @@
+/*
+ * Copyright 2005 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * Sep 8, 2005 : Initial version created by gary
+ */
+package org.savara.tools.monitor.correlator;
+
+import java.util.Vector;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.pi4soa.cdl.ExchangeDetails;
+import org.pi4soa.service.Channel;
+import org.pi4soa.service.Identity;
+import org.pi4soa.service.correlator.CorrelationSession;
+import org.pi4soa.service.session.Session;
+
+/**
+ * This class provides an implementation of the correlation
+ * session.
+ *
+ */
+public class CorrelationSessionImpl implements CorrelationSession {
+
+ /**
+ * This is the constructor for the correlation session.
+ *
+ * @param cdl The choreography description being correlated
+ */
+ public CorrelationSessionImpl(org.pi4soa.cdl.Package cdl) {
+ m_choreographyDescription = cdl;
+ }
+
+ /**
+ * This method returns the choreography description associated
+ * with the correlated session.
+ *
+ * @return The
+ */
+ public org.pi4soa.cdl.Package getChoreographyDescription() {
+ return(m_choreographyDescription);
+ }
+
+ /**
+ * This method associates a service session with the correlation
+ * session.
+ *
+ * @param session The service session
+ */
+ public void associateServiceSession(Session session) {
+ logger.fine("Associate service session '"+session+"'");
+
+ m_serviceSessions.add(session);
+ }
+
+ /**
+ * This method disassociates a service session from
+ * the correlation session.
+ *
+ * @param session The service session
+ */
+ public void disassociateServiceSession(Session session) {
+ logger.fine("Disassociate service session name '"+session+"'");
+
+ m_serviceSessions.remove(session);
+
+ // Apply identities to past values - this is used when
+ // all of the sessions are removed, but the session
+ // is not necessarily completed
+ java.util.Set<Identity> ids=session.getPrimaryIdentities();
+
+ java.util.Iterator<Identity> iter=ids.iterator();
+ while (iter.hasNext()) {
+ Identity cur=iter.next();
+
+ if (m_pastIdentities.contains(cur) == false) {
+
+ logger.info("Correlation session '"+this+
+ "' - adding identity to past list: "+cur);
+
+ m_pastIdentities.add(cur);
+ }
+ }
+ }
+
+ /**
+ * This method disassociates a service session from
+ * the correlation session.
+ *
+ * @param serviceName The service name
+ */
+ public void disassociateServiceSession(String serviceName) {
+ logger.fine("Disassociate service session name '"+serviceName+"'");
+
+ for (int i=m_serviceSessions.size()-1; i >= 0; i--) {
+ Session session=(Session)m_serviceSessions.get(i);
+
+ if (session.getId().getServiceDescriptionName().
+ equals(serviceName)) {
+
+ disassociateServiceSession(session);
+ }
+ }
+ }
+
+ /**
+ * This method returns the number of service sessions
+ * associated with the correlation session.
+ *
+ * @return The number of service sessions
+ */
+ public int getNumberOfServiceSessions() {
+ return(m_serviceSessions.size());
+ }
+
+ /**
+ * This method is invoked to indicate that a choreography
+ * exchange has been initiated by one participant.
+ *
+ * @param exchange The exchange details
+ * @param channel The channel associated with the exchange
+ */
+ public void exchangeInitiated(ExchangeDetails exchange, Channel channel) {
+
+ synchronized(m_initiated) {
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Exchange initiated="+exchange+" on channel="+channel);
+ }
+
+ m_initiated.add(exchange);
+ }
+ }
+
+ /**
+ * This method is invoked to indicate that a choreography
+ * exchange has been completed by a target participant.
+ *
+ * @param exchange The exchange details
+ * @param channel The channel associated with the exchange
+ */
+ public void exchangeCompleted(ExchangeDetails exchange, Channel channel) {
+
+ synchronized(m_initiated) {
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Exchange completed="+exchange+" on channel="+channel);
+ }
+
+ if (m_initiated.contains(exchange)) {
+ m_completed.add(exchange);
+
+ m_initiated.remove(exchange);
+ } else {
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("NOTE: Completed exchange="+
+ exchange+" has not been initiated");
+ }
+ }
+ }
+ }
+
+ /**
+ * This method returns the identities associated with this
+ * correlation session.
+ *
+ * @return The identities
+ */
+ public java.util.List<Identity> getIdentities() {
+ java.util.List<Identity> ret=new java.util.Vector<Identity>();
+
+ for (int i=0; i < m_pastIdentities.size(); i++) {
+ Identity pastId=(Identity)m_pastIdentities.get(i);
+
+ if (ret.contains(pastId) == false) {
+ ret.add(pastId);
+ }
+ }
+
+ for (int i=0; i < m_serviceSessions.size(); i++) {
+ Session session=(Session)m_serviceSessions.get(i);
+
+ java.util.Set<Identity> ids=session.getPrimaryIdentities();
+
+ java.util.Iterator<Identity> iter=ids.iterator();
+
+ while (iter.hasNext()) {
+ Identity cur=iter.next();
+
+ if (ret.contains(cur) == false) {
+ ret.add(cur);
+ }
+ }
+
+ if (session.getSessionIdentity() != null &&
+ ret.contains(session.getSessionIdentity()) == false) {
+ ret.add(session.getSessionIdentity());
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method determines whether the session is identified by
+ * the supplied ids.
+ *
+ * @param ids The identities
+ * @return Whether the session is associated with the supplied id
+ */
+ public boolean isIdentifiedBy(java.util.Collection<Identity> ids) {
+ boolean ret=false;
+
+ if (ids != null) {
+ java.util.Iterator<Identity> iter=ids.iterator();
+
+ while (ret == false && iter.hasNext()) {
+ Identity cur=iter.next();
+
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.finest("Is identified by="+cur);
+ }
+
+ for (int i=0; ret == false &&
+ i < m_serviceSessions.size(); i++) {
+ Session session=(Session)m_serviceSessions.get(i);
+
+ ret = session.isIdentifiedBy(cur);
+
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.finest("Checked id="+cur+
+ " against session="+session+" = "+ret);
+ }
+ }
+
+ for (int i=0; ret == false &&
+ i < m_pastIdentities.size(); i++) {
+ Identity pastId=(Identity)m_pastIdentities.get(i);
+
+ ret = pastId.equals(cur);
+
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.finest("Checked against past id="+pastId+" = "+ret);
+ }
+ }
+ }
+ }
+
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.finest("Is correlation session ("+this+
+ ") identified by "+ids+" = "+ret);
+ }
+
+ return(ret);
+ }
+
+ private static Logger logger = Logger.getLogger("org.pi4soa.service.correlator.impl");
+
+ private org.pi4soa.cdl.Package m_choreographyDescription=null;
+ private Vector m_serviceSessions=new Vector();
+ private Vector m_initiated=new Vector();
+ private Vector m_completed=new Vector();
+ private java.util.List<Identity> m_pastIdentities=new Vector<Identity>();
+}
Added: branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationSessionManager.java
===================================================================
--- branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationSessionManager.java (rev 0)
+++ branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/CorrelationSessionManager.java 2011-02-16 21:16:53 UTC (rev 679)
@@ -0,0 +1,359 @@
+/*
+ * Copyright 2005 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * Sep 8, 2005 : Initial version created by gary
+ */
+package org.savara.tools.monitor.correlator;
+
+import java.util.Hashtable;
+import java.util.Vector;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.pi4soa.service.Identity;
+import org.pi4soa.service.session.DefaultSessionManager;
+import org.pi4soa.service.session.Session;
+import org.pi4soa.service.session.SessionManagerException;
+
+/**
+ * This class provides the management of service and correlation
+ * sessions.
+ *
+ */
+public class CorrelationSessionManager extends DefaultSessionManager {
+
+ /**
+ * This is the constructor for the correlation session manager.
+ *
+ * @param notifier The notifier
+ */
+ public CorrelationSessionManager(CorrelationNotifier notifier) {
+ m_notifier = notifier;
+ }
+
+ /**
+ * This method adds a new session instance to the session manager,
+ * and returns a reference that can be used to retrieve the
+ * session at a later time.
+ *
+ * @param session The session
+ * @return The session reference for the added session
+ * @exception SessionManagerException Failed to add session
+ */
+ @Override
+ public void addSession(Session session)
+ throws SessionManagerException {
+ super.addSession(session);
+
+ // Synchronize on correlation session list, as
+ // other methods use these lists (pendingId and
+ // correlSession) at the same time
+ synchronized(m_correlationSessions) {
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Adding session '"+session+
+ "' to pending identification list");
+ }
+
+ // Add session to 'pending identification' list
+ m_pendingIdentification.add(session);
+ }
+ }
+
+ /**
+ * This method returns the correlation session implementation
+ * associated with the supplied session. If more than one
+ * correlation session is found to have the same identity
+ * information, then a merge of the correlation sessions will be
+ * performed.
+ *
+ * @param session The service session
+ * @param mesg The optional message
+ * @return The correlation session
+ */
+ protected CorrelationSessionImpl getCorrelationSessionImpl(Session session,
+ org.pi4soa.service.Message mesg) {
+ CorrelationSessionImpl corrSess=null;
+
+ synchronized(m_correlationSessions) {
+ boolean pendingStarted=false;
+
+ // TODO: Could check which choreography session this
+ // session can be added to - then generate 'participant'
+ // joined session messages?
+
+ // Find an appropriate correlation session to associate
+ // with the session
+ java.util.Set<Identity> primIds=session.getPrimaryIdentities();
+
+ corrSess = getCorrelationSessionImpl(primIds);
+
+ if (corrSess == null && mesg != null) {
+ // Check if message identities can find the
+ // correlation session
+ corrSess = getCorrelationSessionImpl(mesg.getMessageIdentities());
+ }
+
+ if (corrSess == null) {
+
+ if (primIds == null || primIds.size() == 0) {
+ logger.severe("Correlation session is going to be " +
+ "created with no primary ids available");
+ } else {
+ String str="Primary ids: ";
+
+ java.util.Iterator<Identity> iter=primIds.iterator();
+ while (iter.hasNext()) {
+ str += iter.next().getId();
+ }
+
+ logger.info(str);
+ }
+
+ // Find choreography for this session
+ org.pi4soa.cdl.Package cdlpack=
+ getChoreographyForService(session.getId().
+ getServiceDescriptionName());
+
+ if (cdlpack == null) {
+ logger.severe("Unable to find choreography for service '"+
+ session.getId().getServiceDescriptionName());
+ } else {
+ corrSess = new CorrelationSessionImpl(cdlpack);
+ m_correlationSessions.add(corrSess);
+
+ pendingStarted = true;
+
+ logger.info("New correlation session="+corrSess);
+ }
+ } else {
+
+ if (corrSess.getNumberOfServiceSessions() == 0) {
+
+ if (m_pendingCloseSessions.remove(corrSess)) {
+ logger.fine("Removed correlation session " +
+ "from pending close list: "+corrSess);
+ }
+ }
+ }
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Check if session '"+session+
+ "' is pending identification: "+
+ m_pendingIdentification.contains(session));
+ }
+
+ if (corrSess != null && m_pendingIdentification.contains(session)) {
+ corrSess.associateServiceSession(session);
+
+ logger.info("Associating service session '"+
+ session+"' with correlation session '"+
+ corrSess+"'");
+
+ m_pendingIdentification.remove(session);
+
+ // TODO: IDEAS: choreography session is used to store the
+ // list of initiated and completed activities (exchanges)
+ // recorded by the send and receive events for the
+ // associated CDL exchange activity. Possibly the list
+ // of completed activities is retained to act as an
+ // audit trail? Not sure if service sessions are necessary
+ // to be recorded against correlation session, but may
+ // provide some relevant details about participants joining
+ // choreography and then leaving.
+ }
+
+ if (pendingStarted) {
+ m_notifier.sessionStarted(corrSess);
+ }
+ }
+
+ return(corrSess);
+ }
+
+ /**
+ * This method removes a session instance from the session manager.
+ *
+ * @param session The session
+ * @exception SessionManagerException Failed to remove session
+ */
+ @Override
+ public void removeSession(Session session) throws SessionManagerException {
+
+ synchronized(m_correlationSessions) {
+ // TODO: May want to make this configurable, because we
+ // could just rely on the tracker events from each participant
+ // to inform us when they have completed
+
+ CorrelationSessionImpl corrSess=
+ getCorrelationSessionImpl(session.getPrimaryIdentities());
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Remove session '"+session+
+ "': correlation session="+corrSess);
+ }
+
+ if (corrSess != null) {
+ corrSess.disassociateServiceSession(session);
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Removing session '"+session+
+ "' from pending identification list");
+ }
+
+ // Remove from pending identification list just in case
+ m_pendingIdentification.remove(session);
+
+ if (corrSess.getNumberOfServiceSessions() == 0) {
+ pendingClose(corrSess);
+ }
+ }
+ }
+
+ super.removeSession(session);
+ }
+
+ /**
+ * This method removes the supplied correlation session.
+ *
+ * @param cs The correlation session
+ */
+ public void pendingClose(CorrelationSessionImpl cs) {
+
+ logger.info("Moving correlation session to pending close list: "+
+ cs);
+
+ m_pendingCloseSessions.add(cs);
+
+ //m_correlationSessions.remove(corrSess);
+
+ //m_notifier.sessionFinished(corrSess);
+ //synchronized(m_correlationSessions) {
+ //m_correlationSessions.remove(cs);
+ //}
+ }
+
+ /**
+ * This method returns the correlation session implementation
+ * associated with the supplied session. If more than one
+ * correlation session is found to have the same identity
+ * information, then a merge of the correlation sessions will be
+ * performed.
+ *
+ * @param session The service session
+ * @return The correlation session
+ */
+ protected CorrelationSessionImpl getCorrelationSessionImpl(java.util.Collection<Identity> ids) {
+ CorrelationSessionImpl ret=null;
+
+ synchronized(m_correlationSessions) {
+ // TODO: Get correlation session for primary identities
+ // associated with the supplied session. If none, then
+ // create one - not sure how we get the choreography
+ // description??? - if more than one, then we need to
+ // merge the correlation sessions
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Number of sessions="+m_correlationSessions.size());
+ }
+
+ Vector sessions=new Vector();
+ for (int i=0; i < m_correlationSessions.size(); i++) {
+ CorrelationSessionImpl cs=(CorrelationSessionImpl)
+ m_correlationSessions.get(i);
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Checking correlation session="+cs);
+ }
+
+ if (cs.isIdentifiedBy(ids)) {
+ sessions.add(cs);
+ }
+ }
+
+ if (sessions.size() > 1) {
+
+ logger.severe("MULTIPLE CORRELATION SESSIONS DETECTED - currently not handled");
+
+ // Merge sessions
+
+ // TODO: MERGING
+
+ } else if (sessions.size() == 1) {
+ ret = (CorrelationSessionImpl)sessions.get(0);
+ }
+ }
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Returning correlation session="+ret);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of correlation sessions.
+ *
+ * @return The correlation sessions
+ */
+ public java.util.List getCorrelationSessions() {
+ return(m_correlationSessions);
+ }
+
+ /**
+ * This method associates the supplied choreography with the
+ * service name.
+ *
+ * @param serviceName The service name
+ * @param cdlpack The choreography
+ */
+ public void registerServiceChoreography(String serviceName,
+ org.pi4soa.cdl.Package cdlpack) {
+ m_serviceChoreographies.put(serviceName, cdlpack);
+ }
+
+ /**
+ * This method disassociates the supplied choreography from the
+ * service name.
+ *
+ * @param serviceName The service name
+ * @param cdlpack The choreography
+ */
+ public void unregisterServiceChoreography(String serviceName,
+ org.pi4soa.cdl.Package cdlpack) {
+ m_serviceChoreographies.remove(serviceName);
+ }
+
+ /**
+ * This method returns the choreography description associated
+ * with the supplied service name. If no choreography description
+ * can be located, then a null is returned.
+ *
+ * @param serviceName The service name
+ * @return The choreography, or null if not found
+ */
+ public org.pi4soa.cdl.Package getChoreographyForService(String serviceName) {
+ return((org.pi4soa.cdl.Package)m_serviceChoreographies.get(serviceName));
+ }
+
+ private Vector m_correlationSessions=new Vector();
+ private Hashtable m_serviceChoreographies=new Hashtable();
+ private Vector m_pendingIdentification=new Vector();
+ private Vector m_pendingCloseSessions=new Vector();
+ private CorrelationNotifier m_notifier=null;
+
+ private static Logger logger = Logger.getLogger("org.pi4soa.service.correlator.impl");
+}
Added: branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/ServiceCorrelatorImpl.java
===================================================================
--- branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/ServiceCorrelatorImpl.java (rev 0)
+++ branches/experimental/2.0.x/tools/plugins/org.savara.tools.monitor/src/java/org/savara/tools/monitor/correlator/ServiceCorrelatorImpl.java 2011-02-16 21:16:53 UTC (rev 679)
@@ -0,0 +1,544 @@
+/*
+ * Copyright 2005 Pi4 Technologies Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ * Change History:
+ * Aug 25, 2005 : Initial version created by gary
+ */
+package org.savara.tools.monitor.correlator;
+
+import java.io.ByteArrayOutputStream;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Vector;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.xml.namespace.QName;
+
+import org.pi4soa.cdl.ParticipantType;
+import org.pi4soa.common.util.NamesUtil;
+import org.pi4soa.common.xml.XMLUtils;
+import org.pi4soa.service.Identity;
+import org.pi4soa.service.ServiceException;
+import org.pi4soa.service.behavior.ServiceDescription;
+import org.pi4soa.service.behavior.projection.BehaviorProjection;
+import org.pi4soa.service.correlator.CorrelationSession;
+import org.pi4soa.service.correlator.ServiceCorrelator;
+import org.pi4soa.service.correlator.ServiceCorrelatorListener;
+import org.pi4soa.service.monitor.DefaultMonitorConfiguration;
+import org.pi4soa.service.monitor.ServiceMonitor;
+import org.pi4soa.service.monitor.ServiceMonitorFactory;
+import org.pi4soa.service.tracker.TrackerEvent;
+import org.pi4soa.service.tracker.TrackerRecord;
+
+/**
+ * This class implements the service correlator interface.
+ *
+ */
+public class ServiceCorrelatorImpl implements ServiceCorrelator {
+
+ /**
+ * The default constructor for the service correlator
+ * implementation.
+ *
+ */
+ public ServiceCorrelatorImpl() {
+ initialize();
+ }
+
+ /**
+ * This method initializes the service correlator.
+ *
+ */
+ protected void initialize() {
+
+ m_notifier = new CorrelationNotifier();
+
+ m_sessionManager = new CorrelationSessionManager(m_notifier);
+
+ m_correlatingServiceTracker =
+ new CorrelatingServiceTracker(m_sessionManager, m_notifier);
+ }
+
+ /**
+ * This method registers a choreography description with the
+ * service correlator, to be informed when service tracker
+ * activities associated with the description are correlated.
+ *
+ * @param cdl The choreography description
+ * @exception ServiceException Failed to register
+ */
+ public void register(org.pi4soa.cdl.Package cdl)
+ throws ServiceException {
+
+ synchronized(m_choreographyDescriptions) {
+ if (m_choreographyDescriptions.containsKey(cdl)) {
+ throw new ServiceException("Choreography " +
+ "description already registered");
+ }
+
+ // Generate the endpoint projections and register them
+ // with the monitor (in its service repository)
+ Vector sds=new Vector();
+ java.util.List participants=
+ cdl.getTypeDefinitions().getParticipantTypes();
+
+ java.util.Iterator iter=participants.iterator();
+ while (iter.hasNext()) {
+ ParticipantType partType=(ParticipantType)
+ iter.next();
+
+ // CDL File path not provided, as not required
+ // for a service description that is only being
+ // used for correlation
+ ServiceDescription sd=
+ BehaviorProjection.projectServiceDescription(cdl,
+ partType, null);
+
+ DefaultMonitorConfiguration config=
+ new DefaultMonitorConfiguration();
+ config.setServiceTracker(m_correlatingServiceTracker);
+ config.setSessionManager(m_sessionManager);
+
+ ServiceMonitor serviceMonitor =
+ ServiceMonitorFactory.getServiceMonitor(config);
+ serviceMonitor.getConfiguration().getServiceRepository().
+ addServiceDescription(sd);
+
+ logger.info("Registering service monitor for '"+
+ sd.getFullyQualifiedName()+"'");
+
+ m_serviceMonitors.put(sd.getFullyQualifiedName(),
+ serviceMonitor);
+
+ m_serviceMonitors.put(getLocatedProtocolName(cdl, partType), serviceMonitor);
+
+ sds.add(sd);
+
+ m_sessionManager.registerServiceChoreography(
+ sd.getFullyQualifiedName(), cdl);
+
+ ByteArrayOutputStream baos=new ByteArrayOutputStream();
+ try {
+ org.pi4soa.service.util.ServiceDescriptionManager.save(
+ sd, baos);
+ logger.info(baos.toString());
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ // Register choreography description
+ m_choreographyDescriptions.put(cdl, sds);
+ }
+
+ // Notify any registered listeners
+ m_notifier.choreographyDescriptionRegistered(cdl);
+ }
+
+ protected String getLocatedProtocolName(org.pi4soa.cdl.Package cdl, ParticipantType partType) {
+ String ret=null;
+
+ ret = new QName(cdl.getTargetNamespace(), cdl.getName()).toString();
+
+ ret += "@"+XMLUtils.getLocalname(partType.getName());
+
+ return(ret);
+ }
+
+ /**
+ * This method unregisters the supplied choreography
+ * description, to ignore further correlation situations
+ * that occur related to this description.
+ *
+ * @param cdl The choreography description
+ * @exception ServiceException Failed to register
+ */
+ public void unregister(org.pi4soa.cdl.Package cdl)
+ throws ServiceException {
+ boolean unregistered=false;
+
+ synchronized(m_choreographyDescriptions) {
+ if (m_choreographyDescriptions.containsKey(cdl)) {
+
+ // Remove the endpoint projections, associated with
+ // the supplied choreography description and unregister them
+ // from the monitor's service repository
+ Vector sds=(Vector)m_choreographyDescriptions.get(cdl);
+
+ for (int i=0; i < sds.size(); i++) {
+ ServiceDescription sd=(ServiceDescription)sds.get(i);
+
+ ServiceMonitor serviceMonitor=(ServiceMonitor)
+ m_serviceMonitors.get(sd.getFullyQualifiedName());
+
+ serviceMonitor.getConfiguration().getServiceRepository().
+ removeServiceDescription(sd);
+
+ // TODO: Need to close down monitor
+
+ m_serviceMonitors.remove(sd.getFullyQualifiedName());
+
+ m_sessionManager.unregisterServiceChoreography(
+ sd.getFullyQualifiedName(), cdl);
+ }
+
+ m_choreographyDescriptions.remove(cdl);
+
+ unregistered = true;
+ }
+ }
+
+ if (unregistered) {
+ // Notify any registered listeners
+ m_notifier.choreographyDescriptionRegistered(cdl);
+ }
+ }
+
+ /**
+ * This method returns the list of choreography descriptions
+ * registered with the service correlator.
+ *
+ * @return The list of choreography descriptions
+ */
+ public org.pi4soa.cdl.Package[] getChoreographyDescriptions() {
+ org.pi4soa.cdl.Package[] ret=
+ new org.pi4soa.cdl.Package[m_choreographyDescriptions.size()];
+
+ Enumeration iter=m_choreographyDescriptions.elements();
+ int index=0;
+ while (iter.hasMoreElements()) {
+ ret[index++] = (org.pi4soa.cdl.Package)iter.nextElement();
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the current list of correlated
+ * sessions associated with the specified choreography
+ * description.
+ *
+ * @param cdl The choreography description
+ * @return The list of correlated sessions
+ */
+ public CorrelationSession[] getCorrelationSessions(org.pi4soa.cdl.Package cdl) {
+ CorrelationSession[] ret=null;
+ java.util.Vector tmp=new java.util.Vector();
+
+ java.util.List list=m_sessionManager.getCorrelationSessions();
+ for (int i=0; i < list.size(); i++) {
+ CorrelationSession sess=(CorrelationSession)list.get(i);
+
+ if (sess.getChoreographyDescription() == cdl) {
+ tmp.add(sess);
+ }
+ }
+
+ ret = new CorrelationSession[tmp.size()];
+ tmp.copyInto(ret);
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the correlated
+ * session associated with the specified choreography
+ * description and set of identities.
+ *
+ * @param cdl The choreography description
+ * @return The list of correlated sessions
+ * @exception ServiceException Failed to get single session for
+ * supplied choreography description and ids
+ */
+ public CorrelationSession getCorrelationSession(org.pi4soa.cdl.Package cdl,
+ java.util.List<Identity> ids) throws ServiceException {
+ CorrelationSession ret=null;
+
+ CorrelationSession[] sessions=getCorrelationSessions(cdl);
+ for (int i=0; sessions != null &&
+ i < sessions.length; i++) {
+ if (sessions[i].isIdentifiedBy(ids)) {
+
+ if (ret == null) {
+ ret = sessions[i];
+ } else {
+ throw new ServiceException("Multiple correlation "+
+ "sessions with same identity");
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a listener for notifications regarding
+ * correlated sessions.
+ *
+ * @param l The listener
+ */
+ public void addServiceCorrelatorListener(ServiceCorrelatorListener l) {
+ m_notifier.addServiceCorrelatorListener(l);
+ }
+
+ /**
+ * This method removes a listener for notifications regarding
+ * correlated sessions.
+ *
+ * @param l The listener
+ */
+ public void removeServiceCorrelatorListener(ServiceCorrelatorListener l) {
+ m_notifier.removeServiceCorrelatorListener(l);
+ }
+
+ /**
+ * This method is invoked to handle the supplied service
+ * tracker record.
+ *
+ * @param record The record
+ */
+ public void handleTrackerRecord(TrackerRecord record) {
+
+ // Obtain message related tracker events
+ if (record != null && record.getTrackerEvents() != null) {
+ ServiceMonitor serviceMonitor=null;
+
+ logger.info("Handle correlation record: "+record.toXML());
+
+ if (NamesUtil.isSet(record.getServiceDescriptionName())) {
+ serviceMonitor = (ServiceMonitor)
+ m_serviceMonitors.get(record.getServiceDescriptionName());
+
+ if (serviceMonitor == null) {
+ logger.info("Could not find Service Monitor for '"+
+ record.getServiceDescriptionName()+"'");
+ }
+ } else {
+ logger.info("Tracker record is not associated with a service");
+ }
+
+ for (int i=0; serviceMonitor != null &&
+ i < record.getTrackerEvents().length; i++) {
+ TrackerEvent event=record.getTrackerEvents()[i];
+
+ if (event.getEventType() == null) {
+
+ logger.warning("Tracker event '"+event+
+ "' has no event type");
+
+ } else if (event.getEventType().equals(TrackerEvent.RECEIVED_MESSAGE)) {
+
+ try {
+ serviceMonitor.messageReceived(event.getMessage());
+ } catch(Exception se) {
+ logger.log(Level.SEVERE,
+ "Failed to handle 'messageReceived' tracker event '"+
+ event.toXML()+"': "+se, se);
+
+ // Report error to notifier
+ java.util.List<Identity> ids=record.getPrimaryIdentities();
+
+ if ((ids == null || ids.size() == 0) &&
+ record.getSessionIdentity() != null) {
+ ids = new java.util.Vector<Identity>();
+ ids.add(record.getSessionIdentity());
+ }
+
+ CorrelationSessionImpl cs=
+ m_sessionManager.getCorrelationSessionImpl(ids);
+
+ m_notifier.error("Correlater detected problem: "+se.getMessage(),
+ event.getException(),
+ cs, record.getServiceDescriptionName());
+ }
+ } else if (event.getEventType().equals(TrackerEvent.SENT_MESSAGE)) {
+
+ try {
+ serviceMonitor.messageSent(event.getMessage());
+ } catch(Exception se) {
+ logger.log(Level.SEVERE,
+ "Failed to handle 'messageSent' tracker event '"+
+ event.toXML()+"': "+se, se);
+
+ // Report error to notifier
+ java.util.List<Identity> ids=record.getPrimaryIdentities();
+
+ if ((ids == null || ids.size() == 0) &&
+ record.getSessionIdentity() != null) {
+ ids = new java.util.Vector<Identity>();
+ ids.add(record.getSessionIdentity());
+ }
+
+ CorrelationSessionImpl cs=
+ m_sessionManager.getCorrelationSessionImpl(ids);
+
+ m_notifier.error("Correlater detected problem: "+se.getMessage(),
+ event.getException(),
+ cs, record.getServiceDescriptionName());
+ }
+ } else if (event.getEventType().equals(TrackerEvent.UNEXPECTED_MESSAGE)) {
+
+ java.util.List<Identity> ids=record.getPrimaryIdentities();
+
+ if ((ids == null || ids.size() == 0) &&
+ record.getSessionIdentity() != null) {
+ ids = new java.util.Vector<Identity>();
+ ids.add(record.getSessionIdentity());
+ }
+
+ CorrelationSessionImpl cs=
+ m_sessionManager.getCorrelationSessionImpl(ids);
+
+ m_notifier.unexpectedMessage(event.getMessage(),
+ cs, record.getServiceDescriptionName());
+
+ } else if (event.getEventType().equals(TrackerEvent.ERROR)) {
+
+ java.util.List<Identity> ids=record.getPrimaryIdentities();
+
+ if ((ids == null || ids.size() == 0) &&
+ record.getSessionIdentity() != null) {
+ ids = new java.util.Vector<Identity>();
+ ids.add(record.getSessionIdentity());
+ }
+
+ CorrelationSessionImpl cs=
+ m_sessionManager.getCorrelationSessionImpl(ids);
+
+ m_notifier.error(event.getDetails(),
+ event.getException(),
+ cs, record.getServiceDescriptionName());
+
+ } else if (event.getEventType().equals(TrackerEvent.WARNING)) {
+
+ java.util.List<Identity> ids=record.getPrimaryIdentities();
+
+ if ((ids == null || ids.size() == 0) &&
+ record.getSessionIdentity() != null) {
+ ids = new java.util.Vector<Identity>();
+ ids.add(record.getSessionIdentity());
+ }
+
+ CorrelationSessionImpl cs=
+ m_sessionManager.getCorrelationSessionImpl(ids);
+
+ m_notifier.warning(event.getDetails(),
+ event.getException(),
+ cs, record.getServiceDescriptionName());
+
+ } else if (event.getEventType().equals(TrackerEvent.INFORMATION)) {
+
+ java.util.List<Identity> ids=record.getPrimaryIdentities();
+
+ if ((ids == null || ids.size() == 0) &&
+ record.getSessionIdentity() != null) {
+ ids = new java.util.Vector<Identity>();
+ ids.add(record.getSessionIdentity());
+ }
+
+ CorrelationSessionImpl cs=
+ m_sessionManager.getCorrelationSessionImpl(ids);
+
+ m_notifier.information(event.getDetails(),
+ cs, record.getServiceDescriptionName());
+
+ } else if (event.getEventType().equals(TrackerEvent.UNHANDLED_EXCEPTION)) {
+
+ java.util.List<Identity> ids=record.getPrimaryIdentities();
+
+ if ((ids == null || ids.size() == 0) &&
+ record.getSessionIdentity() != null) {
+ ids = new java.util.Vector<Identity>();
+ ids.add(record.getSessionIdentity());
+ }
+
+ CorrelationSessionImpl cs=
+ m_sessionManager.getCorrelationSessionImpl(ids);
+
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.finest("Report as error: "+event.getDetails()+
+ " with exception "+event.getException());
+ }
+
+ m_notifier.error(event.getDetails(),
+ event.getException(),
+ cs, record.getServiceDescriptionName());
+
+ } else if (event.getEventType().equals(TrackerEvent.SERVICE_FINISHED)) {
+
+ // TODO: May be want to have a configuration
+ // parameter to indicate whether these tracker
+ // events should be used to close down service
+ // sessions - may be better to only use the
+ // observable exchanges to achieve this?
+ java.util.List<Identity> ids=record.getPrimaryIdentities();
+
+ if ((ids == null || ids.size() == 0) &&
+ record.getSessionIdentity() != null) {
+ ids = new java.util.Vector<Identity>();
+ ids.add(record.getSessionIdentity());
+ }
+
+ CorrelationSessionImpl cs=
+ m_sessionManager.getCorrelationSessionImpl(ids);
+
+ // If session not returned, then assume that
+ // it has already been tied up by the internal
+ // state of the monitored sessions
+ if (cs != null) {
+ cs.disassociateServiceSession(
+ record.getServiceDescriptionName());
+
+ // Check if correlation session has completed
+ if (cs.getNumberOfServiceSessions() == 0) {
+ m_sessionManager.pendingClose(cs);
+ }
+ }
+ } else if (logger.isLoggable(Level.FINEST)) {
+ logger.finest("Tracker event type not handled by correlator: "+
+ event.getEventType());
+ }
+ }
+ }
+
+ // TODO: Could possibly use the 'serviceFinished'
+ // events to indicate that the participant (service)
+ // will no longer be sending further messages -
+ // how can we use this information? Possibly ensuring
+ // that the correlated participant also indicates
+ // the end? Possibly send to the 'correlated session'
+ // which can then enable the information to be
+ // presented
+ }
+
+ /**
+ * This method returns the correlation session manager.
+ *
+ * @return The correlation session manager
+ */
+ protected CorrelationSessionManager getCorrelationSessionManager() {
+ return(m_sessionManager);
+ }
+
+ private static Logger logger = Logger.getLogger("org.pi4soa.service.correlator.impl");
+
+ private Hashtable m_choreographyDescriptions=new Hashtable();
+ private Hashtable m_serviceMonitors=new Hashtable();
+ private CorrelatingServiceTracker m_correlatingServiceTracker=null;
+ private CorrelationSessionManager m_sessionManager=null;
+ private CorrelationNotifier m_notifier=null;
+}
15 years, 1 month
savara SVN: r678 - in branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator: pi4soa and 1 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-16 12:58:08 -0500 (Wed, 16 Feb 2011)
New Revision: 678
Modified:
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidator.java
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceValidator.java
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
Log:
Changed protocol name to be the choreography, rather than the project, with the role qualifying the endpoint behaviour within the choreography.
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidator.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidator.java 2011-02-16 17:09:49 UTC (rev 677)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidator.java 2011-02-16 17:58:08 UTC (rev 678)
@@ -33,6 +33,13 @@
public ValidatorName getValidatorName();
/**
+ * The protocol name.
+ *
+ * @return The protocol name
+ */
+ public String getProtocolName();
+
+ /**
* This method processes a sent message against a service
* behavioural description.
*
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceValidator.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceValidator.java 2011-02-16 17:09:49 UTC (rev 677)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceValidator.java 2011-02-16 17:58:08 UTC (rev 678)
@@ -17,6 +17,8 @@
*/
package org.savara.validator.pi4soa;
+import javax.xml.namespace.QName;
+
import org.apache.log4j.Logger;
import org.savara.activity.model.Context;
@@ -59,6 +61,10 @@
return CDM_MODEL_TYPE;
}
+ public String getProtocolName() {
+ return(m_protocolName);
+ }
+
/**
* This method is called to update the model associated
* with the service validator.
@@ -74,6 +80,25 @@
java.io.InputStream is=getModel();
if (is != null) {
+ org.pi4soa.cdl.Package cdlpack=
+ org.pi4soa.service.util.DescriptionRetrievalUtil.instance().getCDLPackage(is);
+
+ if (cdlpack != null) {
+ m_protocolName = new QName(cdlpack.getTargetNamespace(), cdlpack.getName()).toString();
+ }
+
+ try {
+ is.close();
+ } catch(Exception e) {
+ logger.error("Failed to close model '"+
+ getValidatorName()+"' input stream", e);
+ }
+ }
+
+ // Get the endpoint description
+ is=getModel();
+
+ if (is != null) {
org.pi4soa.service.behavior.ServiceDescription sdesc=
org.pi4soa.service.util.DescriptionRetrievalUtil.instance().getServiceDescription(is,
getValidatorName().getRole());
@@ -253,4 +278,5 @@
private static final Logger logger = Logger.getLogger(Pi4SOAServiceValidator.class);
private org.pi4soa.service.monitor.ServiceMonitor m_monitor=null;
+ private String m_protocolName=null;
}
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-16 17:09:49 UTC (rev 677)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-16 17:58:08 UTC (rev 678)
@@ -31,6 +31,7 @@
import org.savara.activity.util.ActivityModelUtil;
import org.savara.common.config.Configuration;
import org.savara.common.config.file.FileConfiguration;
+import org.savara.common.util.XMLUtils;
import org.savara.validator.Endpoint;
import org.savara.validator.ServiceValidator;
import org.savara.validator.ServiceValidatorManager;
@@ -216,8 +217,8 @@
}
ProtocolAnalysis pa=new ProtocolAnalysis();
- pa.setProtocol(validators.get(i).getValidatorName().getModelName());
- pa.setRole(validators.get(i).getValidatorName().getRole());
+ pa.setProtocol(validators.get(i).getProtocolName());
+ pa.setRole(XMLUtils.getLocalname(validators.get(i).getValidatorName().getRole()));
pa.setExpected(validated);
ia.getAnalysis().add(pa);
15 years, 1 month
savara SVN: r677 - in branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator: pi4soa and 1 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-16 12:09:49 -0500 (Wed, 16 Feb 2011)
New Revision: 677
Removed:
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceRecorder.java
Modified:
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidator.java
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidatorFactory.java
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceValidator.java
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
Log:
Removed the 'recorder' validator implementation, as not necessary now, and modified the service validator interface to return the context information used for the activity events.
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidator.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidator.java 2011-02-15 23:29:24 UTC (rev 676)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidator.java 2011-02-16 17:09:49 UTC (rev 677)
@@ -17,6 +17,8 @@
*/
package org.savara.validator;
+import org.savara.activity.model.Context;
+
/**
* This interface represents a service validator responsible for
* validing a stream of ESB messages against a model.
@@ -38,7 +40,7 @@
* @param msg The message
* @throws Exception Failed to process sent message
*/
- public void messageSent(String mesgType, java.io.Serializable msg) throws Exception;
+ public java.util.List<Context> messageSent(String mesgType, java.io.Serializable msg) throws Exception;
/**
* This method processes a received message against a service
@@ -48,7 +50,7 @@
* @param msg The message
* @throws Exception Failed to process received message
*/
- public void messageReceived(String mesgType, java.io.Serializable msg) throws Exception;
+ public java.util.List<Context> messageReceived(String mesgType, java.io.Serializable msg) throws Exception;
/**
* This method is called to update the model associated
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidatorFactory.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidatorFactory.java 2011-02-15 23:29:24 UTC (rev 676)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/ServiceValidatorFactory.java 2011-02-16 17:09:49 UTC (rev 677)
@@ -63,8 +63,6 @@
new java.util.HashMap<String,Class<?>>();
static {
- m_validatorClasses.put(org.savara.validator.pi4soa.Pi4SOAServiceRecorder.getModelType(),
- org.savara.validator.pi4soa.Pi4SOAServiceRecorder.class);
m_validatorClasses.put(org.savara.validator.pi4soa.Pi4SOAServiceValidator.getModelType(),
org.savara.validator.pi4soa.Pi4SOAServiceValidator.class);
}
Deleted: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceRecorder.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceRecorder.java 2011-02-15 23:29:24 UTC (rev 676)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceRecorder.java 2011-02-16 17:09:49 UTC (rev 677)
@@ -1,159 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.validator.pi4soa;
-
-import org.apache.log4j.Logger;
-
-import org.savara.validator.AbstractServiceValidator;
-import org.savara.validator.ValidatorName;
-import org.pi4soa.common.util.MessageUtil;
-import org.pi4soa.service.ServiceException;
-import org.pi4soa.service.behavior.*;
-import org.pi4soa.service.monitor.*;
-
-/**
- * This class implements the pi4soa service validator responsible for
- * recording a stream of ESB messages.
- */
-public class Pi4SOAServiceRecorder extends AbstractServiceValidator {
-
- /**
- * This is the constructor for the pi4soa service
- * recorder implementation.
- *
- * @param name The validator name
- */
- public Pi4SOAServiceRecorder(ValidatorName name) {
- super(name);
-
- initialize();
- }
-
- /**
- * This method initializes the service recorder.
- */
- protected void initialize() {
- try {
- // Use XML configuration, to enable alternative
- // runtime configuration to be specified by
- // including a pi4soa.xml file in the environment
- DefaultMonitorConfiguration conf=
- new XMLMonitorConfiguration();
-
- conf.setValidateBehaviour(getValidatorName().isValidate());
-
- m_monitor = ServiceMonitorFactory.getServiceMonitor(conf);
-
- ServiceDescription sdesc=BehaviorFactory.eINSTANCE.createServiceDescription();
- sdesc.setName(getValidatorName().getRole());
-
- // Register service description
- m_monitor.getConfiguration().getServiceRepository().
- addServiceDescription(sdesc);
-
- logger.debug("Created monitor for service description "+sdesc.getFullyQualifiedName());
-
- } catch(Exception e) {
- logger.error("Failed to initialize service monitor: "+e);
- }
- }
-
- /**
- * This method returns the model type associated with this
- * service recorder.
- *
- * @return The model type
- */
- public static String getModelType() {
- return(ValidatorName.NO_MODEL_TYPE);
- }
-
- /**
- * This method is called to update the model associated
- * with the service validator.
- */
- public void update() {
- }
-
- /**
- * This method processes a sent message against a service
- * behavioural description.
- *
- * @param mesgType The optional message type
- * @param msg The message
- * @throws Exception Failed to process sent message
- */
- public void messageSent(String mesgType, java.io.Serializable msg) throws Exception {
-
- if (msg == null) {
- throw new ServiceException("Failed to obtain value from message: "+msg);
- }
-
- if (mesgType == null) {
- mesgType = MessageUtil.getMessageType(msg);
- }
-
- org.pi4soa.service.Message mesg=
- m_monitor.createMessage(mesgType,
- null, null, msg, null, null);
-
- synchronized(m_monitor) {
- m_monitor.messageSent(mesg);
- }
- }
-
- /**
- * This method processes a received message against a service
- * behavioural description.
- *
- * @param mesgType The optional message type
- * @param msg The message
- * @throws Exception Failed to process received message
- */
- public void messageReceived(String mesgType, java.io.Serializable msg) throws Exception {
-
- if (msg == null) {
- throw new ServiceException("Failed to obtain value from message: "+msg);
- }
-
- if (mesgType == null) {
- mesgType = MessageUtil.getMessageType(msg);
- }
-
- org.pi4soa.service.Message mesg=
- m_monitor.createMessage(mesgType,
- null, null, msg, null, null);
-
- synchronized(m_monitor) {
- m_monitor.messageReceived(mesg);
- }
- }
-
- /**
- * This method closes the service validator.
- *
- * @throws Exception Failed to close the service validator
- */
- public void close() throws Exception {
- m_monitor.close();
- }
-
- private static final Logger logger = Logger.getLogger(Pi4SOAServiceRecorder.class);
-
- private org.pi4soa.service.monitor.ServiceMonitor m_monitor=null;
-}
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceValidator.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceValidator.java 2011-02-15 23:29:24 UTC (rev 676)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/pi4soa/Pi4SOAServiceValidator.java 2011-02-16 17:09:49 UTC (rev 677)
@@ -19,6 +19,7 @@
import org.apache.log4j.Logger;
+import org.savara.activity.model.Context;
import org.savara.validator.AbstractServiceValidator;
import org.savara.validator.ValidatorName;
import org.pi4soa.common.util.MessageUtil;
@@ -159,7 +160,7 @@
* @param msg The message
* @throws Exception Failed to process sent message
*/
- public void messageSent(String mesgType, java.io.Serializable msg) throws Exception {
+ public java.util.List<Context> messageSent(String mesgType, java.io.Serializable msg) throws Exception {
if (msg == null) {
throw new ServiceException("Failed to obtain value from message: "+msg);
@@ -176,6 +177,8 @@
synchronized(m_monitor) {
m_monitor.messageSent(mesg);
}
+
+ return(getContexts(mesg));
}
/**
@@ -186,8 +189,8 @@
* @param msg The message
* @throws Exception Failed to process received message
*/
- public void messageReceived(String mesgType, java.io.Serializable msg) throws Exception {
-
+ public java.util.List<Context> messageReceived(String mesgType, java.io.Serializable msg) throws Exception {
+
if (msg == null) {
throw new ServiceException("Failed to obtain value from message: "+msg);
}
@@ -203,8 +206,41 @@
synchronized(m_monitor) {
m_monitor.messageReceived(mesg);
}
+
+ return(getContexts(mesg));
}
+ protected java.util.List<Context> getContexts(org.pi4soa.service.Message mesg) {
+ java.util.List<Context> ret=new java.util.Vector<Context>();
+
+ for (org.pi4soa.service.Identity id : mesg.getMessageIdentities()) {
+ Context context=new Context();
+ String name=null;
+ for (String token : id.getTokens()) {
+ if (name == null) {
+ name = token;
+ } else {
+ name += ":"+token;
+ }
+ }
+ context.setName(name);
+
+ String value=null;
+ for (Object val : id.getValues()) {
+ if (value == null) {
+ value = val.toString();
+ } else {
+ value += ":"+val.toString();
+ }
+ }
+ context.setValue(value);
+
+ ret.add(context);
+ }
+
+ return(ret);
+ }
+
/**
* This method closes the service validator.
*
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15 23:29:24 UTC (rev 676)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-16 17:09:49 UTC (rev 677)
@@ -200,13 +200,14 @@
for (int i=0; validators != null &&
i < validators.size(); i++) {
boolean validated=false;
+ java.util.List<org.savara.activity.model.Context> contexts=null;
try {
if (ia.isOutbound()) {
- validators.get(i).messageSent(ia.getParameter().get(0).getType(),
+ contexts = validators.get(i).messageSent(ia.getParameter().get(0).getType(),
ia.getParameter().get(0).getValue());
} else {
- validators.get(i).messageReceived(ia.getParameter().get(0).getType(),
+ contexts = validators.get(i).messageReceived(ia.getParameter().get(0).getType(),
ia.getParameter().get(0).getValue());
}
validated = true;
@@ -220,6 +221,10 @@
pa.setExpected(validated);
ia.getAnalysis().add(pa);
+
+ if (contexts != null) {
+ ia.getContext().addAll(contexts);
+ }
}
}
}
15 years, 1 month
savara SVN: r676 - branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-15 18:29:24 -0500 (Tue, 15 Feb 2011)
New Revision: 676
Modified:
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
Log:
Hook existing ServiceValidationManager as an ActivityValidator implementation.
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15 18:57:28 UTC (rev 675)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15 23:29:24 UTC (rev 676)
@@ -22,12 +22,16 @@
import org.savara.activity.ActivityNotifier;
import org.savara.activity.ActivityProcessor;
import org.savara.activity.ActivityProcessorFactory;
+import org.savara.activity.ActivityValidator;
import org.savara.activity.DefaultActivityProcessor;
import org.savara.activity.model.Activity;
+import org.savara.activity.model.InteractionActivity;
+import org.savara.activity.model.ProtocolAnalysis;
import org.savara.activity.notifier.jms.JMSActivityNotifier;
import org.savara.activity.util.ActivityModelUtil;
import org.savara.common.config.Configuration;
import org.savara.common.config.file.FileConfiguration;
+import org.savara.validator.Endpoint;
import org.savara.validator.ServiceValidator;
import org.savara.validator.ServiceValidatorManager;
import org.jboss.util.naming.NonSerializableFactory;
@@ -99,6 +103,10 @@
});
+ ActivityValidator validator=new SavaraActivityValidator();
+
+ dap.addActivityValidator(validator);
+
ActivityProcessorFactory.setActivityProcessor(dap);
}
@@ -164,4 +172,56 @@
logger.severe("Failed to unbind map: "+e);
}
}
+
+ public class SavaraActivityValidator implements ActivityValidator {
+
+ public void validate(Activity activity) {
+
+ if (activity instanceof InteractionActivity) {
+ InteractionActivity ia=(InteractionActivity)activity;
+ java.util.List<ServiceValidator> validators=null;
+ Endpoint endpoint=new Endpoint(ia.getDestinationType() != null ?
+ ia.getDestinationType() : ia.getDestinationAddress());
+
+ if (ia.isOutbound() == ia.isRequest()) {
+ validators = m_serviceValidatorManager.getOutputServiceValidators(endpoint);
+ } else {
+ validators = m_serviceValidatorManager.getInputServiceValidators(endpoint);
+ }
+
+ process(validators, ia);
+ }
+ }
+
+ public void process(java.util.List<ServiceValidator> validators, InteractionActivity ia) {
+
+ if (validators != null && validators.size() > 0 && ia.getParameter().size() == 1) {
+
+ for (int i=0; validators != null &&
+ i < validators.size(); i++) {
+ boolean validated=false;
+
+ try {
+ if (ia.isOutbound()) {
+ validators.get(i).messageSent(ia.getParameter().get(0).getType(),
+ ia.getParameter().get(0).getValue());
+ } else {
+ validators.get(i).messageReceived(ia.getParameter().get(0).getType(),
+ ia.getParameter().get(0).getValue());
+ }
+ validated = true;
+ } catch(Exception t) {
+ // Ignore
+ }
+
+ ProtocolAnalysis pa=new ProtocolAnalysis();
+ pa.setProtocol(validators.get(i).getValidatorName().getModelName());
+ pa.setRole(validators.get(i).getValidatorName().getRole());
+ pa.setExpected(validated);
+
+ ia.getAnalysis().add(pa);
+ }
+ }
+ }
+ }
}
15 years, 1 month
savara SVN: r675 - branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-15 13:57:28 -0500 (Tue, 15 Feb 2011)
New Revision: 675
Modified:
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/
Log:
Ignore Eclipse project metadata.
Property changes on: branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms
___________________________________________________________________
Added: svn:ignore
+ target
.settings
.classpath
.project
15 years, 1 month
savara SVN: r674 - branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-15 13:54:42 -0500 (Tue, 15 Feb 2011)
New Revision: 674
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator/Generator.java
Log:
Fix deploy.xml file name.
Modified: branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator/Generator.java
===================================================================
--- branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator/Generator.java 2011-02-15 18:04:41 UTC (rev 673)
+++ branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator/Generator.java 2011-02-15 18:54:42 UTC (rev 674)
@@ -69,7 +69,7 @@
private static final String INCLUDE_ELEMENT = "include";
private static final String XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
private static final String WSDL_IMPORT = "wsdl:import";
- private static final String BPEL_DEPLOY_DESCRIPTOR_FILENAME = "bpel-deploy.xml";
+ private static final String BPEL_DEPLOY_DESCRIPTOR_FILENAME = "deploy.xml";
private static final String XMLNS_PREFIX = "xmlns:";
private static final String SERVICE_LABEL = "service";
private static final String PROVIDE_LABEL = "provide";
15 years, 1 month
savara SVN: r673 - branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-15 13:04:41 -0500 (Tue, 15 Feb 2011)
New Revision: 673
Modified:
branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator/Generator.java
Log:
Add <process-events generate="all" /> to the deploy.xml.
Modified: branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator/Generator.java
===================================================================
--- branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator/Generator.java 2011-02-15 14:19:23 UTC (rev 672)
+++ branches/experimental/2.0.x/tools/plugins/org.savara.tools.bpel/src/java/org/savara/tools/bpel/generator/Generator.java 2011-02-15 18:04:41 UTC (rev 673)
@@ -64,6 +64,7 @@
*/
public class Generator {
+ private static final String PROCESS_EVENTS_LABEL = "process-events";
private static final String SCHEMA_LOCATION_ATTR = "schemaLocation";
private static final String INCLUDE_ELEMENT = "include";
private static final String XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
@@ -776,6 +777,11 @@
org.w3c.dom.Text activeText=doc.createTextNode(Boolean.TRUE.toString());
active.appendChild(activeText);
+ org.w3c.dom.Element processEvents=doc.createElement(PROCESS_EVENTS_LABEL);
+ processEvents.setAttribute("generate", "all");
+ proc.appendChild(processEvents);
+
+
// TODO: Need more info - possibly Contract should have interfaces based on
// the relationship between two roles, as this may provide the necessary
// information - but this requires the ability to have multiple interfaces
15 years, 1 month
savara SVN: r672 - in branches/experimental/2.0.x: bundles/org.savara.activity.notifier.jms and 16 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-15 09:19:23 -0500 (Tue, 15 Feb 2011)
New Revision: 672
Added:
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/Copyright.txt
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/MANIFEST.MF
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/build.properties
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/pom.xml
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/JMSActivityNotifier.java
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/
branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/Activator.java
branches/experimental/2.0.x/bundles/org.savara.common/Copyright.txt
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/savara.properties
Modified:
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/main/java/org/savara/common/config/file/FileConfiguration.java
branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/test/java/org/savara/common/config/file/FileConfigurationTest.java
branches/experimental/2.0.x/bundles/pom.xml
branches/experimental/2.0.x/integration/jboss/common/.classpath
branches/experimental/2.0.x/integration/jboss/common/pom.xml
branches/experimental/2.0.x/integration/jboss/common/src/main/configs/common-assembly.xml
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
Log:
Add JMS activity notifier support - currently publishes the event without validation against the protocol/choreography.
Added: branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/Copyright.txt
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/Copyright.txt (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/Copyright.txt 2011-02-15 14:19:23 UTC (rev 672)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
Added: branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/MANIFEST.MF
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/MANIFEST.MF (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/META-INF/MANIFEST.MF 2011-02-15 14:19:23 UTC (rev 672)
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: SAVARA Activity Notifier JMS
+Bundle-SymbolicName: org.savara.activity.notifier.jms
+Bundle-Version: 2.0.0.SNAPSHOT
+Bundle-Activator: org.savara.activity.notifier.jms.osgi.Activator
+Import-Package: org.osgi.framework;version="1.3.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.savara.activity,
+ org.savara.common
Added: branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/build.properties
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/build.properties (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/build.properties 2011-02-15 14:19:23 UTC (rev 672)
@@ -0,0 +1,4 @@
+source.. = src/main/java/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/pom.xml
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/pom.xml (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/pom.xml 2011-02-15 14:19:23 UTC (rev 672)
@@ -0,0 +1,44 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.activity.notifier.jms</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>Savara::Bundles::ActivityJMS</name>
+
+ <parent>
+ <groupId>org.savara</groupId>
+ <artifactId>bundles</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.common</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.activity</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>${osgi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/JMSActivityNotifier.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/JMSActivityNotifier.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/JMSActivityNotifier.java 2011-02-15 14:19:23 UTC (rev 672)
@@ -0,0 +1,252 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008-11, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.activity.notifier.jms;
+
+import java.io.ByteArrayOutputStream;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.jms.TextMessage;
+import javax.naming.Context;
+
+import org.savara.activity.ActivityNotifier;
+import org.savara.activity.model.Activity;
+import org.savara.activity.util.ActivityModelUtil;
+import org.savara.common.config.Configuration;
+
+/**
+ * This class provides the JMS implementation of the ActivityNotifier
+ * interface.
+ *
+ */
+public class JMSActivityNotifier implements ActivityNotifier {
+
+ public static final String JMS_DESTINATION = "savara.activity.notifier.jms.destination";
+ public static final String JMS_CONNECTION_FACTORY = "savara.activity.notifier.jms.connection.factory";
+
+ private static Logger logger = Logger.getLogger(JMSActivityNotifier.class.getName());
+
+ private String m_jndiInitialContextFactory=null;
+ private String m_jndiProviderURL=null;
+ private String m_jndiFactoryURLPackages=null;
+ private String m_jmsConnectionFactory=null;
+ private String m_jmsDestination=null;
+
+ private javax.jms.Connection m_connection=null;
+ private javax.jms.Session m_session=null;
+ private javax.jms.MessageProducer m_producer=null;
+
+ public void setConfiguration(Configuration config) {
+
+ logger.info("Initializing SAVARA JMS Activity Notifier");
+
+ // Set the properties from the supplied configuration
+ if (m_jndiInitialContextFactory == null) {
+ m_jndiInitialContextFactory = config.getProperty(Context.INITIAL_CONTEXT_FACTORY);
+ }
+
+ if (m_jndiProviderURL == null) {
+ m_jndiProviderURL = config.getProperty(Context.PROVIDER_URL);
+ }
+
+ if (m_jndiFactoryURLPackages == null) {
+ m_jndiFactoryURLPackages = config.getProperty(Context.URL_PKG_PREFIXES);
+ }
+
+ if (m_jmsConnectionFactory == null) {
+ m_jmsConnectionFactory = config.getProperty(JMS_CONNECTION_FACTORY);
+ }
+
+ if (m_jmsDestination == null) {
+ m_jmsDestination = config.getProperty(JMS_DESTINATION);
+ }
+
+ javax.naming.Context ctx=null;
+
+ try {
+ if (m_jndiInitialContextFactory != null) {
+ java.util.Properties jndiProps = new java.util.Properties();
+ jndiProps.setProperty(Context.INITIAL_CONTEXT_FACTORY,
+ m_jndiInitialContextFactory);
+ jndiProps.setProperty(Context.PROVIDER_URL,
+ m_jndiProviderURL);
+
+ if (m_jndiFactoryURLPackages != null) {
+ jndiProps.setProperty(Context.URL_PKG_PREFIXES,
+ m_jndiFactoryURLPackages);
+ }
+
+ ctx = new javax.naming.InitialContext(jndiProps);
+ } else {
+ if (logger.isLoggable(java.util.logging.Level.FINER)) {
+ logger.finer("Creating default initial context");
+ }
+ ctx = new javax.naming.InitialContext();
+ }
+ } catch(Exception e) {
+ logger.severe("Failed to create JNDI initial context: "+e);
+ }
+
+ // Get connection factory and destination topic
+ if (ctx != null) {
+
+ try {
+ javax.jms.ConnectionFactory factory =
+ (javax.jms.ConnectionFactory)
+ ctx.lookup(m_jmsConnectionFactory);
+
+ m_connection = factory.createConnection();
+
+ if (logger.isLoggable(Level.FINER)) {
+ logger.finer("Connection: "+m_connection);
+ }
+
+ javax.jms.Destination dest =
+ (javax.jms.Destination)ctx.lookup(m_jmsDestination);
+
+ m_session = m_connection.createSession(false,
+ javax.jms.Session.AUTO_ACKNOWLEDGE);
+
+ m_producer = m_session.createProducer(dest);
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine(Thread.currentThread()+
+ ": Created JMS Activity Notifier connection");
+ }
+
+ } catch(Exception e) {
+ logger.severe("Failed to create JMS connection: "+e);
+ }
+ }
+ }
+
+ /**
+ * This method sets the JNDI initial context factory class name.
+ *
+ * @param factory The factory class name
+ */
+ public void setJNDIInitialContextFactory(String factory) {
+ m_jndiInitialContextFactory = factory;
+ }
+
+ /**
+ * This method sets the provider URL that is used when publishing
+ * the tracker events.
+ *
+ * @param url The provider url
+ */
+ public void setJNDIProviderURL(String url) {
+ m_jndiProviderURL = url;
+ }
+
+ /**
+ * This method sets the JNDI factory URL packages.
+ *
+ * @param pkgs The packages
+ */
+ public void setJNDIFactoryURLPackages(String pkgs) {
+ m_jndiFactoryURLPackages = pkgs;
+ }
+
+ /**
+ * This method sets the JMS connection factory name, to
+ * be looked up within JNDI.
+ *
+ * @param cf The connection factory
+ */
+ public void setJMSConnectionFactory(String cf) {
+ m_jmsConnectionFactory = cf;
+ }
+
+ /**
+ * This method sets the JMS destination name, to
+ * be looked up within JNDI.
+ *
+ * @param dest The destination
+ */
+ public void setJMSDestination(String dest) {
+ m_jmsDestination = dest;
+ }
+
+ /**
+ * This method is used to publish the service tracker message.
+ *
+ * @param serviceName The service name
+ * @param session The session
+ * @param mesg The message
+ */
+ public void publish(Activity activity) {
+
+ if (m_producer != null) {
+
+ try {
+ ByteArrayOutputStream os=new ByteArrayOutputStream();
+
+ ActivityModelUtil.serialize(activity, os);
+
+ String act=new String(os.toByteArray());
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine(act);
+ }
+
+ TextMessage tm=m_session.createTextMessage(act);
+
+ if (logger.isLoggable(Level.FINEST)) {
+ logger.finest(Thread.currentThread()+
+ ": Sending JMS ServiceTracker record="+tm);
+ }
+
+ m_producer.send(tm);
+ } catch(Exception e) {
+ logger.severe("Failed to publish message: "+e);
+ }
+
+ } else {
+ logger.warning("Could not publish message: "+activity);
+ }
+ }
+
+ /**
+ * This method closes the activity notifier.
+ *
+ */
+ public void close() {
+
+ try {
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine(Thread.currentThread()+
+ ": Closing JMS Activity Notifier connection");
+ }
+
+ if (m_session != null) {
+ m_session.close();
+ m_session = null;
+ }
+
+ if (m_connection != null) {
+ m_connection.close();
+ m_connection = null;
+ }
+
+ } catch(Exception e) {
+ logger.severe("Failed to close JMS connection: "+e);
+ }
+ }
+
+}
Added: branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/Activator.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/Activator.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.activity.notifier.jms/src/main/java/org/savara/activity/notifier/jms/osgi/Activator.java 2011-02-15 14:19:23 UTC (rev 672)
@@ -0,0 +1,30 @@
+package org.savara.activity.notifier.jms.osgi;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
Added: branches/experimental/2.0.x/bundles/org.savara.common/Copyright.txt
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.common/Copyright.txt (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.common/Copyright.txt 2011-02-15 14:19:23 UTC (rev 672)
@@ -0,0 +1,17 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
Modified: branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/main/java/org/savara/common/config/file/FileConfiguration.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/main/java/org/savara/common/config/file/FileConfiguration.java 2011-02-15 12:06:56 UTC (rev 671)
+++ branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/main/java/org/savara/common/config/file/FileConfiguration.java 2011-02-15 14:19:23 UTC (rev 672)
@@ -41,7 +41,13 @@
initialize();
}
- return(m_properties == null ? null : m_properties.getString(name));
+ try {
+ return(m_properties == null ? null : m_properties.getString(name));
+ } catch(java.util.MissingResourceException mre) {
+ // Ignore
+ }
+
+ return(null);
}
}
Modified: branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/test/java/org/savara/common/config/file/FileConfigurationTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/test/java/org/savara/common/config/file/FileConfigurationTest.java 2011-02-15 12:06:56 UTC (rev 671)
+++ branches/experimental/2.0.x/bundles/org.savara.common.config.file/src/test/java/org/savara/common/config/file/FileConfigurationTest.java 2011-02-15 14:19:23 UTC (rev 672)
@@ -35,4 +35,15 @@
fail("Unexpected value '"+val+"', expecting 'testvalue'");
}
}
+
+ @org.junit.Test
+ public void testGetMissingProperty() {
+ FileConfiguration config=new FileConfiguration();
+
+ String val=config.getProperty("test.missing.property");
+
+ if (val != null) {
+ fail("'test.missing.property' should not be found");
+ }
+ }
}
Modified: branches/experimental/2.0.x/bundles/pom.xml
===================================================================
--- branches/experimental/2.0.x/bundles/pom.xml 2011-02-15 12:06:56 UTC (rev 671)
+++ branches/experimental/2.0.x/bundles/pom.xml 2011-02-15 14:19:23 UTC (rev 672)
@@ -21,6 +21,7 @@
<modules>
<module>org.savara.activity</module>
+ <module>org.savara.activity.notifier.jms</module>
<module>org.savara.bpel</module>
<module>org.savara.common</module>
<module>org.savara.common.config.file</module>
Modified: branches/experimental/2.0.x/integration/jboss/common/.classpath
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/.classpath 2011-02-15 12:06:56 UTC (rev 671)
+++ branches/experimental/2.0.x/integration/jboss/common/.classpath 2011-02-15 14:19:23 UTC (rev 672)
@@ -5,6 +5,7 @@
<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1.1/activation-1.1.1.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/security/jacc/1.0/jacc-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/jms/jms/1.1/jms-1.1.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
@@ -169,7 +170,9 @@
<classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.common/3.1.0.Final/org.pi4soa.common-3.1.0.Final.jar"/>
<classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.service/3.1.0.Final/org.pi4soa.service-3.1.0.Final.jar"/>
<classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.activity.notifier.jms/2.0.0-SNAPSHOT/org.savara.activity.notifier.jms-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.activity.notifier.jms/2.0.0-SNAPSHOT/org.savara.activity.notifier.jms-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.common.config.file/2.0.0-SNAPSHOT/org.savara.common.config.file-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.common.config.file/2.0.0-SNAPSHOT/org.savara.common.config.file-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/aop/pluggable-instrumentor/2.1.1.GA/pluggable-instrumentor-2.1.1.GA.jar"/>
Modified: branches/experimental/2.0.x/integration/jboss/common/pom.xml
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/pom.xml 2011-02-15 12:06:56 UTC (rev 671)
+++ branches/experimental/2.0.x/integration/jboss/common/pom.xml 2011-02-15 14:19:23 UTC (rev 672)
@@ -29,10 +29,25 @@
</dependency>
<dependency>
<groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.common</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.common.config.file</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.savara.bundles</groupId>
<artifactId>org.savara.activity</artifactId>
<version>${savara.version}</version>
</dependency>
<dependency>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.activity.notifier.jms</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.pi4soa</groupId>
<artifactId>org.pi4soa.common</artifactId>
<version>${pi4soa.version}</version>
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/configs/common-assembly.xml
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/configs/common-assembly.xml 2011-02-15 12:06:56 UTC (rev 671)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/configs/common-assembly.xml 2011-02-15 14:19:23 UTC (rev 672)
@@ -20,7 +20,10 @@
<outputDirectory>/lib</outputDirectory>
<includes>
<include>org.savara.integration:savara-jboss</include>
+ <include>org.savara.bundles:org.savara.common</include>
+ <include>org.savara.bundles:org.savara.common.config.file</include>
<include>org.savara.bundles:org.savara.activity</include>
+ <include>org.savara.bundles:org.savara.activity.notifier.jms</include>
<include>org.pi4soa:org.pi4soa.common</include>
<include>org.pi4soa:org.pi4soa.cdl</include>
<include>org.pi4soa:org.pi4soa.service</include>
Added: branches/experimental/2.0.x/integration/jboss/common/src/main/configs/savara.properties
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/configs/savara.properties (rev 0)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/configs/savara.properties 2011-02-15 14:19:23 UTC (rev 672)
@@ -0,0 +1,2 @@
+savara.activity.notifier.jms.destination = topic/tracker
+savara.activity.notifier.jms.connection.factory = ConnectionFactory
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15 12:06:56 UTC (rev 671)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15 14:19:23 UTC (rev 672)
@@ -24,8 +24,10 @@
import org.savara.activity.ActivityProcessorFactory;
import org.savara.activity.DefaultActivityProcessor;
import org.savara.activity.model.Activity;
+import org.savara.activity.notifier.jms.JMSActivityNotifier;
import org.savara.activity.util.ActivityModelUtil;
import org.savara.common.config.Configuration;
+import org.savara.common.config.file.FileConfiguration;
import org.savara.validator.ServiceValidator;
import org.savara.validator.ServiceValidatorManager;
import org.jboss.util.naming.NonSerializableFactory;
@@ -65,6 +67,14 @@
// Create ActivityProcessor
ActivityProcessor dap=new DefaultActivityProcessor();
+ FileConfiguration config=new FileConfiguration();
+
+ JMSActivityNotifier notifier=new JMSActivityNotifier();
+ notifier.setConfiguration(config);
+
+ dap.addActivityNotifier(notifier);
+
+ // TODO: Leave for now
dap.addActivityNotifier(new ActivityNotifier() {
public void setConfiguration(Configuration config) {
15 years, 1 month
savara SVN: r671 - in branches/experimental/2.0.x: bundles/org.savara.activity/src/test/java/org/savara/activity and 1 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-15 07:06:56 -0500 (Tue, 15 Feb 2011)
New Revision: 671
Modified:
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityNotifier.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityStore.java
branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/DefaultActivityProcessorTest.java
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
Log:
Change API to use 'setConfiguration' instead of 'initialize'.
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityNotifier.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityNotifier.java 2011-02-15 11:58:12 UTC (rev 670)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityNotifier.java 2011-02-15 12:06:56 UTC (rev 671)
@@ -34,7 +34,7 @@
*
* @param config
*/
- public void initialize(Configuration config);
+ public void setConfiguration(Configuration config);
/**
* This method publishes the supplied activity event.
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityStore.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityStore.java 2011-02-15 11:58:12 UTC (rev 670)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/main/java/org/savara/activity/ActivityStore.java 2011-02-15 12:06:56 UTC (rev 671)
@@ -34,7 +34,7 @@
*
* @param config
*/
- public void initialize(Configuration config);
+ public void setConfiguration(Configuration config);
/**
* This method logs the activity record.
Modified: branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/DefaultActivityProcessorTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/DefaultActivityProcessorTest.java 2011-02-15 11:58:12 UTC (rev 670)
+++ branches/experimental/2.0.x/bundles/org.savara.activity/src/test/java/org/savara/activity/DefaultActivityProcessorTest.java 2011-02-15 12:06:56 UTC (rev 671)
@@ -199,7 +199,7 @@
private java.util.List<Activity> m_store=new java.util.Vector<Activity>();
- public void initialize(Configuration config) {
+ public void setConfiguration(Configuration config) {
}
public void store(Activity activity) {
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15 11:58:12 UTC (rev 670)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15 12:06:56 UTC (rev 671)
@@ -67,7 +67,7 @@
dap.addActivityNotifier(new ActivityNotifier() {
- public void initialize(Configuration config) {
+ public void setConfiguration(Configuration config) {
}
public void publish(Activity activity) {
15 years, 1 month
savara SVN: r670 - in branches/experimental/2.0.x/integration/jboss: common/src/main/java/org/savara/validator/service and 3 other directories.
by do-not-reply@jboss.org
Author: objectiser
Date: 2011-02-15 06:58:12 -0500 (Tue, 15 Feb 2011)
New Revision: 670
Modified:
branches/experimental/2.0.x/integration/jboss/common/.classpath
branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
branches/experimental/2.0.x/integration/jboss/esb/.classpath
branches/experimental/2.0.x/integration/jboss/wsnative/.classpath
branches/experimental/2.0.x/integration/jboss/wsnative/pom.xml
branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/AbstractJBossWSNativeInterceptor.java
branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/JBossWSNativeClientInterceptor.java
branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/JBossWSNativeServerInterceptor.java
Log:
Introduce activity processor into jbossws interceptors.
Modified: branches/experimental/2.0.x/integration/jboss/common/.classpath
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/.classpath 2011-02-14 13:46:45 UTC (rev 669)
+++ branches/experimental/2.0.x/integration/jboss/common/.classpath 2011-02-15 11:58:12 UTC (rev 670)
@@ -1,184 +1,188 @@
-<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
- <classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
- <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1.1/activation-1.1.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/security/jacc/1.0/jacc-1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/>
- <classpathentry kind="var" path="M2_REPO/apache-avalon/avalon-framework/4.1.5/avalon-framework-4.1.5.jar"/>
- <classpathentry kind="var" path="M2_REPO/bcel/bcel/5.1/bcel-5.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/beanshell/bsh/1.3.0/bsh-1.3.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1.3/cglib-2.1.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar"/>
- <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar"/>
- <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-common/2.3.0/emf-common-2.3.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore/2.3.1/emf-ecore-2.3.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore-xmi/2.3.1/emf-ecore-xmi-2.3.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/gnu-getopt/getopt/1.0.12-brew/getopt-1.0.12-brew.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jacorb/jacorb/2.3.0jboss.patch6-brew/jacorb-2.3.0jboss.patch6-brew.jar"/>
- <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.10.0.GA/javassist-3.10.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.9-brew/jaxb-api-2.1.9-brew.jar"/>
- <classpathentry kind="var" path="M2_REPO/sun-jaxws/jaxws-api/2.1.1/jaxws-api-2.1.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-core/2.1.1.GA/jboss-aop-asintegration-core-2.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-jmx/2.1.1.GA/jboss-aop-asintegration-jmx-2.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-mc/2.1.1.GA/jboss-aop-asintegration-mc-2.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-aspects/2.1.1.GA/jboss-aop-aspects-2.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.6.GA/jboss-aop-mc-int-2.0.6.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-aspects/5.1.0.GA/jboss-as-aspects-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA-jboss-ha-legacy-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-connector/5.1.0.GA/jboss-as-connector-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-deployment/5.1.0.GA/jboss-as-deployment-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-ejb3/5.1.0.GA/jboss-as-ejb3-5.1.0.GA-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA-tests.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-jmx/5.1.0.GA/jboss-as-jmx-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-management/5.1.0.GA/jboss-as-management-5.1.0.GA-jsr77-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-mbeans/5.1.0.GA/jboss-as-mbeans-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-profileservice/5.1.0.GA/jboss-as-profileservice-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-security/5.1.0.GA/jboss-as-security-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-jmx-invoker-adaptor-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/bootstrap/jboss-bootstrap/1.0.0-Beta-3/jboss-bootstrap-1.0.0-Beta-3.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.6.GA/jboss-classloader-2.0.6.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.6.GA/jboss-classloading-2.0.6.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.GA/jboss-classloading-spi-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.6.GA/jboss-classloading-vfs-2.0.6.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.14.GA/jboss-common-core-2.2.14.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-corba-ots-spi/5.1.0.GA/jboss-corba-ots-spi-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-current-invocation-aspects/1.0.0.CR1/jboss-current-invocation-aspects-1.0.0.CR1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.6.GA/jboss-dependency-2.0.6.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.7.GA/jboss-deployers-client-2.0.7.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.7.GA/jboss-deployers-client-spi-2.0.7.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.7.GA/jboss-deployers-core-2.0.7.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.7.GA/jboss-deployers-core-spi-2.0.7.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.7.GA/jboss-deployers-impl-2.0.7.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.7.GA/jboss-deployers-spi-2.0.7.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.7.GA/jboss-deployers-structure-spi-2.0.7.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.7.GA/jboss-deployers-vfs-2.0.7.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.7.GA/jboss-deployers-vfs-spi-2.0.7.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-deployment-spi/5.1.0.GA/jboss-deployment-spi-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.GA/jboss-ejb-api-3.0.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-as-int/1.1.5/jboss-ejb3-as-int-1.1.5.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-cache/1.0.0/jboss-ejb3-cache-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-deployers/1.0.0/jboss-ejb3-deployers-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-endpoint/0.1.0/jboss-ejb3-endpoint-0.1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/1.0.0/jboss-ejb3-ext-api-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api-impl/1.0.0/jboss-ejb3-ext-api-impl-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-interceptors/1.0.2/jboss-ejb3-interceptors-1.0.2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-mc-int/1.0.1/jboss-ejb3-mc-int-1.0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-metadata/1.0.0/jboss-ejb3-metadata-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0-client.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-timerservice-spi/1.0.0/jboss-ejb3-timerservice-spi-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-transactions/1.0.0/jboss-ejb3-transactions-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-client/1.1.1.GA/jboss-ha-client-1.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.1.1.GA/jboss-ha-server-api-1.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-jbc/2.0.0.GA/jboss-ha-server-cache-jbc-2.0.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-spi/2.0.0.GA/jboss-ha-server-cache-spi-2.0.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-integration/5.1.0.GA/jboss-integration-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jacc-api/1.1.0.GA_SP1/jboss-jacc-api-1.1.0.GA_SP1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jad-api/1.2.0.GA/jboss-jad-api-1.2.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0.0.GA/jboss-jaspi-api-1.0.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.1.GA/jboss-javaee-5.0.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxws/3.0.1-native-2.0.4.GA/jboss-jaxws-3.0.1-native-2.0.4.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.GA/jboss-jca-api-1.5.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-jca-spi/5.0.3.GA/jboss-jca-spi-5.0.3.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.GA/jboss-jms-api-1.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jpa/jboss-jpa-deployers/1.0.0/jboss-jpa-deployers-1.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.6.GA/jboss-kernel-2.0.6.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/logbridge/jboss-logbridge/1.0.0.GA/jboss-logbridge-1.0.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-jdk/2.1.0.GA/jboss-logging-jdk-2.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.1.0.GA/jboss-logging-log4j-2.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.1.0.GA/jboss-logging-spi-2.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/logmanager/jboss-logmanager/1.0.0.GA/jboss-logmanager-1.0.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.1.0.CR8/jboss-managed-2.1.0.CR8.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/messaging/jboss-messaging/1.4.3.GA/jboss-messaging-1.4.3.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.1.GA/jboss-metadata-1.0.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.1.0.SP1/jboss-metatype-2.1.0.SP1.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.GA/jboss-profileservice-spi-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/remoting/jboss-remoting/2.5.1/jboss-remoting-2.5.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-remoting-aspects/1.0.2/jboss-remoting-aspects-1.0.2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-security-aspects/1.0.0.GA/jboss-security-aspects-1.0.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/security/jboss-security-spi/2.0.3.SP1/jboss-security-spi-2.0.3.SP1.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-serialization/1.0.3.GA/jboss-serialization-1.0.3.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/1.0.2.GA/jboss-server-manager-1.0.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.4.GA/jboss-test-1.1.4.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-transaction-aspects/1.0.0.GA/jboss-transaction-aspects-1.0.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.GA/jboss-transaction-spi-5.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.1.2.GA/jboss-vfs-2.1.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cache/jbosscache-core/3.1.0.GA/jbosscache-core-3.1.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx/2.0.3.SP1/jbosssx-2.0.3.SP1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx-client/2.0.3.SP1/jbosssx-client-2.0.3.SP1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxrpc/3.0.4.GA/jbossws-native-jaxrpc-3.0.4.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxws/3.1.2.GA/jbossws-native-jaxws-3.1.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-saaj/3.1.2.GA/jbossws-native-saaj-3.1.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-spi/1.0.3.GA/jbossws-spi-1.0.3.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbossxacml/2.0.3/jbossxacml-2.0.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.1.GA/jbossxb-2.0.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jgroups/jgroups/2.6.10.GA/jgroups-2.6.10.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnp-client/5.0.3.GA/jnp-client-5.0.3.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnpserver/5.0.3.GA/jnpserver-5.0.3.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jpl-pattern/jpl-pattern/1.0/jpl-pattern-1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/jpl-util/jpl-util/1.0/jpl-util-1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/sun-jaxws/jsr181-api/2.1.1/jsr181-api-2.1.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
- <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.cdl/3.1.0.Final/org.pi4soa.cdl-3.1.0.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.common/3.1.0.Final/org.pi4soa.common-3.1.0.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.service/3.1.0.Final/org.pi4soa.service-3.1.0.Final.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/aop/pluggable-instrumentor/2.1.1.GA/pluggable-instrumentor-2.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/quartz/quartz/1.6.0/quartz-1.6.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.1.GA/servlet-api-2.1.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/slf4j/slf4j-jboss-logging/1.0.2.GA/slf4j-jboss-logging-1.0.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0/stax-api-1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/xmlsec/1.4.2/xmlsec-1.4.2.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT.jar"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1.1/activation-1.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/security/jacc/1.0/jacc-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-avalon/avalon-framework/4.1.5/avalon-framework-4.1.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/bcel/bcel/5.1/bcel-5.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/beanshell/bsh/1.3.0/bsh-1.3.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1.3/cglib-2.1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar"/>
+ <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-common/2.3.0/emf-common-2.3.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore/2.3.1/emf-ecore-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore-xmi/2.3.1/emf-ecore-xmi-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/gnu-getopt/getopt/1.0.12-brew/getopt-1.0.12-brew.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jacorb/jacorb/2.3.0jboss.patch6-brew/jacorb-2.3.0jboss.patch6-brew.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.10.0.GA/javassist-3.10.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.9-brew/jaxb-api-2.1.9-brew.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxws/jaxws-api/2.1.1/jaxws-api-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-core/2.1.1.GA/jboss-aop-asintegration-core-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-jmx/2.1.1.GA/jboss-aop-asintegration-jmx-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-mc/2.1.1.GA/jboss-aop-asintegration-mc-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-aspects/2.1.1.GA/jboss-aop-aspects-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.6.GA/jboss-aop-mc-int-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-aspects/5.1.0.GA/jboss-as-aspects-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA-jboss-ha-legacy-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-connector/5.1.0.GA/jboss-as-connector-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-deployment/5.1.0.GA/jboss-as-deployment-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-ejb3/5.1.0.GA/jboss-as-ejb3-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA-tests.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-jmx/5.1.0.GA/jboss-as-jmx-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-management/5.1.0.GA/jboss-as-management-5.1.0.GA-jsr77-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-mbeans/5.1.0.GA/jboss-as-mbeans-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-profileservice/5.1.0.GA/jboss-as-profileservice-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-security/5.1.0.GA/jboss-as-security-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-jmx-invoker-adaptor-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/bootstrap/jboss-bootstrap/1.0.0-Beta-3/jboss-bootstrap-1.0.0-Beta-3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.6.GA/jboss-classloader-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.6.GA/jboss-classloading-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.GA/jboss-classloading-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.6.GA/jboss-classloading-vfs-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.14.GA/jboss-common-core-2.2.14.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-corba-ots-spi/5.1.0.GA/jboss-corba-ots-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-current-invocation-aspects/1.0.0.CR1/jboss-current-invocation-aspects-1.0.0.CR1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.6.GA/jboss-dependency-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.7.GA/jboss-deployers-client-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.7.GA/jboss-deployers-client-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.7.GA/jboss-deployers-core-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.7.GA/jboss-deployers-core-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.7.GA/jboss-deployers-impl-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.7.GA/jboss-deployers-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.7.GA/jboss-deployers-structure-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.7.GA/jboss-deployers-vfs-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.7.GA/jboss-deployers-vfs-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-deployment-spi/5.1.0.GA/jboss-deployment-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.GA/jboss-ejb-api-3.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-as-int/1.1.5/jboss-ejb3-as-int-1.1.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-cache/1.0.0/jboss-ejb3-cache-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-deployers/1.0.0/jboss-ejb3-deployers-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-endpoint/0.1.0/jboss-ejb3-endpoint-0.1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/1.0.0/jboss-ejb3-ext-api-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api-impl/1.0.0/jboss-ejb3-ext-api-impl-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-interceptors/1.0.2/jboss-ejb3-interceptors-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-mc-int/1.0.1/jboss-ejb3-mc-int-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-metadata/1.0.0/jboss-ejb3-metadata-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-timerservice-spi/1.0.0/jboss-ejb3-timerservice-spi-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-transactions/1.0.0/jboss-ejb3-transactions-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-client/1.1.1.GA/jboss-ha-client-1.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.1.1.GA/jboss-ha-server-api-1.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-jbc/2.0.0.GA/jboss-ha-server-cache-jbc-2.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-spi/2.0.0.GA/jboss-ha-server-cache-spi-2.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-integration/5.1.0.GA/jboss-integration-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jacc-api/1.1.0.GA_SP1/jboss-jacc-api-1.1.0.GA_SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jad-api/1.2.0.GA/jboss-jad-api-1.2.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0.0.GA/jboss-jaspi-api-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.1.GA/jboss-javaee-5.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxws/3.0.1-native-2.0.4.GA/jboss-jaxws-3.0.1-native-2.0.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.GA/jboss-jca-api-1.5.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-jca-spi/5.0.3.GA/jboss-jca-spi-5.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.GA/jboss-jms-api-1.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jpa/jboss-jpa-deployers/1.0.0/jboss-jpa-deployers-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.6.GA/jboss-kernel-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logbridge/jboss-logbridge/1.0.0.GA/jboss-logbridge-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-jdk/2.1.0.GA/jboss-logging-jdk-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.1.0.GA/jboss-logging-log4j-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.1.0.GA/jboss-logging-spi-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logmanager/jboss-logmanager/1.0.0.GA/jboss-logmanager-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.1.0.CR8/jboss-managed-2.1.0.CR8.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/messaging/jboss-messaging/1.4.3.GA/jboss-messaging-1.4.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.1.GA/jboss-metadata-1.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.1.0.SP1/jboss-metatype-2.1.0.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.GA/jboss-profileservice-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/remoting/jboss-remoting/2.5.1/jboss-remoting-2.5.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-remoting-aspects/1.0.2/jboss-remoting-aspects-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-security-aspects/1.0.0.GA/jboss-security-aspects-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jboss-security-spi/2.0.3.SP1/jboss-security-spi-2.0.3.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-serialization/1.0.3.GA/jboss-serialization-1.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/1.0.2.GA/jboss-server-manager-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.4.GA/jboss-test-1.1.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-transaction-aspects/1.0.0.GA/jboss-transaction-aspects-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.GA/jboss-transaction-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.1.2.GA/jboss-vfs-2.1.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cache/jbosscache-core/3.1.0.GA/jbosscache-core-3.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx/2.0.3.SP1/jbosssx-2.0.3.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx-client/2.0.3.SP1/jbosssx-client-2.0.3.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxrpc/3.0.4.GA/jbossws-native-jaxrpc-3.0.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxws/3.1.2.GA/jbossws-native-jaxws-3.1.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-saaj/3.1.2.GA/jbossws-native-saaj-3.1.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-spi/1.0.3.GA/jbossws-spi-1.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbossxacml/2.0.3/jbossxacml-2.0.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.1.GA/jbossxb-2.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jgroups/jgroups/2.6.10.GA/jgroups-2.6.10.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnp-client/5.0.3.GA/jnp-client-5.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnpserver/5.0.3.GA/jnpserver-5.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jpl-pattern/jpl-pattern/1.0/jpl-pattern-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jpl-util/jpl-util/1.0/jpl-util-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxws/jsr181-api/2.1.1/jsr181-api-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.cdl/3.1.0.Final/org.pi4soa.cdl-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.common/3.1.0.Final/org.pi4soa.common-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.service/3.1.0.Final/org.pi4soa.service-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/pluggable-instrumentor/2.1.1.GA/pluggable-instrumentor-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/quartz/quartz/1.6.0/quartz-1.6.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.1.GA/servlet-api-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/slf4j/slf4j-jboss-logging/1.0.2.GA/slf4j-jboss-logging-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0/stax-api-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/xmlsec/1.4.2/xmlsec-1.4.2.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file
Modified: branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-14 13:46:45 UTC (rev 669)
+++ branches/experimental/2.0.x/integration/jboss/common/src/main/java/org/savara/validator/service/ServiceValidatorService.java 2011-02-15 11:58:12 UTC (rev 670)
@@ -19,6 +19,13 @@
import java.util.logging.Logger;
+import org.savara.activity.ActivityNotifier;
+import org.savara.activity.ActivityProcessor;
+import org.savara.activity.ActivityProcessorFactory;
+import org.savara.activity.DefaultActivityProcessor;
+import org.savara.activity.model.Activity;
+import org.savara.activity.util.ActivityModelUtil;
+import org.savara.common.config.Configuration;
import org.savara.validator.ServiceValidator;
import org.savara.validator.ServiceValidatorManager;
import org.jboss.util.naming.NonSerializableFactory;
@@ -54,6 +61,35 @@
m_serviceValidatorManager = new ServiceValidatorManager();
rebind();
+
+ // Create ActivityProcessor
+ ActivityProcessor dap=new DefaultActivityProcessor();
+
+ dap.addActivityNotifier(new ActivityNotifier() {
+
+ public void initialize(Configuration config) {
+ }
+
+ public void publish(Activity activity) {
+ java.io.ByteArrayOutputStream baos=new java.io.ByteArrayOutputStream();
+
+ try {
+ ActivityModelUtil.serialize(activity, baos);
+
+ logger.info("PUBLISH ACTIVITY: "+baos.toString());
+
+ baos.close();
+ } catch(Exception e) {
+ logger.info("PUBLISH ACTIVITY: "+activity);
+ }
+ }
+
+ public void close() {
+ }
+
+ });
+
+ ActivityProcessorFactory.setActivityProcessor(dap);
}
/**
Modified: branches/experimental/2.0.x/integration/jboss/esb/.classpath
===================================================================
--- branches/experimental/2.0.x/integration/jboss/esb/.classpath 2011-02-14 13:46:45 UTC (rev 669)
+++ branches/experimental/2.0.x/integration/jboss/esb/.classpath 2011-02-15 11:58:12 UTC (rev 670)
@@ -10,9 +10,15 @@
<classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/esb/jbossesb-rosetta/4.7/jbossesb-rosetta-4.7.jar"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
<classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.cdl/3.1.0.Final/org.pi4soa.cdl-3.1.0.Final.jar"/>
<classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.common/3.1.0.Final/org.pi4soa.common-3.1.0.Final.jar"/>
<classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.service/3.1.0.Final/org.pi4soa.service-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="src" path="/savara-jboss"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
</classpath>
\ No newline at end of file
Modified: branches/experimental/2.0.x/integration/jboss/wsnative/.classpath
===================================================================
--- branches/experimental/2.0.x/integration/jboss/wsnative/.classpath 2011-02-14 13:46:45 UTC (rev 669)
+++ branches/experimental/2.0.x/integration/jboss/wsnative/.classpath 2011-02-15 11:58:12 UTC (rev 670)
@@ -183,9 +183,15 @@
<classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jvnet/mimepull/1.3/mimepull-1.3.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/netty/netty/3.1.5.GA/netty-3.1.5.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.cdl/3.1.0.Final/org.pi4soa.cdl-3.1.0.Final.jar"/>
<classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.common/3.1.0.Final/org.pi4soa.common-3.1.0.Final.jar"/>
<classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.service/3.1.0.Final/org.pi4soa.service-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.activity/2.0.0-SNAPSHOT/org.savara.activity-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/savara/bundles/org.savara.common/2.0.0-SNAPSHOT/org.savara.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/jboss/aop/pluggable-instrumentor/2.1.1.GA/pluggable-instrumentor-2.1.1.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/wscommons-policy/policy/1.0/policy-1.0.jar"/>
<classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar"/>
Modified: branches/experimental/2.0.x/integration/jboss/wsnative/pom.xml
===================================================================
--- branches/experimental/2.0.x/integration/jboss/wsnative/pom.xml 2011-02-14 13:46:45 UTC (rev 669)
+++ branches/experimental/2.0.x/integration/jboss/wsnative/pom.xml 2011-02-15 11:58:12 UTC (rev 670)
@@ -16,6 +16,11 @@
<dependencies>
<dependency>
+ <groupId>org.savara.bundles</groupId>
+ <artifactId>org.savara.activity</artifactId>
+ <version>${savara.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.savara.integration</groupId>
<artifactId>savara-jboss</artifactId>
<version>${savara.version}</version>
Modified: branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/AbstractJBossWSNativeInterceptor.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/AbstractJBossWSNativeInterceptor.java 2011-02-14 13:46:45 UTC (rev 669)
+++ branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/AbstractJBossWSNativeInterceptor.java 2011-02-15 11:58:12 UTC (rev 670)
@@ -26,7 +26,6 @@
import javax.xml.namespace.QName;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPElement;
-import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPFault;
import javax.xml.ws.handler.MessageContext;
@@ -34,8 +33,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.savara.validator.Endpoint;
-import org.savara.validator.ServiceValidatorManager;
+import org.pi4soa.common.util.NamesUtil;
+import org.pi4soa.common.xml.NameSpaceUtil;
+import org.pi4soa.common.xml.XMLUtils;
import org.jboss.ws.core.jaxws.handler.SOAPMessageContextJAXWS;
import org.jboss.ws.metadata.umdm.ParameterMetaData;
import org.jboss.wsf.common.DOMWriter;
@@ -50,36 +50,15 @@
private static Log logger = LogFactory.getLog(AbstractJBossWSNativeInterceptor.class);
- private ServiceValidatorManager m_serviceValidatorManager=null;
-
/**
- * This method returns the service validator manager.
- *
- * @return The service validator manager
- */
- protected ServiceValidatorManager getServiceValidatorManager() {
- if (m_serviceValidatorManager == null) {
- try {
- InitialContext ctx = new InitialContext();
- m_serviceValidatorManager =
- (ServiceValidatorManager)ctx.lookup("savara/ServiceValidatorManager");
- } catch (NamingException e) {
- throw new RuntimeException("Failed to locate Savara Service Validator Manager");
- }
- }
-
- return(m_serviceValidatorManager);
- }
-
- /**
* This method returns the message content.
*
* @param soapCtx The SOAP message context
* @return The message content
* @throws Exception Failed to get the message content
*/
- public static java.io.Serializable getMessage(SOAPMessageContext soapCtx) throws Exception {
- java.io.Serializable ret=null;
+ public static String getMessage(SOAPMessageContext soapCtx) throws Exception {
+ String ret=null;
SOAPElement elem = getMessageBody(soapCtx);
if (elem != null) {
@@ -132,10 +111,73 @@
}
}
}
+
+ if (ret == null) {
+ try {
+ ret = getMessageType(getMessage(soapCtx));
+ logger.debug("Message type (derived from content)="+ret);
+ } catch(Exception e) {
+ logger.error("Failed to get message type from message content", e);
+ }
+ } else {
+ logger.debug("Message type="+ret);
+ }
return(ret);
}
+ private static String getMessageType(Object value) {
+ String ret=null;
+
+ if (value instanceof org.w3c.dom.Node) {
+ String namespace=((org.w3c.dom.Node)value).getNamespaceURI();
+ String localpart=((org.w3c.dom.Node)value).getLocalName();
+
+ if (value instanceof org.w3c.dom.Element &&
+ ((org.w3c.dom.Element)value).hasAttributeNS(
+ "http://www.w3.org/2001/XMLSchema-instance", "type")) {
+ String type=((org.w3c.dom.Element)value).getAttributeNS(
+ "http://www.w3.org/2001/XMLSchema-instance", "type");
+
+ String prefix=org.pi4soa.common.xml.XMLUtils.getPrefix(type);
+
+ localpart = org.pi4soa.common.xml.XMLUtils.getLocalname(type);
+
+ if (prefix == null) {
+ namespace = null;
+ } else {
+ namespace = ((org.w3c.dom.Element)value).
+ getAttribute("xmlns:"+prefix);
+ if (NamesUtil.isSet(namespace) == false) {
+ namespace = null;
+ }
+ }
+ }
+
+ if (namespace == null) {
+ ret = localpart;
+ } else {
+ ret = NameSpaceUtil.getFullyQualifiedName(namespace,
+ localpart);
+ }
+ } else if (value instanceof String) {
+ ret = String.class.getName();
+
+ try {
+ org.w3c.dom.Node node=XMLUtils.getNode((String)value);
+
+ ret = getMessageType(node);
+ } catch(Exception e) {
+ logger.warn("Failed to obtain message type from value: "+value);
+ }
+
+ } else {
+ ret = value.getClass().getName();
+ }
+
+ return(ret);
+ }
+
protected static SOAPElement getMessageBody(SOAPMessageContext soapCtx) throws SOAPException {
SOAPElement ret=null;
@@ -167,7 +209,7 @@
* @param soapCtx The SOAP message context
* @return The endpoint
*/
- public static Endpoint getEndpoint(SOAPMessageContext soapCtx) {
+ public static QName getEndpoint(SOAPMessageContext soapCtx) {
QName service=(QName)soapCtx.get(MessageContext.WSDL_SERVICE);
if (logger.isDebugEnabled()) {
@@ -183,6 +225,6 @@
}
}
- return(service == null ? null : new Endpoint(service.toString()));
+ return(service);
}
}
Modified: branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/JBossWSNativeClientInterceptor.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/JBossWSNativeClientInterceptor.java 2011-02-14 13:46:45 UTC (rev 669)
+++ branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/JBossWSNativeClientInterceptor.java 2011-02-15 11:58:12 UTC (rev 670)
@@ -17,14 +17,16 @@
*/
package org.savara.validator.jbosswsnative;
-import javax.xml.soap.SOAPException;
+import javax.xml.namespace.QName;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.savara.validator.Endpoint;
-import org.savara.validator.ServiceValidator;
+import org.savara.activity.ActivityProcessor;
+import org.savara.activity.ActivityProcessorFactory;
+import org.savara.activity.model.InteractionActivity;
+import org.savara.activity.model.MessageParameter;
public class JBossWSNativeClientInterceptor extends AbstractJBossWSNativeInterceptor {
@@ -40,51 +42,30 @@
boolean ret=true;
SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
- Endpoint endpoint=getEndpoint(soapCtx);
+ QName endpoint=getEndpoint(soapCtx);
if (endpoint != null) {
- java.util.List<ServiceValidator> validators=
- getServiceValidatorManager().getOutputServiceValidators(endpoint);
- if (validators != null && validators.size() > 0) {
- boolean validated=false;
- Exception ex=null;
-
- for (int i=0; validators != null &&
- i < validators.size(); i++) {
- try {
- validators.get(i).messageReceived(getMessageType(soapCtx, false), getMessage(soapCtx));
- validated = true;
- } catch(Exception t) {
- // Ignore
- ex = t;
- }
- }
+ try {
+ ActivityProcessor ap=ActivityProcessorFactory.getActivityProcessor();
- // Only raise exception if none of the service
- // validators were able to validate the message
- if (validated == false) {
- String vnames="";
-
- for (int i=0; validators != null &&
- i < validators.size(); i++) {
- if (vnames.length() > 0) {
- vnames += ", ";
- }
- vnames += validators.get(i).getValidatorName();
- }
-
- logger.error("Failed to handle received message on endpoint '"+
- endpoint+"' validated against: "+vnames);
-
- if (logger.isDebugEnabled()) {
- logger.debug("Invalid received message", ex);
- }
-
- if (getServiceValidatorManager().isManagedMode()) {
- ret = false;
- }
- }
+ InteractionActivity ia=new InteractionActivity();
+
+ ia.setDestinationType(endpoint.toString());
+
+ ia.setRequest(false);
+ ia.setOutbound(false);
+
+ MessageParameter mp=new MessageParameter();
+ mp.setType(getMessageType(soapCtx, ia.isRequest()));
+ mp.setValue(getMessage(soapCtx));
+
+ ia.getParameter().add(mp);
+
+ ap.process(ia);
+
+ } catch(Exception e) {
+ logger.error("Failed to report interaction activity", e);
}
}
@@ -95,51 +76,30 @@
boolean ret=true;
SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
- Endpoint endpoint=getEndpoint(soapCtx);
+ QName endpoint=getEndpoint(soapCtx);
if (endpoint != null) {
- java.util.List<ServiceValidator> validators=
- getServiceValidatorManager().getOutputServiceValidators(endpoint);
- if (validators != null && validators.size() > 0) {
- boolean validated=false;
- Exception ex=null;
-
- for (int i=0; validators != null &&
- i < validators.size(); i++) {
- try {
- validators.get(i).messageSent(getMessageType(soapCtx, true), getMessage(soapCtx));
- validated = true;
- } catch(Exception t) {
- // Ignore
- ex = t;
- }
- }
+ try {
+ ActivityProcessor ap=ActivityProcessorFactory.getActivityProcessor();
- // Only raise exception if none of the service
- // validators were able to validate the message
- if (validated == false) {
- String vnames="";
-
- for (int i=0; validators != null &&
- i < validators.size(); i++) {
- if (vnames.length() > 0) {
- vnames += ", ";
- }
- vnames += validators.get(i).getValidatorName();
- }
-
- logger.error("Failed to handle received message on endpoint '"+
- endpoint+"' validated against: "+vnames);
-
- if (logger.isDebugEnabled()) {
- logger.debug("Invalid received message", ex);
- }
-
- if (getServiceValidatorManager().isManagedMode()) {
- ret = false;
- }
- }
+ InteractionActivity ia=new InteractionActivity();
+
+ ia.setDestinationType(endpoint.toString());
+
+ ia.setRequest(true);
+ ia.setOutbound(true);
+
+ MessageParameter mp=new MessageParameter();
+ mp.setType(getMessageType(soapCtx, ia.isRequest()));
+ mp.setValue(getMessage(soapCtx));
+
+ ia.getParameter().add(mp);
+
+ ap.process(ia);
+
+ } catch(Exception e) {
+ logger.error("Failed to report interaction activity", e);
}
}
Modified: branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/JBossWSNativeServerInterceptor.java
===================================================================
--- branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/JBossWSNativeServerInterceptor.java 2011-02-14 13:46:45 UTC (rev 669)
+++ branches/experimental/2.0.x/integration/jboss/wsnative/src/main/java/org/savara/validator/jbosswsnative/JBossWSNativeServerInterceptor.java 2011-02-15 11:58:12 UTC (rev 670)
@@ -17,14 +17,16 @@
*/
package org.savara.validator.jbosswsnative;
-import javax.xml.soap.SOAPException;
+import javax.xml.namespace.QName;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.savara.validator.Endpoint;
-import org.savara.validator.ServiceValidator;
+import org.savara.activity.ActivityProcessor;
+import org.savara.activity.ActivityProcessorFactory;
+import org.savara.activity.model.InteractionActivity;
+import org.savara.activity.model.MessageParameter;
public class JBossWSNativeServerInterceptor extends AbstractJBossWSNativeInterceptor {
@@ -40,52 +42,31 @@
boolean ret=true;
SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
- Endpoint endpoint=getEndpoint(soapCtx);
+ QName endpoint=getEndpoint(soapCtx);
if (endpoint != null) {
- java.util.List<ServiceValidator> validators=
- getServiceValidatorManager().getInputServiceValidators(endpoint);
- if (validators != null && validators.size() > 0) {
- boolean validated=false;
- Exception ex=null;
-
- for (int i=0; validators != null &&
- i < validators.size(); i++) {
- try {
- validators.get(i).messageReceived(getMessageType(soapCtx, true), getMessage(soapCtx));
- validated = true;
- } catch(Exception t) {
- // Ignore
- ex = t;
- }
- }
+ try {
+ ActivityProcessor ap=ActivityProcessorFactory.getActivityProcessor();
- // Only raise exception if none of the service
- // validators were able to validate the message
- if (validated == false) {
- String vnames="";
-
- for (int i=0; validators != null &&
- i < validators.size(); i++) {
- if (vnames.length() > 0) {
- vnames += ", ";
- }
- vnames += validators.get(i).getValidatorName();
- }
-
- logger.error("Failed to handle received message on endpoint '"+
- endpoint+"' validated against: "+vnames);
-
- if (logger.isDebugEnabled()) {
- logger.debug("Invalid received message", ex);
- }
-
- if (getServiceValidatorManager().isManagedMode()) {
- ret = false;
- }
- }
- }
+ InteractionActivity ia=new InteractionActivity();
+
+ ia.setDestinationType(endpoint.toString());
+
+ ia.setRequest(true);
+ ia.setOutbound(false);
+
+ MessageParameter mp=new MessageParameter();
+ mp.setType(getMessageType(soapCtx, ia.isRequest()));
+ mp.setValue(getMessage(soapCtx));
+
+ ia.getParameter().add(mp);
+
+ ap.process(ia);
+
+ } catch(Exception e) {
+ logger.error("Failed to report interaction activity", e);
+ }
}
return(ret);
@@ -95,51 +76,30 @@
boolean ret=true;
SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
- Endpoint endpoint=getEndpoint(soapCtx);
+ QName endpoint=getEndpoint(soapCtx);
if (endpoint != null) {
- java.util.List<ServiceValidator> validators=
- getServiceValidatorManager().getInputServiceValidators(endpoint);
- if (validators != null && validators.size() > 0) {
- boolean validated=false;
- Exception ex=null;
-
- for (int i=0; validators != null &&
- i < validators.size(); i++) {
- try {
- validators.get(i).messageSent(getMessageType(soapCtx, false), getMessage(soapCtx));
- validated = true;
- } catch(Exception t) {
- // Ignore
- ex = t;
- }
- }
+ try {
+ ActivityProcessor ap=ActivityProcessorFactory.getActivityProcessor();
- // Only raise exception if none of the service
- // validators were able to validate the message
- if (validated == false) {
- String vnames="";
-
- for (int i=0; validators != null &&
- i < validators.size(); i++) {
- if (vnames.length() > 0) {
- vnames += ", ";
- }
- vnames += validators.get(i).getValidatorName();
- }
-
- logger.error("Failed to handle received message on endpoint '"+
- endpoint+"' validated against: "+vnames);
-
- if (logger.isDebugEnabled()) {
- logger.debug("Invalid received message", ex);
- }
-
- if (getServiceValidatorManager().isManagedMode()) {
- ret = false;
- }
- }
+ InteractionActivity ia=new InteractionActivity();
+
+ ia.setDestinationType(endpoint.toString());
+
+ ia.setRequest(false);
+ ia.setOutbound(true);
+
+ MessageParameter mp=new MessageParameter();
+ mp.setType(getMessageType(soapCtx, ia.isRequest()));
+ mp.setValue(getMessage(soapCtx));
+
+ ia.getParameter().add(mp);
+
+ ap.process(ia);
+
+ } catch(Exception e) {
+ logger.error("Failed to report interaction activity", e);
}
}
15 years, 1 month