You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2005/05/23 22:32:33 UTC
svn commit: r178015 - in /incubator/apollo/trunk/src:
site/content/tutorial/method_impls/filesys_resource_init.txt
templates/build.properties.vm
Author: scamp
Date: Mon May 23 13:32:33 2005
New Revision: 178015
URL: http://svn.apache.org/viewcvs?rev=178015&view=rev
Log: (empty)
Modified:
incubator/apollo/trunk/src/site/content/tutorial/method_impls/filesys_resource_init.txt
incubator/apollo/trunk/src/templates/build.properties.vm
Modified: incubator/apollo/trunk/src/site/content/tutorial/method_impls/filesys_resource_init.txt
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/tutorial/method_impls/filesys_resource_init.txt?rev=178015&r1=178014&r2=178015&view=diff
==============================================================================
--- incubator/apollo/trunk/src/site/content/tutorial/method_impls/filesys_resource_init.txt (original)
+++ incubator/apollo/trunk/src/site/content/tutorial/method_impls/filesys_resource_init.txt Mon May 23 13:32:33 2005
@@ -1,7 +1,17 @@
public void init()
{
- super.init();
+ super.init();
+
+ /**
+ * The ResourcePropertySet which contains all the defined ResourceProperties
+ */
+ org.apache.ws.resource.properties.ResourcePropertySet resourcePropertySet = getResourcePropertySet();
+ org.apache.ws.resource.properties.ResourceProperty resourceProperty = null;
+
+
+ try{
+
/*
* This is where you should associate the backend instance with
@@ -10,41 +20,41 @@
example.filesystem.backend.FileSystem m_fileSystem = new example.filesystem.backend.UnixFileSystem( m_id );
/*
- * Initialize each of our properties by calling prop.add(propElem) and/or prop.setCallback(callback)...
+ * Initialize each of our properties by calling resourceProperty.add(propElem) and/or resourceProperty.setCallback(callback)...
*/
- org.apache.ws.resource.properties.ResourceProperty prop = m_propSet.get( FilesystemPropertyQNames.DEVICESPECIALFILE );
+ resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.DEVICESPECIALFILE );
DeviceSpecialFileDocument deviceDocXBean = DeviceSpecialFileDocument.Factory.newInstance();
deviceDocXBean.setDeviceSpecialFile( m_fileSystem.getDeviceSpecialFile() );
- prop.add( deviceDocXBean );
+ resourceProperty.add( deviceDocXBean );
- prop = m_propSet.get( FilesystemPropertyQNames.TYPE );
+ resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.TYPE );
TypeDocument typeDocXBean = TypeDocument.Factory.newInstance();
typeDocXBean.setType( m_fileSystem.getType() );
- prop.add( typeDocXBean );
+ resourceProperty.add( typeDocXBean );
BackupFrequencyDocument backupDocXBean = BackupFrequencyDocument.Factory.newInstance();
backupDocXBean.setBackupFrequency( m_fileSystem.getBackupFrequency() );
- prop = m_propSet.get( FilesystemPropertyQNames.BACKUPFREQUENCY );
- prop.add( backupDocXBean );
- prop.setCallback( new example.filesystem.callback.BackupFrequencyCallback( m_fileSystem ) );
+ resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.BACKUPFREQUENCY );
+ resourceProperty.add( backupDocXBean );
+ resourceProperty.setCallback( new example.filesystem.callback.BackupFrequencyCallback( m_fileSystem ) );
CommentDocument commentDocXBean = CommentDocument.Factory.newInstance();
commentDocXBean.setComment( m_fileSystem.getComment() );
- prop = m_propSet.get( FilesystemPropertyQNames.COMMENT );
- prop.add( commentDocXBean );
- prop.setCallback( new example.filesystem.callback.CommentCallback( m_fileSystem ) );
+ resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.COMMENT );
+ resourceProperty.add( commentDocXBean );
+ resourceProperty.setCallback( new example.filesystem.callback.CommentCallback( m_fileSystem ) );
FsckPassNumberDocument fsckDocXBean = FsckPassNumberDocument.Factory.newInstance();
fsckDocXBean.setFsckPassNumber( m_fileSystem.getFsckPassNumber() );
- prop = m_propSet.get( FilesystemPropertyQNames.FSCKPASSNUMBER );
- prop.add( fsckDocXBean );
- prop.setCallback( new example.filesystem.callback.FsckPassNumberCallback( m_fileSystem ) );
+ resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.FSCKPASSNUMBER );
+ resourceProperty.add( fsckDocXBean );
+ resourceProperty.setCallback( new example.filesystem.callback.FsckPassNumberCallback( m_fileSystem ) );
MountPointDirectoryDocument mountPointDocXBean = MountPointDirectoryDocument.Factory.newInstance();
mountPointDocXBean.setMountPointDirectory( m_fileSystem.getMountPoint() );
- prop = m_propSet.get( FilesystemPropertyQNames.MOUNTPOINTDIRECTORY );
- prop.add( mountPointDocXBean );
- prop.setCallback( new example.filesystem.callback.MountPointCallback( m_fileSystem ) );
+ resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.MOUNTPOINTDIRECTORY );
+ resourceProperty.add( mountPointDocXBean );
+ resourceProperty.setCallback( new example.filesystem.callback.MountPointCallback( m_fileSystem ) );
OptionsDocument optionsDocXBean =
OptionsDocument.Factory.newInstance();
@@ -57,8 +67,19 @@
options.addOption( (String) backendOptions.get( i ) );
}
- prop = m_propSet.get( FilesystemPropertyQNames.OPTIONS );
- prop.add( optionsDocXBean );
- prop.setCallback( new example.filesystem.callback.OptionsCallback( m_fileSystem ) );
+ resourceProperty = resourcePropertySet.get( FilesystemPropertyQNames.OPTIONS );
+ resourceProperty.add( optionsDocXBean );
+ resourceProperty.setCallback( new example.filesystem.callback.OptionsCallback( m_fileSystem ) );
+
+
+ }
+ catch (Exception e)
+ {
+ throw new javax.xml.rpc.JAXRPCException("There was a problem in initializing your resource properties. Please check your init() method. Cause: " + e.getLocalizedMessage());
+ }
+ // Resource Property {http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd}TerminationTime is implemented by the framework.
+ // Resource Property {http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd}CurrentTime is implemented by the framework.
+
+
}
Modified: incubator/apollo/trunk/src/templates/build.properties.vm
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/templates/build.properties.vm?rev=178015&r1=178014&r2=178015&view=diff
==============================================================================
--- incubator/apollo/trunk/src/templates/build.properties.vm (original)
+++ incubator/apollo/trunk/src/templates/build.properties.vm Mon May 23 13:32:33 2005
@@ -5,7 +5,7 @@
# Uncomment and modify the below lines if you would like to deploy to a
# webapp located somewhere other than the default location of
# ../webapps/$generated.WebappName (e.g. \${env.CATALINA_HOME}/webapps/$generated.WebappName )
-#$generated.WebappName.webapp.dir =
+#${generated.WebappName}.webapp.dir =
# Uncomment and modify the below lines if you require a proxy to connect to external web sites
#http.proxyHost = proxy.xyz.com
---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org