Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2730 - in development/main/transit: . core/handler/src/main/net/dpml/transit/cache core/handler/src/main/net/dpml/transit/network

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: niclas AT hedhman.org
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2730 - in development/main/transit: . core/handler/src/main/net/dpml/transit/cache core/handler/src/main/net/dpml/transit/network
  • Date: Mon, 06 Jun 2005 06:45:44 -0400

Author: niclas AT hedhman.org
Date: Mon Jun 6 06:45:42 2005
New Revision: 2730

Modified:

development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultCacheHandler.java

development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultResourceHost.java

development/main/transit/core/handler/src/main/net/dpml/transit/network/DelegatingAuthenticator.java
development/main/transit/transit.iws
Log:
Fixed authentication problem, triggered by required sign-in on transit
repository.

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultCacheHandler.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultCacheHandler.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultCacheHandler.java
Mon Jun 6 06:45:42 2005
@@ -65,9 +65,9 @@
import net.dpml.transit.util.Util;

/**
- * Default cache handler that maintains a file based cache. The handler
registers a
- * listener on the CacheHandler preferences node to listen for changes
related to
- * cache configuration, and another listener for changes to subsidiary node
changes
+ * Default cache handler that maintains a file based cache. The handler
registers a
+ * listener on the CacheHandler preferences node to listen for changes
related to
+ * cache configuration, and another listener for changes to subsidiary node
changes
* reflecting the addition, modification and removal of hosts.
*/
public class DefaultCacheHandler implements CacheHandler, CacheListener,
Handler
@@ -94,7 +94,7 @@

private CacheModel m_model;

- private final Map m_plugins = new WeakHashMap(); // plugin uris as keys
to plugin classes
+ private final Map m_plugins = new WeakHashMap(); // plugin uris as keys
to plugin classes

//
------------------------------------------------------------------------
// constructor
@@ -122,9 +122,9 @@
}

//
- // For all of the declared host models we check for hosts that do
not
+ // For all of the declared host models we check for hosts that do not
// declare a plugin uri. If no plugin uri is declared we are
dealing with
- // a classic resource host that serves as a bootstrap host. Leter
on the
+ // a classic resource host that serves as a bootstrap host. Leter
on the
// SecuredTransitContext will initialize this instance and we will
continue
// with host loading for plugin based resource hosts.
//
@@ -142,7 +142,7 @@
String id = host.getID();
if( m_logger.isDebugEnabled() )
{
- final String message =
+ final String message =
"Creating bootstrap host: " + id
+ "\nBase URL: " + host.getBaseURL();
m_logger.debug( message );
@@ -199,8 +199,8 @@
//
------------------------------------------------------------------------

/**
- * Initialization of the cache controller. This operation is invoked by
- * the secure transit context following the establishment of bootstrap
+ * Initialization of the cache controller. This operation is invoked by
+ * the secure transit context following the establishment of bootstrap
* services. During initialization the implementation loads any custom
* resource hosts.
*
@@ -223,14 +223,14 @@
catch( Throwable e )
{
//
- // TODO: mark the host model as invalid by apply
+ // TODO: mark the host model as invalid by apply
// the exception to the model
//

- final String error =
+ final String error =
"Dropping custom resource host due to a deployment
failure."
+ "\nHost ID: " + host.getID();
- m_logger.error( error, e );
+ m_logger.error( error, e );
}
}
}
@@ -249,14 +249,14 @@
File cache = file;
if( null == m_cacheDir )
{
- final String message =
+ final String message =
"Setting local cache directory."
+ "\nDirectory: " + cache;
m_logger.debug( message );
}
else
{
- final String message =
+ final String message =
"Changing cache directory."
+ "\nOld: " + m_cacheDir
+ "\nNew: " + cache;
@@ -585,8 +585,8 @@
}
catch( Throwable e )
{
- final String error =
- "An internal error occured while attempting to handle host
addition.";
+ final String error =
+ "An internal error occured while attempting to handle host
addition.";
m_model.getLogger().error( error, e );
}
}
@@ -618,7 +618,7 @@
// internals
//
------------------------------------------------------------------------

- private void handleHostAddition( HostModel model )
+ private void handleHostAddition( HostModel model )
throws UnknownHostException, TransitException, IOException
{
synchronized( m_resourceHosts )
@@ -631,14 +631,14 @@
}
else
{
- final String error =
+ final String error =
"Illegal attempt to override existing host handler: " + id;
throw new TransitException( error );
}
}
}

- private ResourceHost createResourceHost( HostModel model )
+ private ResourceHost createResourceHost( HostModel model )
throws UnknownHostException, TransitException, IOException
{
URI uri = model.getPluginURI();
@@ -678,7 +678,7 @@
}
catch( Exception e )
{
- final String error =
+ final String error =
"Unable to load a content handler plugin due to an
unexpected exception.";
throw new TransitException( error, e );
}
@@ -690,9 +690,9 @@
}
else
{
- final String error =
+ final String error =
"Host plugin is not assignable to a
net.dpml.transit.host.ResourceHost."
- + "\nPlugin URI: " + uri
+ + "\nPlugin URI: " + uri
+ "\nPlugin Class: " + clazz.getName();
throw new TransitException( error );
}
@@ -703,7 +703,7 @@
{
if( m_logger.isDebugEnabled() )
{
- final String message =
+ final String message =
"Creating new classic resource host."
+ "\nHost ID: " + model.getID()
+ "\nBase URL: " + model.getBaseURL();
@@ -715,7 +715,7 @@
}
catch( Throwable e )
{
- final String error =
+ final String error =
"Unexpected exception while attempting to load standard host:
" + model.getID()
+ "\nBase URL: " + model.getBaseURL();
throw new TransitException( error, e );

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultResourceHost.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultResourceHost.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/cache/DefaultResourceHost.java
Mon Jun 6 06:45:42 2005
@@ -112,7 +112,7 @@
// constructor
//
------------------------------------------------------------------------

- /**
+ /**
* Constructor for a resource host using a supplied host configuration.
*
* @param model the host model
@@ -137,7 +137,7 @@
//
------------------------------------------------------------------------

/**
- * Dispose of the manager. During disposal a manager is required to
+ * Dispose of the manager. During disposal a manager is required to
* release all references such as listeners and internal resources
* in preparation for garbage collection.
*/
@@ -166,7 +166,7 @@
}
catch( Exception e )
{
- final String error =
+ final String error =
"Could not complete host update due to a internal error.";
m_model.getLogger().error( error, e );
}
@@ -560,6 +560,18 @@
*/
public void checkServerTrusted( final X509Certificate[] certs, final
String authType )
{
+ try
+ {
+ PrintWriter log = Transit.getInstance().getLogWriter();
+ log.println( "NullTrustManager: authType=" + authType );
+ log.println( "Server Certificates" );
+ log.println( "-------------------" );
+ for( int i=0 ; i < certs.length ; i++ )
+ {
+ log.println( " " + certs[ i ] );
+ }
+ } catch( TransitException e )
+ {} // ignore
}

/**
@@ -569,6 +581,18 @@
*/
public void checkClientTrusted( final X509Certificate[] certs, final
String authType )
{
+ try
+ {
+ PrintWriter log = Transit.getInstance().getLogWriter();
+ log.println( "NullTrustManager: authType=" + authType );
+ log.println( "Client Certificates" );
+ log.println( "-------------------" );
+ for( int i=0 ; i < certs.length ; i++ )
+ {
+ log.println( " " + certs[ i ] );
+ }
+ } catch( TransitException e )
+ {} // ignore
}

/**

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/network/DelegatingAuthenticator.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/network/DelegatingAuthenticator.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/network/DelegatingAuthenticator.java
Mon Jun 6 06:45:42 2005
@@ -18,6 +18,9 @@

package net.dpml.transit.network;

+import net.dpml.transit.Transit;
+
+import java.io.PrintWriter;
import java.net.Authenticator;
import java.net.InetAddress;
import java.net.PasswordAuthentication;
@@ -129,12 +132,23 @@
String prompt = getRequestingPrompt();
String scheme = getRequestingScheme();
int port = getRequestingPort();
- String addr = getRequestingSite().toString();
- if( addr == null )
+ if( host == null )
{
- addr = host;
+ host = getRequestingSite().getHostName();
+ if( host == null || "".equals( host ) )
+ {
+ host = getRequestingSite().getHostAddress();
+ }
}
- RequestIdentifier id = new RequestIdentifier( addr, port, protocol,
scheme, prompt );
+ RequestIdentifier id = new RequestIdentifier( host, port, protocol,
scheme, prompt );
+ try
+ {
+ PrintWriter log = Transit.getInstance().getLogWriter();
+ log.println( "Authentication Required: " + id );
+ log.println( "Authenticators Available: " + m_authenticators );
+ } catch( Exception e )
+ {} // ignore
+
synchronized( m_authenticators )
{
TransitAuthenticator auth = (TransitAuthenticator)
m_authenticators.get( id );

Modified: development/main/transit/transit.iws
==============================================================================
--- development/main/transit/transit.iws (original)
+++ development/main/transit/transit.iws Mon Jun 6 06:45:42 2005
@@ -149,70 +149,70 @@
<first-group
selected-file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/LinkURLConnection.java">
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/adapter/AbstractAdapter.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="25" column="15" selection-start="753"
selection-end="753" vertical-scroll-proportion="0.17555267">
+ <state line="25" column="15" selection-start="753"
selection-end="753" vertical-scroll-proportion="0.17810026">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/adapter/NetworkMonitorAdapter.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="27" column="13" selection-start="790"
selection-end="790" vertical-scroll-proportion="-0.0039011703">
+ <state line="27" column="13" selection-start="790"
selection-end="790" vertical-scroll-proportion="0.047493402">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/adapter/RepositoryMonitorAdapter.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="13" selection-start="946"
selection-end="946" vertical-scroll-proportion="-2.2080624">
+ <state line="31" column="13" selection-start="946"
selection-end="946" vertical-scroll-proportion="0.019788919">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/ArtifactLinkManager.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="84" column="0" selection-start="2704"
selection-end="2909" vertical-scroll-proportion="0.82054615">
+ <state line="84" column="0" selection-start="2704"
selection-end="2909" vertical-scroll-proportion="0.89973617">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/FileLinkManager.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="62" column="0" selection-start="1931"
selection-end="2049" vertical-scroll-proportion="0.42912874">
+ <state line="62" column="0" selection-start="1931"
selection-end="2049" vertical-scroll-proportion="0.45778364">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/Handler.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="0" selection-start="1224"
selection-end="1224" vertical-scroll-proportion="0.35110533">
+ <state line="37" column="0" selection-start="1224"
selection-end="1224" vertical-scroll-proportion="0.35620052">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/Link.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="43" column="13" selection-start="1504"
selection-end="1504" vertical-scroll-proportion="0.10273082">
+ <state line="43" column="13" selection-start="1504"
selection-end="1504" vertical-scroll-proportion="0.15567282">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/LinkManager.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="29" column="17" selection-start="988"
selection-end="988" vertical-scroll-proportion="0.23407023">
+ <state line="29" column="17" selection-start="988"
selection-end="988" vertical-scroll-proportion="0.23746702">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/LinkURLConnection.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="159" column="15" selection-start="4564"
selection-end="4564" vertical-scroll-proportion="0.45383614">
+ <state line="159" column="15" selection-start="4564"
selection-end="4564" vertical-scroll-proportion="0.48416886">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/test/net/dpml/transit/test/LinkTestCase.java"
pinned="false">
<provider selected="true" editor-type-id="text-editor">
- <state line="35" column="13" selection-start="1031"
selection-end="1031" vertical-scroll-proportion="0.21456437">
+ <state line="35" column="13" selection-start="1031"
selection-end="1031" vertical-scroll-proportion="0.2176781">
<folding />
</state>
</provider>
@@ -236,13 +236,13 @@
</component>
<component name="NamedScopeManager" />
<component name="PackagesPane">
+ <expanded_node url="net.dpml.io" module="core-handler" type="package" />
<expanded_node url="net.dpml.transit.link" module="core-handler"
type="package" />
<expanded_node url="net.dpml" module="core-handler" type="package" />
<expanded_node url="net" module="core-handler" type="package" />
- <expanded_node url="net.dpml.io" module="core-handler" type="package" />
+ <expanded_node url="net.dpml.transit" module="core-handler"
type="package" />
<expanded_node url="" module="core-handler" type="module" />
<expanded_node url="net.dpml.lang" module="core-handler" type="package"
/>
- <expanded_node url="net.dpml.transit" module="core-handler"
type="package" />
</component>
<component name="ProjectPane" />
<component name="ProjectView">
@@ -274,6 +274,16 @@
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<module name="" />
</configuration>
+ <configuration selected="false" default="true" type="Applet"
factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE"
value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ </configuration>
<configuration selected="false" default="true" type="Remote"
factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
@@ -295,16 +305,6 @@
<value defaultName="wholeProject" />
</option>
</configuration>
- <configuration selected="false" default="true" type="Applet"
factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE"
value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- </configuration>
</component>
<component name="SelectInManager" />
<component name="StarteamConfiguration">
@@ -358,14 +358,14 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="0" y="0" width="1280" height="977" extended-state="6" />
+ <frame x="0" y="0" width="1279" height="977" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="CheckStyle" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.33" order="8" />
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false"
internal_type="docked" type="docked" visible="false" weight="0.33" order="8"
/>
<window_info id="TODO" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.33" order="7" />
<window_info id="SvgViewer" active="false" anchor="right"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.33" order="3" />
- <window_info id="Project" active="false" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="true"
weight="0.23208469" order="0" />
+ <window_info id="Project" active="false" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="true"
weight="0.22194922" order="0" />
<window_info id="Find" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.3302217" order="1" />
<window_info id="Structure" active="false" anchor="left"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.25" order="1" />
<window_info id="Messages" active="false" anchor="bottom"
auto_hide="false" internal_type="docked" type="docked" visible="false"
weight="0.3302217" order="8" />
@@ -489,70 +489,70 @@
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/adapter/AbstractAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="25" column="15" selection-start="753"
selection-end="753" vertical-scroll-proportion="0.17555267">
+ <state line="25" column="15" selection-start="753"
selection-end="753" vertical-scroll-proportion="0.17810026">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/adapter/NetworkMonitorAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="27" column="13" selection-start="790"
selection-end="790" vertical-scroll-proportion="-0.0039011703">
+ <state line="27" column="13" selection-start="790"
selection-end="790" vertical-scroll-proportion="0.047493402">
<folding />
</state>
</provider>
</entry>
<entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/adapter/RepositoryMonitorAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="13" selection-start="946"
selection-end="946" vertical-scroll-proportion="-2.2080624">
+ <state line="31" column="13" selection-start="946"
selection-end="946" vertical-scroll-proportion="0.019788919">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/LinkManager.java">
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/ArtifactLinkManager.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="29" column="17" selection-start="988"
selection-end="988" vertical-scroll-proportion="0.23407023">
+ <state line="84" column="0" selection-start="2704"
selection-end="2909" vertical-scroll-proportion="0.89973617">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/Handler.java">
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/FileLinkManager.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="0" selection-start="1224"
selection-end="1224" vertical-scroll-proportion="0.35110533">
+ <state line="62" column="0" selection-start="1931"
selection-end="2049" vertical-scroll-proportion="0.45778364">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/Link.java">
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/Handler.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="43" column="13" selection-start="1504"
selection-end="1504" vertical-scroll-proportion="0.10273082">
+ <state line="37" column="0" selection-start="1224"
selection-end="1224" vertical-scroll-proportion="0.35620052">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/ArtifactLinkManager.java">
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/Link.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="84" column="0" selection-start="2704"
selection-end="2909" vertical-scroll-proportion="0.82054615">
+ <state line="43" column="13" selection-start="1504"
selection-end="1504" vertical-scroll-proportion="0.15567282">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/FileLinkManager.java">
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/LinkManager.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="62" column="0" selection-start="1931"
selection-end="2049" vertical-scroll-proportion="0.42912874">
+ <state line="29" column="17" selection-start="988"
selection-end="988" vertical-scroll-proportion="0.23746702">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/core/handler/src/test/net/dpml/transit/test/LinkTestCase.java">
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/LinkURLConnection.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="35" column="13" selection-start="1031"
selection-end="1031" vertical-scroll-proportion="0.21456437">
+ <state line="159" column="15" selection-start="4564"
selection-end="4564" vertical-scroll-proportion="0.48416886">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/core/handler/src/main/net/dpml/transit/link/LinkURLConnection.java">
+ <entry
file="file://$PROJECT_DIR$/core/handler/src/test/net/dpml/transit/test/LinkTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="159" column="15" selection-start="4564"
selection-end="4564" vertical-scroll-proportion="0.45383614">
+ <state line="35" column="13" selection-start="1031"
selection-end="1031" vertical-scroll-proportion="0.2176781">
<folding />
</state>
</provider>



  • svn commit: r2730 - in development/main/transit: . core/handler/src/main/net/dpml/transit/cache core/handler/src/main/net/dpml/transit/network, niclas, 06/06/2005

Archive powered by MHonArc 2.6.24.

Top of Page