Skip to Content.
Sympa Menu

notify-dpml - r1189 - in trunk/main/metro/station: builder server/src/main/net/dpml/station/server

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1189 - in trunk/main/metro/station: builder server/src/main/net/dpml/station/server
  • Date: Wed, 15 Mar 2006 17:32:35 +0100

Author: mcconnell
Date: 2006-03-15 17:32:34 +0100 (Wed, 15 Mar 2006)
New Revision: 1189

Modified:
trunk/main/metro/station/builder/

trunk/main/metro/station/server/src/main/net/dpml/station/server/RemoteApplicationRegistry.java
Log:
disable station deployment (temporary)


Property changes on: trunk/main/metro/station/builder
___________________________________________________________________
Name: svn:ignore
+ target


Modified:
trunk/main/metro/station/server/src/main/net/dpml/station/server/RemoteApplicationRegistry.java
===================================================================
---
trunk/main/metro/station/server/src/main/net/dpml/station/server/RemoteApplicationRegistry.java
2006-03-15 16:07:28 UTC (rev 1188)
+++
trunk/main/metro/station/server/src/main/net/dpml/station/server/RemoteApplicationRegistry.java
2006-03-15 16:32:34 UTC (rev 1189)
@@ -18,6 +18,7 @@

package net.dpml.station.server;

+import java.net.URI;
import java.net.URL;
import java.util.Map;
import java.util.Hashtable;
@@ -37,14 +38,15 @@
import java.beans.XMLEncoder;
import java.beans.ExceptionListener;

+import net.dpml.station.ApplicationRegistry;
+import net.dpml.station.RegistryEvent;
+import net.dpml.station.RegistryListener;
+import net.dpml.station.builder.RegistryBuilder;
import net.dpml.station.info.StartupPolicy;
import net.dpml.station.info.ApplicationDescriptor;
import net.dpml.station.info.RegistryDescriptor;
import net.dpml.station.info.RegistryDescriptor.Entry;
import net.dpml.station.info.ApplicationRegistryRuntimeException;
-import net.dpml.station.ApplicationRegistry;
-import net.dpml.station.RegistryEvent;
-import net.dpml.station.RegistryListener;

import net.dpml.transit.util.StreamUtils;
import net.dpml.transit.Logger;
@@ -70,7 +72,7 @@
* @param url storage location
* @exception IOException if a I/O error occurs
*/
- public RemoteApplicationRegistry( Logger logger, URL url ) throws
IOException
+ public RemoteApplicationRegistry( Logger logger, URL url ) throws
Exception
{
super( logger );

@@ -257,6 +259,10 @@
{
return;
}
+
+ throw new UnsupportedOperationException( "flush" );
+
+ /*
ClassLoader current =
Thread.currentThread().getContextClassLoader();
ClassLoader context = StartupPolicy.class.getClassLoader();
Thread.currentThread().setContextClassLoader( context );
@@ -292,6 +298,7 @@
OutputStream dest = m_url.openConnection().getOutputStream();
StreamUtils.copyStream( input, dest, true );
getLogger().debug( "updated registry: " + m_url );
+ */
}
}

@@ -382,30 +389,31 @@
return "[registry]";
}

- private RegistryDescriptor loadRegistryDescriptor( URL url ) throws
IOException
+ private RegistryDescriptor loadRegistryDescriptor( URL url ) throws
Exception
{
if( null == url )
{
return new RegistryDescriptor( new Entry[0] );
}

- final ClassLoader loader =
Thread.currentThread().getContextClassLoader();
- try
+ RegistryBuilder builder = new RegistryBuilder();
+ Object object = builder.build( new URI( url.toString() ) );
+ if( object instanceof RegistryDescriptor )
{
- InputStream input = url.openStream();
- ClassLoader context = RegistryDescriptor.class.getClassLoader();
- Thread.currentThread().setContextClassLoader( context );
- XMLDecoder decoder = new XMLDecoder( new BufferedInputStream(
input ) );
- return (RegistryDescriptor) decoder.readObject();
+ return (RegistryDescriptor) object;
}
- catch( FileNotFoundException e )
+ else
{
- return new RegistryDescriptor( new Entry[0] );
+ final String error =
+ "The object returned from the uri ["
+ + url
+ + "] of the class ["
+ + object.getClass().getName()
+ + "] is not an instance of "
+ + RegistryDescriptor.class.getName()
+ + ".";
+ throw new IllegalArgumentException( error );
}
- finally
- {
- Thread.currentThread().setContextClassLoader( loader );
- }
}

private void processRegistryEvent( RegistryEvent event )




  • r1189 - in trunk/main/metro/station: builder server/src/main/net/dpml/station/server, mcconnell at BerliOS, 03/15/2006

Archive powered by MHonArc 2.6.24.

Top of Page