[jboss-cvs] JBossAS SVN: r79954 - in trunk: connector/src/main/org/jboss/resource/deployers/management and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 23 00:04:16 EDT 2008
Author: scott.stark at jboss.org
Date: 2008-10-23 00:04:16 -0400 (Thu, 23 Oct 2008)
New Revision: 79954
Modified:
trunk/component-matrix/pom.xml
trunk/connector/src/main/org/jboss/resource/deployers/management/ConnectionFactoryProperty.java
trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java
trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
trunk/server/src/etc/conf/default/deployers.xml
trunk/system/build.xml
trunk/system/src/main/org/jboss/profileservice/spi/AttachmentsSerializer.java
trunk/system/src/main/org/jboss/profileservice/spi/DeploymentRepository.java
trunk/system/src/main/org/jboss/profileservice/spi/Profile.java
trunk/system/src/main/org/jboss/system/server/profile/basic/ProfileImpl.java
trunk/system/src/main/org/jboss/system/server/profile/repository/ProfileImpl.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/JavaBeanXmlAttachmentsSerializer.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/JavaSerializationAttachmentsSerializer.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/RepositoryAdminAdaptor.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java
trunk/testsuite/.classpath
Log:
JBAS-6046, update jboss-managed to 2.0.0.CR2
Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/component-matrix/pom.xml 2008-10-23 04:04:16 UTC (rev 79954)
@@ -56,7 +56,7 @@
<version.org.jboss.reflect>2.0.0.GA</version.org.jboss.reflect>
<version.org.jboss.vfs>2.0.0.CR1</version.org.jboss.vfs>
<version.org.jboss.mdr>2.0.0.GA</version.org.jboss.mdr>
- <version.org.jboss.man>2.0.0.CR1</version.org.jboss.man>
+ <version.org.jboss.man>2.0.0.CR2</version.org.jboss.man>
<version.org.jboss.microcontainer>2.0.0.CR2</version.org.jboss.microcontainer>
<version.org.jboss.cl>2.0.0.CR3</version.org.jboss.cl>
<version.org.jboss.deployers>2.0.0.CR2</version.org.jboss.deployers>
Modified: trunk/connector/src/main/org/jboss/resource/deployers/management/ConnectionFactoryProperty.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/management/ConnectionFactoryProperty.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/connector/src/main/org/jboss/resource/deployers/management/ConnectionFactoryProperty.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -99,7 +99,7 @@
PropertyInfo propertyInfo = getField(Fields.PROPERTY_INFO, PropertyInfo.class);
if (propertyInfo != null)
{
- Serializable attachment = getManagedObject().getAttachment();
+ Object attachment = getManagedObject().getAttachment();
if (attachment != null)
{
if (value instanceof MetaValue)
Modified: trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -106,7 +106,7 @@
PropertyInfo propertyInfo = getField(Fields.PROPERTY_INFO, PropertyInfo.class);
if (propertyInfo != null)
{
- Serializable attachment = getManagedObject().getAttachment();
+ Object attachment = getManagedObject().getAttachment();
if (attachment != null)
{
if (value instanceof MetaValue)
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -53,6 +53,7 @@
import org.jboss.managed.api.DeploymentTemplateInfo;
import org.jboss.managed.api.ManagedComponent;
import org.jboss.managed.api.ManagedDeployment;
+import org.jboss.managed.api.MutableManagedObject;
import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
import org.jboss.managed.api.ManagedObject;
import org.jboss.managed.api.ManagedOperation;
@@ -65,7 +66,6 @@
import org.jboss.managed.api.annotation.ManagementProperty;
import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.managed.plugins.ManagedComponentImpl;
-import org.jboss.managed.plugins.ManagedObjectImpl;
import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
import org.jboss.metatype.api.types.ArrayMetaType;
import org.jboss.metatype.api.types.CollectionMetaType;
@@ -92,6 +92,7 @@
* @author ales.justin at jboss.org
* @version $Revision$
*/
+ at ManagementObject
public class ManagementViewImpl implements ManagementView
{
private static Logger log = Logger.getLogger(ManagementViewImpl.class);
@@ -130,8 +131,6 @@
* matching ManagedObject.
*/
private Map<String, ManagedObject> runtimeMOs = new HashMap<String, ManagedObject>();
- /** runtimeMOs that have not been merged */
- private Set<String> unmergedRuntimeMOs = new HashSet<String>();
/** The dispatcher handles ManagedOperation dispatches */
private RuntimeComponentDispatcher dispatcher;
@@ -686,11 +685,10 @@
String name = "" + refName;
log.debug("Updating template ManagedObject name to:"+name+" from property: "+prop);
ManagedObject mo = prop.getManagedObject();
- if(mo instanceof ManagedObjectImpl)
+ if(mo instanceof MutableManagedObject)
{
- // TODO: need a MutableManagedObject type, JBMAN-23
- ManagedObjectImpl moi = (ManagedObjectImpl) mo;
- moi.setName(name);
+ MutableManagedObject mmo = (MutableManagedObject) mo;
+ mmo.setName(name);
}
else
{
@@ -863,7 +861,7 @@
throw new IllegalArgumentException(msg);
}
- Map<String, Serializable> attachments = new HashMap<String, Serializable>();
+ Map<String, Object> attachments = new HashMap<String, Object>();
for(ManagedProperty prop : comp.getProperties().values())
{
// Skip null values && non-CONFIGURATION values
@@ -903,7 +901,7 @@
// Collect the affected attachments
ManagedObject ctxMO = ctxProp.getManagedObject();
String attachmentName = ctxMO.getAttachmentName();
- Serializable attachment = ctxMO.getAttachment();
+ Object attachment = ctxMO.getAttachment();
if(attachment != null)
attachments.put(attachmentName, attachment);
}
@@ -1005,7 +1003,7 @@
log.debug("Ops after:"+ops);
}
- ManagedObjectImpl moi = (ManagedObjectImpl) mo;
+ MutableManagedObject moi = (MutableManagedObject) mo;
moi.setProperties(props);
moi.setOperations(ops);
}
Modified: trunk/server/src/etc/conf/default/deployers.xml
===================================================================
--- trunk/server/src/etc/conf/default/deployers.xml 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/server/src/etc/conf/default/deployers.xml 2008-10-23 04:04:16 UTC (rev 79954)
@@ -26,6 +26,11 @@
<constructor factoryClass="org.jboss.system.deployers.LegacyDeploymentContextComparator" factoryMethod="getInstance"/>
</bean>
+ <!-- The ManagedObjectFactory -->
+ <bean name="ManagedObjectFactory">
+ <constructor factoryClass="org.jboss.managed.api.factory.ManagedObjectFactory" factoryMethod="getInstance"/>
+ </bean>
+
<!-- The MainDeployer -->
<bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
<property name="structuralDeployers"><inject bean="StructuralDeployers"/></property>
@@ -170,6 +175,22 @@
<!-- JMX Deployment -->
<bean name="ServiceMetaDataICF" class="org.jboss.system.deployers.managed.ServiceMetaDataICF">
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+ <install bean="ManagedObjectFactory" method="setInstanceClassFactory">
+ <parameter>
+ <value>org.jboss.system.metadata.ServiceMetaData</value>
+ </parameter>
+ <parameter>
+ <this />
+ </parameter>
+ </install>
+ <uninstall bean="ManagedObjectFactory" method="setInstanceClassFactory">
+ <parameter>
+ <value>org.jboss.system.metadata.ServiceMetaData</value>
+ </parameter>
+ <parameter>
+ <null />
+ </parameter>
+ </uninstall>
</bean>
<bean name="SARDeployer" class="org.jboss.system.deployers.SARDeployer">
<property name="icf"><inject bean="ServiceMetaDataICF"/></property>
Modified: trunk/system/build.xml
===================================================================
--- trunk/system/build.xml 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/build.xml 2008-10-23 04:04:16 UTC (rev 79954)
@@ -76,6 +76,7 @@
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.jboss.deployers.classpath"/>
<path refid="jboss.jboss.man.classpath"/>
+ <path refid="jboss.jboss.reflect.classpath"/>
<path refid="jboss.microcontainer.classpath"/>
<path refid="jboss.jboss.vfs.classpath"/>
<path refid="jboss.common.core.classpath"/>
Modified: trunk/system/src/main/org/jboss/profileservice/spi/AttachmentsSerializer.java
===================================================================
--- trunk/system/src/main/org/jboss/profileservice/spi/AttachmentsSerializer.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/profileservice/spi/AttachmentsSerializer.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -21,7 +21,6 @@
*/
package org.jboss.profileservice.spi;
-import java.io.Serializable;
import java.util.Map;
/**
@@ -34,7 +33,7 @@
public interface AttachmentsSerializer
{
public void saveAttachments(String baseName,
- Map<String, Serializable> attachments)
+ Map<String, Object> attachments)
throws Exception;
public Map<String, Object> loadAttachments(String baseName, ClassLoader loader)
throws Exception;
Modified: trunk/system/src/main/org/jboss/profileservice/spi/DeploymentRepository.java
===================================================================
--- trunk/system/src/main/org/jboss/profileservice/spi/DeploymentRepository.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/profileservice/spi/DeploymentRepository.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -175,7 +175,7 @@
* @throws Exception
*/
public void updateDeployment(VFSDeployment d, DeploymentPhase phase,
- Map<String, Serializable> attachments)
+ Map<String, Object> attachments)
throws Exception;
/**
* Get a named deployment.
Modified: trunk/system/src/main/org/jboss/profileservice/spi/Profile.java
===================================================================
--- trunk/system/src/main/org/jboss/profileservice/spi/Profile.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/profileservice/spi/Profile.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -21,7 +21,6 @@
*/
package org.jboss.profileservice.spi;
-import java.io.Serializable;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
@@ -105,7 +104,7 @@
* @throws Exception for any error
*/
void updateDeployment(VFSDeployment d, DeploymentPhase phase,
- Map<String, Serializable> attachments)
+ Map<String, Object> attachments)
throws Exception;
/**
Modified: trunk/system/src/main/org/jboss/system/server/profile/basic/ProfileImpl.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/basic/ProfileImpl.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/system/server/profile/basic/ProfileImpl.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -22,7 +22,6 @@
package org.jboss.system.server.profile.basic;
import java.io.File;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -150,7 +149,7 @@
this.lastModified = System.currentTimeMillis();
}
public void updateDeployment(VFSDeployment d, DeploymentPhase phase,
- Map<String, Serializable> attachments)
+ Map<String, Object> attachments)
throws Exception
{
Modified: trunk/system/src/main/org/jboss/system/server/profile/repository/ProfileImpl.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profile/repository/ProfileImpl.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/system/server/profile/repository/ProfileImpl.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -1,199 +1,198 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.system.server.profile.repository;
-
-import java.io.Serializable;
-import java.net.URI;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
-import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
-import org.jboss.profileservice.spi.DeploymentRepository;
-import org.jboss.profileservice.spi.ModificationInfo;
-import org.jboss.profileservice.spi.NoSuchDeploymentException;
-import org.jboss.profileservice.spi.Profile;
-import org.jboss.profileservice.spi.ProfileKey;
-import org.jboss.util.JBossObject;
-import org.jboss.util.JBossStringBuilder;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * A profile implementation that uses the DeploymentRepository to store
- * deployments and admin metadata.
- *
- * @author Scott.Stark at jboss.org
- * @version $Revision:$
- */
-public class ProfileImpl extends JBossObject
- implements Profile
-{
- private ProfileKey key;
- private String version;
- /** The repository containing the deployment contents */
- private DeploymentRepository repository;
- /** Is hot deployment checking enabled */
- private volatile boolean hotdeployEnabled;
-
- /**
- *
- * @param repository the repository
- * @param key the key
- */
- public ProfileImpl(DeploymentRepository repository, ProfileKey key)
- {
- this.key = key;
- this.repository = repository;
- log.info("Using repository:"+repository);
- }
-
- public String getName()
- {
- return key.getName();
- }
-
- public ProfileKey getKey()
- {
- return key;
- }
-
- public String getVersion()
- {
- return version;
- }
-
-
- public long getLastModified()
- {
- return repository.getLastModified();
- }
-
- /**
- * Get the names of the deployments in the profile
- * @return names of deployments
- */
- public Set<String> getDeploymentNames()
- {
- return repository.getDeploymentNames();
- }
- public Set<String> getDeploymentNames(DeploymentPhase phase)
- {
- return repository.getDeploymentNames(phase);
- }
-
- public VirtualFile getRootFile(DeploymentPhase phase)
- throws Exception
- {
- URI uri = repository.getDeploymentURI(phase);
- VirtualFile root = VFS.getRoot(uri);
- return root;
- }
-
- public Collection<VFSDeployment> getDeployments(DeploymentPhase phase)
- throws Exception
- {
- return repository.getDeployments(phase);
- }
- public Collection<VFSDeployment> getDeployments()
- throws Exception
- {
- return repository.getDeployments();
- }
-
- /**
- *
- */
- public Collection<ModificationInfo> getModifiedDeployments()
- throws Exception
- {
- Collection<ModificationInfo> modified = Collections.emptyList();
- if( hotdeployEnabled == true )
- modified = repository.getModifiedDeployments();
- return modified;
- }
- /**
- * Enable/disable getModifiedDeployments results.
- */
- public synchronized void enableModifiedDeploymentChecks(boolean flag)
- {
- this.hotdeployEnabled = flag;
- }
-
- public void addDeployment(VFSDeployment d, DeploymentPhase phase)
- throws Exception
- {
- String name = d.getName();
- repository.addDeployment(name, d, phase);
- }
- public void updateDeployment(VFSDeployment d, DeploymentPhase phase,
- Map<String, Serializable> attachments)
- throws Exception
- {
- repository.updateDeployment(d, phase, attachments);
- }
- public VFSDeployment getDeployment(String name, DeploymentPhase phase)
- throws Exception, NoSuchDeploymentException
- {
- return repository.getDeployment(name, phase);
- }
- public VFSDeployment removeDeployment(String name, DeploymentPhase phase)
- throws Exception
- {
- return repository.removeDeployment(name, phase);
- }
-
- public Map<String, Object> getConfig()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean hasDeployment(String name, DeploymentPhase phase)
- {
- // TODO: Wolf: needs refactoring / review
- try
- {
- getDeployment(name, phase);
- return true;
- }
- catch(NoSuchDeploymentException e)
- {
- return false;
- }
- catch(Exception e)
- {
- log.warn("getDeployment return exception", e);
- return false;
- }
- }
-
- @Override
- protected void toString(JBossStringBuilder buffer)
- {
- buffer.append("key=");
- buffer.append(this.key);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.system.server.profile.repository;
+
+import java.net.URI;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
+import org.jboss.profileservice.spi.DeploymentRepository;
+import org.jboss.profileservice.spi.ModificationInfo;
+import org.jboss.profileservice.spi.NoSuchDeploymentException;
+import org.jboss.profileservice.spi.Profile;
+import org.jboss.profileservice.spi.ProfileKey;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * A profile implementation that uses the DeploymentRepository to store
+ * deployments and admin metadata.
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class ProfileImpl extends JBossObject
+ implements Profile
+{
+ private ProfileKey key;
+ private String version;
+ /** The repository containing the deployment contents */
+ private DeploymentRepository repository;
+ /** Is hot deployment checking enabled */
+ private volatile boolean hotdeployEnabled;
+
+ /**
+ *
+ * @param repository the repository
+ * @param key the key
+ */
+ public ProfileImpl(DeploymentRepository repository, ProfileKey key)
+ {
+ this.key = key;
+ this.repository = repository;
+ log.info("Using repository:"+repository);
+ }
+
+ public String getName()
+ {
+ return key.getName();
+ }
+
+ public ProfileKey getKey()
+ {
+ return key;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+
+ public long getLastModified()
+ {
+ return repository.getLastModified();
+ }
+
+ /**
+ * Get the names of the deployments in the profile
+ * @return names of deployments
+ */
+ public Set<String> getDeploymentNames()
+ {
+ return repository.getDeploymentNames();
+ }
+ public Set<String> getDeploymentNames(DeploymentPhase phase)
+ {
+ return repository.getDeploymentNames(phase);
+ }
+
+ public VirtualFile getRootFile(DeploymentPhase phase)
+ throws Exception
+ {
+ URI uri = repository.getDeploymentURI(phase);
+ VirtualFile root = VFS.getRoot(uri);
+ return root;
+ }
+
+ public Collection<VFSDeployment> getDeployments(DeploymentPhase phase)
+ throws Exception
+ {
+ return repository.getDeployments(phase);
+ }
+ public Collection<VFSDeployment> getDeployments()
+ throws Exception
+ {
+ return repository.getDeployments();
+ }
+
+ /**
+ *
+ */
+ public Collection<ModificationInfo> getModifiedDeployments()
+ throws Exception
+ {
+ Collection<ModificationInfo> modified = Collections.emptyList();
+ if( hotdeployEnabled == true )
+ modified = repository.getModifiedDeployments();
+ return modified;
+ }
+ /**
+ * Enable/disable getModifiedDeployments results.
+ */
+ public synchronized void enableModifiedDeploymentChecks(boolean flag)
+ {
+ this.hotdeployEnabled = flag;
+ }
+
+ public void addDeployment(VFSDeployment d, DeploymentPhase phase)
+ throws Exception
+ {
+ String name = d.getName();
+ repository.addDeployment(name, d, phase);
+ }
+ public void updateDeployment(VFSDeployment d, DeploymentPhase phase,
+ Map<String, Object> attachments)
+ throws Exception
+ {
+ repository.updateDeployment(d, phase, attachments);
+ }
+ public VFSDeployment getDeployment(String name, DeploymentPhase phase)
+ throws Exception, NoSuchDeploymentException
+ {
+ return repository.getDeployment(name, phase);
+ }
+ public VFSDeployment removeDeployment(String name, DeploymentPhase phase)
+ throws Exception
+ {
+ return repository.removeDeployment(name, phase);
+ }
+
+ public Map<String, Object> getConfig()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasDeployment(String name, DeploymentPhase phase)
+ {
+ // TODO: Wolf: needs refactoring / review
+ try
+ {
+ getDeployment(name, phase);
+ return true;
+ }
+ catch(NoSuchDeploymentException e)
+ {
+ return false;
+ }
+ catch(Exception e)
+ {
+ log.warn("getDeployment return exception", e);
+ return false;
+ }
+ }
+
+ @Override
+ protected void toString(JBossStringBuilder buffer)
+ {
+ buffer.append("key=");
+ buffer.append(this.key);
+ }
+
+}
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/AbstractFileAttachmentsSerializer.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -75,7 +75,7 @@
}
public void saveAttachments(String baseName,
- Map<String, Serializable> attachments)
+ Map<String, Object> attachments)
throws Exception
{
if( attachmentsStoreDir == null )
@@ -101,7 +101,7 @@
{
// Log what is in the attachments
StringBuilder tmp = new StringBuilder("Save failed with NSE, attachments contents: ");
- for(Entry<String, Serializable> entry : attachments.entrySet())
+ for(Entry<String, Object> entry : attachments.entrySet())
{
tmp.append(entry.getKey());
tmp.append('=');
@@ -115,6 +115,6 @@
protected abstract Map<String, Object> loadAttachments(File attachmentsStore, ClassLoader loader)
throws Exception;
- protected abstract void saveAttachments(File attachmentsStore, Map<String, Serializable> attachments)
+ protected abstract void saveAttachments(File attachmentsStore, Map<String, Object> attachments)
throws Exception;
}
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/JavaBeanXmlAttachmentsSerializer.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/JavaBeanXmlAttachmentsSerializer.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/JavaBeanXmlAttachmentsSerializer.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -76,7 +76,7 @@
@Override
protected void saveAttachments(File attachmentsStore,
- Map<String, Serializable> map) throws Exception
+ Map<String, Object> map) throws Exception
{
log.debug("saveAttachments, attachmentsStore="+attachmentsStore);
if( log.isTraceEnabled() )
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/JavaSerializationAttachmentsSerializer.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/JavaSerializationAttachmentsSerializer.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/JavaSerializationAttachmentsSerializer.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -84,7 +84,7 @@
}
protected void saveAttachments(File attachmentsStore,
- Map<String, Serializable> map)
+ Map<String, Object> map)
throws Exception
{
log.debug("saveAttachments, attachmentsStore="+attachmentsStore);
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/RepositoryAdminAdaptor.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/RepositoryAdminAdaptor.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/RepositoryAdminAdaptor.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -494,7 +494,7 @@
}
public void updateDeployment(VFSDeployment d, DeploymentPhase phase,
- Map<String, Serializable> attachments)
+ Map<String, Object> attachments)
throws Exception
{
}
Modified: trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java 2008-10-23 04:04:16 UTC (rev 79954)
@@ -416,7 +416,7 @@
// TODO
public void updateDeployment(VFSDeployment d, DeploymentPhase phase,
- Map<String, Serializable> attachments)
+ Map<String, Object> attachments)
throws Exception
{
String baseName = d.getSimpleName();
Modified: trunk/testsuite/.classpath
===================================================================
--- trunk/testsuite/.classpath 2008-10-23 01:41:41 UTC (rev 79953)
+++ trunk/testsuite/.classpath 2008-10-23 04:04:16 UTC (rev 79954)
@@ -45,5 +45,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss/jboss-ejb3-proxy/lib/jboss-ejb3-proxy-client.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/aop/lib/jboss-aop-aspects.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/profileservice"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
More information about the jboss-cvs-commits
mailing list