You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by ip...@apache.org on 2005/07/21 21:44:40 UTC
svn commit: r220173 - in
/webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser:
AbstractResourceAdvertiserHome.java AbstractResourceAdvertiserResource.java
ResourceAdvertiserHome.java
Author: ips
Date: Thu Jul 21 12:44:32 2005
New Revision: 220173
URL: http://svn.apache.org/viewcvs?rev=220173&view=rev
Log:
updated to compile against refactorings in latest WSRF
Removed:
webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserHome.java
Modified:
webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java
webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java
Modified: webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java (original)
+++ webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/AbstractResourceAdvertiserResource.java Thu Jul 21 12:44:32 2005
@@ -1,4 +1,3 @@
-
package org.apache.ws.muws.v1_0.impl.advertiser;
import org.apache.ws.addressing.EndpointReference;
@@ -8,28 +7,30 @@
* <p/>
* NOTE: This class is generated and is NOT meant to be modified.
*/
-public abstract class AbstractResourceAdvertiserResource implements org.apache.ws.resource.PropertiesResource, org.apache.ws.notification.base.NotificationProducerResource {
+public abstract class AbstractResourceAdvertiserResource implements org.apache.ws.resource.PropertiesResource,
+ org.apache.ws.notification.base.NotificationProducerResource
+{
/**
* The resource ID of the instance.
*/
protected String m_id;
- /** The EndpointReference for this resource **/
+ /**
+ * The EndpointReference for this resource *
+ */
protected EndpointReference m_endpointReference;
- /**
+ /**
* The set of properties associated with this resource.
*/
protected org.apache.ws.resource.properties.ResourcePropertySet m_propSet;
-
/**
* A list of termination listeners to be notified when the resource is terminated.
*/
private java.util.List m_terminationListeners = new java.util.ArrayList();
-
/**
* DOCUMENT_ME
*
@@ -57,9 +58,9 @@
*
* @param listener DOCUMENT_ME
*/
- public void addTerminationListener( org.apache.ws.resource.lifetime.ResourceTerminationListener listener)
+ public void addTerminationListener( org.apache.ws.resource.lifetime.ResourceTerminationListener listener )
{
- m_terminationListeners.add(listener);
+ m_terminationListeners.add( listener );
}
/**
@@ -74,50 +75,51 @@
public void destroy()
{
- org.apache.ws.resource.lifetime.ResourceTerminationEvent rte = new org.apache.ws.resource.lifetime.impl.ResourceTerminationEventImpl(getID(),"Resource Destroyed");
- for (int i = 0; i < m_terminationListeners.size(); i++)
- {
- org.apache.ws.resource.lifetime.ResourceTerminationListener resourceTerminationEventListener = (org.apache.ws.resource.lifetime.ResourceTerminationListener) m_terminationListeners.get(i);
- resourceTerminationEventListener.terminationOccurred(rte);
- }
+ org.apache.ws.resource.lifetime.ResourceTerminationEvent rte = new org.apache.ws.resource.lifetime.impl.ResourceTerminationEventImpl(
+ getID(), "Resource Destroyed" );
+ for ( int i = 0; i < m_terminationListeners.size(); i++ )
+ {
+ org.apache.ws.resource.lifetime.ResourceTerminationListener resourceTerminationEventListener = (org.apache.ws.resource.lifetime.ResourceTerminationListener) m_terminationListeners.get(
+ i );
+ resourceTerminationEventListener.terminationOccurred( rte );
+ }
return;
}
public void init()
{
- org.apache.ws.muws.advertiser.base.service.AdvertiserResourcePropertiesDocument propsDoc = org.apache.ws.muws.advertiser.base.service.AdvertiserResourcePropertiesDocument.Factory.newInstance();
+ org.apache.ws.muws.advertiser.base.service.AdvertiserResourcePropertiesDocument propsDoc = org.apache.ws.muws.advertiser.base.service.AdvertiserResourcePropertiesDocument.Factory.newInstance();
m_propSet = new org.apache.ws.resource.properties.impl.XmlBeansResourcePropertySet( propsDoc );
-
-
}
- /**
- * Returns the EndpointReference associated with this Resource.
- *
- * @return The Resource's EndpointReference or null if the EndpointReference has not been set.
- *
- * Note: It is the responsibility of the Resource creator to set the EndpointReference (i.e. ResourceHome impl)
- */
+ /**
+ * Returns the EndpointReference associated with this Resource.
+ *
+ * @return The Resource's EndpointReference or null if the EndpointReference has not been set.
+ * <p/>
+ * Note: It is the responsibility of the Resource creator to set the EndpointReference (i.e. ResourceHome
+ * impl)
+ */
public EndpointReference getEndpointReference()
{
- return m_endpointReference;
+ return m_endpointReference;
}
- /**
- * Sets the EndpointReference associated with this Resource.
- *
- * @param epr The Resource's EndpointReference.
- *
- * Note: It is the responsibility of the Resource creator to set the EndpointReference (i.e. ResourceHome impl)
- */
- public void setEndpointReference(EndpointReference epr)
+ /**
+ * Sets the EndpointReference associated with this Resource.
+ *
+ * @param epr The Resource's EndpointReference.
+ * <p/>
+ * Note: It is the responsibility of the Resource creator to set the EndpointReference (i.e. ResourceHome
+ * impl)
+ */
+ public void setEndpointReference( EndpointReference epr )
{
- m_endpointReference = epr;
+ m_endpointReference = epr;
}
-
/**
* @see org.apache.ws.resource.PropertiesResource#setResourcePropertySet(org.apache.ws.resource.properties.ResourcePropertySet)
*/
@@ -133,11 +135,13 @@
{
return m_propSet;
}
- org.apache.ws.notification.topics.TopicSpaceSet m_topicSpaceSet = new org.apache.ws.notification.topics.impl.TopicSpaceSetImpl(true);
- public org.apache.ws.notification.topics.TopicSpaceSet getTopicSpaceSet()
- {
- return m_topicSpaceSet;
- }
+ org.apache.ws.notification.topics.TopicSpaceSet m_topicSpaceSet = new org.apache.ws.notification.topics.impl.TopicSpaceSetImpl(
+ true );
+
+ public org.apache.ws.notification.topics.TopicSpaceSet getTopicSpaceSet()
+ {
+ return m_topicSpaceSet;
+ }
}
Modified: webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java
URL: http://svn.apache.org/viewcvs/webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java?rev=220173&r1=220172&r2=220173&view=diff
==============================================================================
--- webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java (original)
+++ webservices/muse/trunk/src/java/org/apache/ws/muws/v1_0/impl/advertiser/ResourceAdvertiserHome.java Thu Jul 21 12:44:32 2005
@@ -5,20 +5,18 @@
import org.apache.ws.resource.ResourceContext;
import org.apache.ws.resource.ResourceContextException;
import org.apache.ws.resource.ResourceException;
-import org.apache.ws.resource.ResourceKey;
import org.apache.ws.resource.ResourceUnknownException;
import org.apache.ws.resource.impl.AbstractResourceHome;
-import org.apache.ws.addressing.EndpointReference;
import javax.xml.namespace.QName;
-
import java.io.Serializable;
+import java.util.Map;
/**
* Home for ResourceAdvertiser WS-Resources.
*/
public class ResourceAdvertiserHome
- extends AbstractResourceAdvertiserHome
+ extends AbstractResourceHome
implements Serializable
{
@@ -88,4 +86,24 @@
{
return RESOURCE_KEY_NAME;
}
+
+ /**
+ * Map containing all FilesystemResource instances - this map <em>must</em> be static for
+ * compatibility with certain JNDI providers.
+ */
+ private static Map s_resources;
+
+ /**
+ * Returns a map of all FilesystemResource instances. Used by the {@link AbstractResourceHome}
+ * superclass.
+ */
+ protected synchronized final Map getResourceMap()
+ {
+ if ( s_resources == null )
+ {
+ s_resources = AbstractResourceHome.createResourceMap( m_resourceIsPersistent );
+ }
+ return s_resources;
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org