Hello, I cannot use the latest James because of Bug#8839. My PC have less resources to run the database software, and it is shutdown at every night. I have tried two methods to solve Bug#8839.
(a) add wrapper classes of File_Persistent_Object_Repository and File_Persistent_Stream_Repository. (These classes are part of cornerstone) See my sample. These classes replace AbstractFileRepository#initialize(). (b) replace cornerstone.jar with modified version. I downloaded a snapshot of 2002-06-04 with cvs, changed AbstractFileRepository#initialize(), and built all. The patch is cornerstone-kzmi.diff. (a) seems to work about mail repository with editing config.xml, but I couldn't find how to replace class for users repository. (After restarting of James, user listing/counting failed because of file-repository bug) Also, these classes depend on the implementations of cornerstone which is referred. (b) seems to work well in any repository. Now I'm using James-cvs with modified cornerstone.jar. In my changes, repository-id part is removed from filename and search-pattern. It violates the compatibility of the filename. But I think such replacement of the cornerstone would be better for the quality of James, and I would propose to include such improvement in the next measure release. Regards, --- Iwasa Kazmi
package altcornerstone; import java.io.File; import org.apache.avalon.cornerstone.blocks.masterstore.RepositoryManager; import org.apache.avalon.excalibur.io.ExtensionFileFilter; public class File_Persistent_Object_Repository extends org.apache.avalon.cornerstone.blocks.masterstore.File_Persistent_Object_Repository { /* replaces AbstractFileRepository#initialize() */ public void initialize() throws Exception { getLogger().info( "Init " + getClass().getName() + " Store" ); m_name = RepositoryManager.getName(); m_extension = getExtensionDecorator(); m_filter = new ExtensionFileFilter( m_extension ); final File directory = new File( m_path ); directory.mkdirs(); getLogger().info( getClass().getName() + " opened in " + m_path ); } }
package altcornerstone; import java.io.File; import org.apache.avalon.cornerstone.blocks.masterstore.RepositoryManager; import org.apache.avalon.excalibur.io.ExtensionFileFilter; public class File_Persistent_Stream_Repository extends org.apache.avalon.cornerstone.blocks.masterstore.File_Persistent_Stream_Repository { /* replaces AbstractFileRepository#initialize() */ public void initialize() throws Exception { getLogger().info( "Init " + getClass().getName() + " Store" ); m_name = RepositoryManager.getName(); m_extension = getExtensionDecorator(); m_filter = new ExtensionFileFilter( m_extension ); final File directory = new File( m_path ); directory.mkdirs(); getLogger().info( getClass().getName() + " opened in " + m_path ); } }
diff -Naur src-orig/java/org/apache/avalon/cornerstone/blocks/masterstore/AbstractFileRepository.java src/java/org/apache/avalon/cornerstone/blocks/masterstore/AbstractFileRepository.java --- src-orig/java/org/apache/avalon/cornerstone/blocks/masterstore/AbstractFileRepository.java 2002-05-18 18:50:38.000000000 +0900 +++ +src/java/org/apache/avalon/cornerstone/blocks/masterstore/AbstractFileRepository.java + 2002-12-09 12:24:28.000000000 +0900 @@ -89,7 +89,7 @@ getLogger().info( "Init " + getClass().getName() + " Store" ); m_name = RepositoryManager.getName(); - m_extension = "." + m_name + getExtensionDecorator(); + m_extension = getExtensionDecorator(); m_filter = new ExtensionFileFilter( m_extension ); final File directory = new File( m_path );
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>