]> source.dussan.org Git - archiva.git/commitdiff
package move to o.a.a.r module redback-keys-jdo
authorOlivier Lamy <olamy@apache.org>
Sat, 7 Apr 2012 22:13:20 +0000 (22:13 +0000)
committerOlivier Lamy <olamy@apache.org>
Sat, 7 Apr 2012 22:13:20 +0000 (22:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1310887 13f79535-47bb-0310-9956-ffa450edef68

redback-keys/redback-keys-providers/redback-keys-jdo/src/main/java/org/apache/archiva/redback/keys/jdo/JdoKeyManager.java [new file with mode: 0644]
redback-keys/redback-keys-providers/redback-keys-jdo/src/main/java/org/codehaus/plexus/redback/keys/jdo/JdoKeyManager.java [deleted file]
redback-keys/redback-keys-providers/redback-keys-jdo/src/main/resources/META-INF/spring-context.xml
redback-keys/redback-keys-providers/redback-keys-jdo/src/test/java/org/apache/archiva/redback/keys/jdo/JdoKeyManagerTest.java [new file with mode: 0644]
redback-keys/redback-keys-providers/redback-keys-jdo/src/test/java/org/codehaus/plexus/redback/keys/jdo/JdoKeyManagerTest.java [deleted file]
redback-keys/redback-keys-providers/redback-keys-jdo/src/test/resources/spring-context.xml

diff --git a/redback-keys/redback-keys-providers/redback-keys-jdo/src/main/java/org/apache/archiva/redback/keys/jdo/JdoKeyManager.java b/redback-keys/redback-keys-providers/redback-keys-jdo/src/main/java/org/apache/archiva/redback/keys/jdo/JdoKeyManager.java
new file mode 100644 (file)
index 0000000..577a07b
--- /dev/null
@@ -0,0 +1,190 @@
+package org.apache.archiva.redback.keys.jdo;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.archiva.redback.keys.AuthenticationKey;
+import org.codehaus.plexus.jdo.JdoFactory;
+import org.codehaus.plexus.jdo.PlexusJdoUtils;
+import org.codehaus.plexus.jdo.PlexusObjectNotFoundException;
+import org.codehaus.plexus.jdo.PlexusStoreException;
+import org.apache.archiva.redback.keys.AbstractKeyManager;
+import org.apache.archiva.redback.keys.KeyManagerException;
+import org.apache.archiva.redback.keys.KeyNotFoundException;
+import org.codehaus.plexus.redback.keys.jdo.JdoAuthenticationKey;
+import org.codehaus.plexus.redback.keys.jdo.RedbackKeyManagementJdoModelloMetadata;
+import org.codehaus.plexus.util.StringUtils;
+import org.jpox.PersistenceManagerFactoryImpl;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.jdo.PersistenceManager;
+import javax.jdo.PersistenceManagerFactory;
+import java.util.Calendar;
+import java.util.List;
+
+/**
+ * JdoKeyManager
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+@Service( "keyManager#jdo" )
+public class JdoKeyManager
+    extends AbstractKeyManager
+{
+    @Inject
+    @Named( value = "jdoFactory#users" )
+    private JdoFactory jdoFactory;
+
+    private PersistenceManagerFactory pmf;
+
+    public AuthenticationKey createKey( String principal, String purpose, int expirationMinutes )
+        throws KeyManagerException
+    {
+        JdoAuthenticationKey authkey = new JdoAuthenticationKey();
+        authkey.setKey( super.generateUUID() );
+        authkey.setForPrincipal( principal );
+        authkey.setPurpose( purpose );
+
+        Calendar now = getNowGMT();
+        authkey.setDateCreated( now.getTime() );
+
+        if ( expirationMinutes >= 0 )
+        {
+            Calendar expiration = getNowGMT();
+            expiration.add( Calendar.MINUTE, expirationMinutes );
+            authkey.setDateExpires( expiration.getTime() );
+        }
+
+        return addKey( authkey );
+    }
+
+    public AuthenticationKey addKey( AuthenticationKey key )
+    {
+        return (AuthenticationKey) PlexusJdoUtils.addObject( getPersistenceManager(), key );
+    }
+
+    public void eraseDatabase()
+    {
+        PlexusJdoUtils.removeAll( getPersistenceManager(), JdoAuthenticationKey.class );
+        PlexusJdoUtils.removeAll( getPersistenceManager(), RedbackKeyManagementJdoModelloMetadata.class );
+    }
+
+    public AuthenticationKey findKey( String key )
+        throws KeyNotFoundException, KeyManagerException
+    {
+        if ( StringUtils.isEmpty( key ) )
+        {
+            throw new KeyNotFoundException( "Empty key not found." );
+        }
+
+        try
+        {
+            JdoAuthenticationKey authkey = (JdoAuthenticationKey) PlexusJdoUtils.getObjectById( getPersistenceManager(),
+                                                                                                JdoAuthenticationKey.class,
+                                                                                                key );
+
+            if ( authkey == null )
+            {
+                throw new KeyNotFoundException( "Key [" + key + "] not found." );
+            }
+            assertNotExpired( authkey );
+
+            return authkey;
+        }
+        catch ( PlexusObjectNotFoundException e )
+        {
+            throw new KeyNotFoundException( e.getMessage() );
+        }
+        catch ( PlexusStoreException e )
+        {
+            throw new KeyManagerException(
+                "Unable to get " + JdoAuthenticationKey.class.getName() + "', key '" + key + "' from jdo store." );
+        }
+    }
+
+    public void deleteKey( AuthenticationKey authkey )
+        throws KeyManagerException
+    {
+        PlexusJdoUtils.removeObject( getPersistenceManager(), authkey );
+    }
+
+    public void deleteKey( String key )
+        throws KeyManagerException
+    {
+        try
+        {
+            AuthenticationKey authkey = findKey( key );
+            PlexusJdoUtils.removeObject( getPersistenceManager(), authkey );
+        }
+        catch ( KeyNotFoundException e )
+        {
+            // not found? nothing to do.
+        }
+    }
+
+    @SuppressWarnings( "unchecked" )
+    public List<AuthenticationKey> getAllKeys()
+    {
+        return PlexusJdoUtils.getAllObjectsDetached( getPersistenceManager(), JdoAuthenticationKey.class );
+    }
+
+    @PostConstruct
+    public void initialize()
+    {
+        pmf = jdoFactory.getPersistenceManagerFactory();
+
+        if ( pmf instanceof PersistenceManagerFactoryImpl )
+        {
+            PersistenceManagerFactoryImpl jpoxpmf = (PersistenceManagerFactoryImpl) pmf;
+            if ( !StringUtils.equals( "JDK_DEFAULT_TIMEZONE", jpoxpmf.getDateTimezone() ) )
+            {
+                throw new RuntimeException( "The JdoFactory property 'org.jpox.rdbms.dateTimezone' MUST BE "
+                                                       + "Set to 'JDK_DEFAULT_TIMEZONE' in order for jpox and JdoKeyManager to operate correctly." );
+            }
+        }
+    }
+
+    private PersistenceManager getPersistenceManager()
+    {
+        PersistenceManager pm = pmf.getPersistenceManager();
+
+        pm.getFetchPlan().setMaxFetchDepth( 5 );
+
+        return pm;
+    }
+
+    public String getId()
+    {
+        return "JDO Key Manager - " + this.getClass().getName();
+    }
+
+    public JdoFactory getJdoFactory()
+    {
+        return jdoFactory;
+    }
+
+    public void setJdoFactory( JdoFactory jdoFactory )
+    {
+        this.jdoFactory = jdoFactory;
+    }
+}
diff --git a/redback-keys/redback-keys-providers/redback-keys-jdo/src/main/java/org/codehaus/plexus/redback/keys/jdo/JdoKeyManager.java b/redback-keys/redback-keys-providers/redback-keys-jdo/src/main/java/org/codehaus/plexus/redback/keys/jdo/JdoKeyManager.java
deleted file mode 100644 (file)
index 3235841..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-package org.codehaus.plexus.redback.keys.jdo;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.archiva.redback.keys.AuthenticationKey;
-import org.codehaus.plexus.jdo.JdoFactory;
-import org.codehaus.plexus.jdo.PlexusJdoUtils;
-import org.codehaus.plexus.jdo.PlexusObjectNotFoundException;
-import org.codehaus.plexus.jdo.PlexusStoreException;
-import org.apache.archiva.redback.keys.AbstractKeyManager;
-import org.apache.archiva.redback.keys.KeyManagerException;
-import org.apache.archiva.redback.keys.KeyNotFoundException;
-import org.codehaus.plexus.util.StringUtils;
-import org.jpox.PersistenceManagerFactoryImpl;
-import org.springframework.stereotype.Service;
-
-import javax.annotation.PostConstruct;
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.jdo.PersistenceManager;
-import javax.jdo.PersistenceManagerFactory;
-import java.util.Calendar;
-import java.util.List;
-
-/**
- * JdoKeyManager
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id$
- */
-@Service( "keyManager#jdo" )
-public class JdoKeyManager
-    extends AbstractKeyManager
-{
-    @Inject
-    @Named( value = "jdoFactory#users" )
-    private JdoFactory jdoFactory;
-
-    private PersistenceManagerFactory pmf;
-
-    public AuthenticationKey createKey( String principal, String purpose, int expirationMinutes )
-        throws KeyManagerException
-    {
-        JdoAuthenticationKey authkey = new JdoAuthenticationKey();
-        authkey.setKey( super.generateUUID() );
-        authkey.setForPrincipal( principal );
-        authkey.setPurpose( purpose );
-
-        Calendar now = getNowGMT();
-        authkey.setDateCreated( now.getTime() );
-
-        if ( expirationMinutes >= 0 )
-        {
-            Calendar expiration = getNowGMT();
-            expiration.add( Calendar.MINUTE, expirationMinutes );
-            authkey.setDateExpires( expiration.getTime() );
-        }
-
-        return addKey( authkey );
-    }
-
-    public AuthenticationKey addKey( AuthenticationKey key )
-    {
-        return (AuthenticationKey) PlexusJdoUtils.addObject( getPersistenceManager(), key );
-    }
-
-    public void eraseDatabase()
-    {
-        PlexusJdoUtils.removeAll( getPersistenceManager(), JdoAuthenticationKey.class );
-        PlexusJdoUtils.removeAll( getPersistenceManager(), RedbackKeyManagementJdoModelloMetadata.class );
-    }
-
-    public AuthenticationKey findKey( String key )
-        throws KeyNotFoundException, KeyManagerException
-    {
-        if ( StringUtils.isEmpty( key ) )
-        {
-            throw new KeyNotFoundException( "Empty key not found." );
-        }
-
-        try
-        {
-            JdoAuthenticationKey authkey = (JdoAuthenticationKey) PlexusJdoUtils.getObjectById( getPersistenceManager(),
-                                                                                                JdoAuthenticationKey.class,
-                                                                                                key );
-
-            if ( authkey == null )
-            {
-                throw new KeyNotFoundException( "Key [" + key + "] not found." );
-            }
-            assertNotExpired( authkey );
-
-            return authkey;
-        }
-        catch ( PlexusObjectNotFoundException e )
-        {
-            throw new KeyNotFoundException( e.getMessage() );
-        }
-        catch ( PlexusStoreException e )
-        {
-            throw new KeyManagerException(
-                "Unable to get " + JdoAuthenticationKey.class.getName() + "', key '" + key + "' from jdo store." );
-        }
-    }
-
-    public void deleteKey( AuthenticationKey authkey )
-        throws KeyManagerException
-    {
-        PlexusJdoUtils.removeObject( getPersistenceManager(), authkey );
-    }
-
-    public void deleteKey( String key )
-        throws KeyManagerException
-    {
-        try
-        {
-            AuthenticationKey authkey = findKey( key );
-            PlexusJdoUtils.removeObject( getPersistenceManager(), authkey );
-        }
-        catch ( KeyNotFoundException e )
-        {
-            // not found? nothing to do.
-        }
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public List<AuthenticationKey> getAllKeys()
-    {
-        return PlexusJdoUtils.getAllObjectsDetached( getPersistenceManager(), JdoAuthenticationKey.class );
-    }
-
-    @PostConstruct
-    public void initialize()
-    {
-        pmf = jdoFactory.getPersistenceManagerFactory();
-
-        if ( pmf instanceof PersistenceManagerFactoryImpl )
-        {
-            PersistenceManagerFactoryImpl jpoxpmf = (PersistenceManagerFactoryImpl) pmf;
-            if ( !StringUtils.equals( "JDK_DEFAULT_TIMEZONE", jpoxpmf.getDateTimezone() ) )
-            {
-                throw new RuntimeException( "The JdoFactory property 'org.jpox.rdbms.dateTimezone' MUST BE "
-                                                       + "Set to 'JDK_DEFAULT_TIMEZONE' in order for jpox and JdoKeyManager to operate correctly." );
-            }
-        }
-    }
-
-    private PersistenceManager getPersistenceManager()
-    {
-        PersistenceManager pm = pmf.getPersistenceManager();
-
-        pm.getFetchPlan().setMaxFetchDepth( 5 );
-
-        return pm;
-    }
-
-    public String getId()
-    {
-        return "JDO Key Manager - " + this.getClass().getName();
-    }
-
-    public JdoFactory getJdoFactory()
-    {
-        return jdoFactory;
-    }
-
-    public void setJdoFactory( JdoFactory jdoFactory )
-    {
-        this.jdoFactory = jdoFactory;
-    }
-}
index b5b164cf981dab790846f11132b072186dbbe234..b757d07bc1c8ea8ca538106d70d4852c1873b79e 100644 (file)
@@ -28,5 +28,5 @@
        default-lazy-init="true">
 
   <context:annotation-config />
-  <context:component-scan base-package="org.codehaus.plexus.redback.keys.jdo"/>
+  <context:component-scan base-package="org.apache.archiva.redback.keys.jdo"/>
 </beans>
\ No newline at end of file
diff --git a/redback-keys/redback-keys-providers/redback-keys-jdo/src/test/java/org/apache/archiva/redback/keys/jdo/JdoKeyManagerTest.java b/redback-keys/redback-keys-providers/redback-keys-jdo/src/test/java/org/apache/archiva/redback/keys/jdo/JdoKeyManagerTest.java
new file mode 100644 (file)
index 0000000..8ec912e
--- /dev/null
@@ -0,0 +1,102 @@
+package org.apache.archiva.redback.keys.jdo;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.archiva.redback.keys.KeyManager;
+import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory;
+import org.codehaus.plexus.redback.keys.KeyManagerTestCase;
+import org.jpox.SchemaTool;
+import org.junit.Before;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.jdo.PersistenceManager;
+import javax.jdo.PersistenceManagerFactory;
+import java.net.URL;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * JdoKeyManagerTest 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class JdoKeyManagerTest
+    extends KeyManagerTestCase
+{
+
+    @Inject
+    @Named(value = "jdoFactory#users")
+    DefaultConfigurableJdoFactory jdoFactory;
+
+    @Inject @Named(value = "keyManager#jdo")
+    KeyManager keyManager;
+
+
+    @Before
+    public void setUp()
+        throws Exception
+    {
+        
+        super.setUp();
+
+        assertEquals( DefaultConfigurableJdoFactory.class.getName(), jdoFactory.getClass().getName() );
+
+        jdoFactory.setPersistenceManagerFactoryClass( "org.jpox.PersistenceManagerFactoryImpl" ); //$NON-NLS-1$
+
+        jdoFactory.setDriverName( "org.hsqldb.jdbcDriver" ); //$NON-NLS-1$
+
+        jdoFactory.setUrl( "jdbc:hsqldb:mem:" + getName() ); //$NON-NLS-1$
+
+        jdoFactory.setUserName( "sa" ); //$NON-NLS-1$
+
+        jdoFactory.setPassword( "" ); //$NON-NLS-1$
+
+        jdoFactory.setProperty( "org.jpox.transactionIsolation", "READ_COMMITTED" ); //$NON-NLS-1$ //$NON-NLS-2$
+
+        jdoFactory.setProperty( "org.jpox.poid.transactionIsolation", "READ_COMMITTED" ); //$NON-NLS-1$ //$NON-NLS-2$
+
+        jdoFactory.setProperty( "org.jpox.autoCreateSchema", "true" ); //$NON-NLS-1$ //$NON-NLS-2$
+        
+        jdoFactory.setProperty( "org.jpox.rdbms.dateTimezone", "JDK_DEFAULT_TIMEZONE" );  //$NON-NLS-1$ //$NON-NLS-2$
+
+        Properties properties = jdoFactory.getProperties();
+
+        for ( Map.Entry<Object,Object> entry : properties.entrySet() )
+        {
+            System.setProperty( (String) entry.getKey(), (String) entry.getValue() );
+        }
+
+        SchemaTool.createSchemaTables( new URL[] { getClass()
+            .getResource( "/org/codehaus/plexus/redback/keys/jdo/package.jdo" ) }, new URL[] {}, null, false, null ); //$NON-NLS-1$
+
+        PersistenceManagerFactory pmf = jdoFactory.getPersistenceManagerFactory();
+
+        assertNotNull( pmf );
+
+        PersistenceManager pm = pmf.getPersistenceManager();
+
+        pm.close();
+        keyManager.eraseDatabase();
+        setKeyManager( keyManager );
+    }
+    
+}
diff --git a/redback-keys/redback-keys-providers/redback-keys-jdo/src/test/java/org/codehaus/plexus/redback/keys/jdo/JdoKeyManagerTest.java b/redback-keys/redback-keys-providers/redback-keys-jdo/src/test/java/org/codehaus/plexus/redback/keys/jdo/JdoKeyManagerTest.java
deleted file mode 100644 (file)
index ec6a16d..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-package org.codehaus.plexus.redback.keys.jdo;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.archiva.redback.keys.KeyManager;
-import org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory;
-import org.codehaus.plexus.redback.keys.KeyManagerTestCase;
-import org.jpox.SchemaTool;
-import org.junit.Before;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.jdo.PersistenceManager;
-import javax.jdo.PersistenceManagerFactory;
-import java.net.URL;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * JdoKeyManagerTest 
- *
- * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- * @version $Id$
- */
-public class JdoKeyManagerTest
-    extends KeyManagerTestCase
-{
-
-    @Inject
-    @Named(value = "jdoFactory#users")
-    DefaultConfigurableJdoFactory jdoFactory;
-
-    @Inject @Named(value = "keyManager#jdo")
-    KeyManager keyManager;
-
-
-    @Before
-    public void setUp()
-        throws Exception
-    {
-        
-        super.setUp();
-
-        assertEquals( DefaultConfigurableJdoFactory.class.getName(), jdoFactory.getClass().getName() );
-
-        jdoFactory.setPersistenceManagerFactoryClass( "org.jpox.PersistenceManagerFactoryImpl" ); //$NON-NLS-1$
-
-        jdoFactory.setDriverName( "org.hsqldb.jdbcDriver" ); //$NON-NLS-1$
-
-        jdoFactory.setUrl( "jdbc:hsqldb:mem:" + getName() ); //$NON-NLS-1$
-
-        jdoFactory.setUserName( "sa" ); //$NON-NLS-1$
-
-        jdoFactory.setPassword( "" ); //$NON-NLS-1$
-
-        jdoFactory.setProperty( "org.jpox.transactionIsolation", "READ_COMMITTED" ); //$NON-NLS-1$ //$NON-NLS-2$
-
-        jdoFactory.setProperty( "org.jpox.poid.transactionIsolation", "READ_COMMITTED" ); //$NON-NLS-1$ //$NON-NLS-2$
-
-        jdoFactory.setProperty( "org.jpox.autoCreateSchema", "true" ); //$NON-NLS-1$ //$NON-NLS-2$
-        
-        jdoFactory.setProperty( "org.jpox.rdbms.dateTimezone", "JDK_DEFAULT_TIMEZONE" );  //$NON-NLS-1$ //$NON-NLS-2$
-
-        Properties properties = jdoFactory.getProperties();
-
-        for ( Map.Entry<Object,Object> entry : properties.entrySet() )
-        {
-            System.setProperty( (String) entry.getKey(), (String) entry.getValue() );
-        }
-
-        SchemaTool.createSchemaTables( new URL[] { getClass()
-            .getResource( "/org/codehaus/plexus/redback/keys/jdo/package.jdo" ) }, new URL[] {}, null, false, null ); //$NON-NLS-1$
-
-        PersistenceManagerFactory pmf = jdoFactory.getPersistenceManagerFactory();
-
-        assertNotNull( pmf );
-
-        PersistenceManager pm = pmf.getPersistenceManager();
-
-        pm.close();
-        keyManager.eraseDatabase();
-        setKeyManager( keyManager );
-    }
-    
-}
index ba46dc01b47c3fac060ae0b1d3a08114fd71513c..9c6d7f55d997a35c6e756e859c3ec6f82c2ba4b5 100644 (file)
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-           http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
 
   <bean name="jdoFactory#users" class="org.codehaus.plexus.jdo.DefaultConfigurableJdoFactory">
     <property name="driverName" value="org.hsqldb.jdbcDriver"/>