[jboss-cvs] JBossAS SVN: r79977 - in trunk: system/src/main/org/jboss/system/server/profileservice/repository and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 23 10:12:43 EDT 2008
Author: emuckenhuber
Date: 2008-10-23 10:12:43 -0400 (Thu, 23 Oct 2008)
New Revision: 79977
Added:
trunk/testsuite/src/main/org/jboss/test/profileservice/override/
trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/
trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java
trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ProfileServiceOverrideTestCase.java
trunk/testsuite/src/resources/profileservice/override/
trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/
trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/META-INF/
trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/META-INF/jboss-app.xml
trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/test-ds.xml
trunk/testsuite/src/resources/profileservice/override/profileservice-test-ds.xml
Modified:
trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java
trunk/testsuite/imports/sections/profileservice.xml
Log:
[JBAS-6037] store the parent ManagedObject as attachment
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2008-10-23 14:07:20 UTC (rev 79976)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2008-10-23 14:12:43 UTC (rev 79977)
@@ -21,10 +21,10 @@
*/
package org.jboss.profileservice.management;
-import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.text.MessageFormat;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -51,14 +51,15 @@
import org.jboss.logging.Logger;
import org.jboss.managed.api.ComponentType;
import org.jboss.managed.api.DeploymentTemplateInfo;
+import org.jboss.managed.api.ManagedCommon;
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;
import org.jboss.managed.api.ManagedParameter;
import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.MutableManagedObject;
+import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
import org.jboss.managed.api.annotation.ManagementComponent;
import org.jboss.managed.api.annotation.ManagementObject;
import org.jboss.managed.api.annotation.ManagementObjectID;
@@ -169,24 +170,25 @@
String msg = formatter.format(args);
throw new NoSuchProfileException(msg);
}
- // Process the deployments
- Set<String> deploymentNames = activeProfile.getDeploymentNames();
+ // Cleanup
this.compByCompType.clear();
this.managedDeployments.clear();
this.moRegistry.clear();
this.runtimeMOs.clear();
this.unresolvedRefs.clear();
- for(String name : deploymentNames)
+ // Process the deployments
+ Collection<VFSDeployment> deployments = activeProfile.getDeployments();
+ for(VFSDeployment deployment : deployments)
{
try
{
- ManagedDeployment md = mainDeployer.getManagedDeployment(name);
+ ManagedDeployment md = getManagedDeployment(deployment);
processManagedDeployment(md, 0, log.isTraceEnabled());
}
catch(Exception e)
{
- log.warn("Failed to create ManagedDeployment for: " + name, e);
+ log.warn("Failed to create ManagedDeployment for: " + deployment.getName(), e);
}
}
if(this.runtimeMOs.size() > 0)
@@ -270,13 +272,14 @@
}
// Update the MO registry
- ManagedObject prevMO = moRegistry.put(key, mo);
- if( prevMO != null )
- {
- // This should only matter for ManagedObjects that have a ManagementObjectID
- log.debug("Duplicate mo for key: "+key+", prevMO: "+prevMO);
- return;
- }
+ // TODO - does this make sense? In case of a MetaType.isCollection we could get different results then
+// ManagedObject prevMO = moRegistry.put(key, mo);
+// if( prevMO != null )
+// {
+// // This should only matter for ManagedObjects that have a ManagementObjectID
+// log.debug("Duplicate mo for key: "+key+", prevMO: "+prevMO);
+// return;
+// }
// Check for unresolved refs
checkForReferences(key, mo);
@@ -555,8 +558,11 @@
throws NoSuchDeploymentException, Exception
{
Deployment ctx = activeProfile.getDeployment(name, phase);
- ManagedDeployment md = getManagedDeployment(ctx);
- log.debug("getDeployment, name="+name+", md="+md);
+ ManagedDeployment md = this.managedDeployments.get(ctx.getName());
+ // Do not return null
+ if(md == null)
+ throw new NoSuchDeploymentException("Managed deployment: "+ name + " not found.");
+
return md;
}
@@ -593,6 +599,7 @@
{
return compByCompType.get(type);
}
+
public ManagedComponent getComponent(String name, ComponentType type)
throws Exception
{
@@ -850,7 +857,25 @@
// Apply the managed properties to the server ManagedDeployment/ManagedComponent
ManagedDeployment compMD = managedDeployments.get(md.getName());
log.debug("updateComponent, profile="+activeProfile+", deploymentName="+name+", phase="+phase+", :"+compMD);
- ManagedComponent serverComp = compMD.getComponent(comp.getName());
+
+ ManagedComponent serverComp = null;
+ // Find the managed component again
+ if(comp.getDeployment().getParent() == null)
+ {
+ serverComp = compMD.getComponent(comp.getName());
+ }
+ else
+ {
+ // Look at the children
+ // TODO - support more levels of nested deployments
+ for(ManagedDeployment child : compMD.getChildren())
+ {
+ if(serverComp != null)
+ break;
+
+ serverComp = child.getComponent(comp.getName());
+ }
+ }
if(serverComp == null)
{
log.debug("Name: "+comp.getName()+" does not map to existing ManagedComponet in ManagedDeployment: "+md.getName()
@@ -861,7 +886,7 @@
throw new IllegalArgumentException(msg);
}
- Map<String, Object> attachments = new HashMap<String, Object>();
+ // dispatch the values
for(ManagedProperty prop : comp.getProperties().values())
{
// Skip null values && non-CONFIGURATION values
@@ -898,16 +923,24 @@
Object componentName = getComponentName(ctxProp);
if (componentName != null)
dispatcher.set(componentName, ctxProp.getName(), metaValue);
- // Collect the affected attachments
- ManagedObject ctxMO = ctxProp.getManagedObject();
- String attachmentName = ctxMO.getAttachmentName();
- Object attachment = ctxMO.getAttachment();
- if(attachment != null)
- attachments.put(attachmentName, attachment);
}
+
+ // Create attachments, based on the parent ManagedObject
+ Map<String, Object> attachments = new HashMap<String, Object>();
+
+ ManagedCommon parent = comp;
+ while(parent.getParent() != null)
+ parent = parent.getParent();
+
+ ManagedObject o = comp.getDeployment().getManagedObject(parent.getName());
+ if(o != null)
+ {
+ attachments.put(o.getAttachmentName(), o.getAttachment());
+ }
+ // else, maybe throw an exception ?
+
// Update the repository deployment attachments
- // TODO, this seems to flat to deal with nested deployments
activeProfile.updateDeployment(compDeployment, phase, attachments);
}
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 14:07:20 UTC (rev 79976)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/repository/SerializableDeploymentRepository.java 2008-10-23 14:12:43 UTC (rev 79977)
@@ -27,7 +27,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectOutputStream;
-import java.io.Serializable;
import java.io.SyncFailedException;
import java.net.URI;
import java.net.URISyntaxException;
@@ -54,10 +53,10 @@
import org.jboss.profileservice.spi.DeploymentContentFlags;
import org.jboss.profileservice.spi.DeploymentRepository;
import org.jboss.profileservice.spi.ModificationInfo;
-import org.jboss.profileservice.spi.ModificationInfo.ModifyStatus;
import org.jboss.profileservice.spi.NoSuchDeploymentException;
import org.jboss.profileservice.spi.NoSuchProfileException;
import org.jboss.profileservice.spi.ProfileKey;
+import org.jboss.profileservice.spi.ModificationInfo.ModifyStatus;
import org.jboss.util.file.Files;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VirtualFile;
@@ -412,6 +411,7 @@
this.addApplication(vfsPath, d);
break;
}
+ lastModified = System.currentTimeMillis();
}
// TODO
@@ -611,6 +611,8 @@
ctx = this.removeApplication(name);
break;
}
+ if(ctx != null)
+ lastModified = System.currentTimeMillis();
return ctx;
}
public String toString()
Modified: trunk/testsuite/imports/sections/profileservice.xml
===================================================================
--- trunk/testsuite/imports/sections/profileservice.xml 2008-10-23 14:07:20 UTC (rev 79976)
+++ trunk/testsuite/imports/sections/profileservice.xml 2008-10-23 14:12:43 UTC (rev 79977)
@@ -57,5 +57,15 @@
</zipfileset>
</jar>
+ <copy tofile="${build.lib}/profileservice-test-ds.xml"
+ file="${build.resources}/profileservice/override/profileservice-test-ds.xml"/>
+
+ <!-- EAR -->
+ <jar destfile="${build.lib}/profileservice-datasource.ear">
+ <fileset dir="${build.resources}/profileservice/override/profileservice-datasource.ear">
+ <include name="**/*.xml"/>
+ </fileset>
+ </jar>
+
</target>
</project>
Added: trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/AbstractProfileServiceTest.java 2008-10-23 14:12:43 UTC (rev 79977)
@@ -0,0 +1,206 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.profileservice.override.test;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.naming.InitialContext;
+
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.deployers.spi.management.deploy.DeploymentManager;
+import org.jboss.deployers.spi.management.deploy.DeploymentProgress;
+import org.jboss.deployers.spi.management.deploy.DeploymentStatus;
+import org.jboss.deployers.spi.management.deploy.ProgressEvent;
+import org.jboss.deployers.spi.management.deploy.ProgressListener;
+import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
+import org.jboss.profileservice.spi.ProfileKey;
+import org.jboss.profileservice.spi.ProfileService;
+import org.jboss.test.JBossTestCase;
+import org.jboss.virtual.VFS;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public abstract class AbstractProfileServiceTest extends JBossTestCase implements ProgressListener
+{
+
+ protected ManagementView activeView;
+ protected DeploymentManager deployMgr;
+
+ public AbstractProfileServiceTest(String name)
+ {
+ super(name);
+ }
+
+ protected abstract String getProfileName();
+
+ public void progressEvent(ProgressEvent eventInfo)
+ {
+ getLog().debug(eventInfo);
+ }
+
+ protected String[] deployPackage(String name) throws Exception
+ {
+ DeploymentManager deployMgr = getDeploymentManager();
+ URL contentURL = getVFSdeployURL(name);
+
+ assertNotNull(contentURL);
+
+ String[] uploadedNames = {};
+ try
+ {
+ uploadedNames = distribute(deployMgr, name, contentURL);
+ try
+ {
+ start(deployMgr, uploadedNames);
+ }
+ catch(Exception e)
+ {
+ stop(deployMgr, uploadedNames);
+ throw e;
+ }
+ }
+ catch(Exception e)
+ {
+ undeploy(deployMgr, uploadedNames);
+ throw e;
+ }
+ return uploadedNames;
+ }
+
+
+ protected void undeployPackage(String[] repositoryNames) throws Exception
+ {
+ DeploymentManager deployMgr = getDeploymentManager();
+ try
+ {
+ stop(deployMgr, repositoryNames);
+ }
+ finally
+ {
+ undeploy(deployMgr, repositoryNames);
+ }
+ }
+
+ /**
+ * Obtain the ProfileService.ManagementView
+ * @return
+ * @throws Exception
+ */
+ protected ManagementView getManagementView()
+ throws Exception
+ {
+ if( activeView == null )
+ {
+ String profileName = getProfileName();
+ InitialContext ctx = getInitialContext();
+ ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
+ activeView = ps.getViewManager();
+ ProfileKey defaultKey = new ProfileKey(profileName);
+ activeView.loadProfile(defaultKey);
+ // Init the VFS to setup the vfs* protocol handlers
+ VFS.init();
+ }
+ return activeView;
+ }
+ /**
+ * Obtain the ProfileService.ManagementView
+ * @return
+ * @throws Exception
+ */
+ protected DeploymentManager getDeploymentManager()
+ throws Exception
+ {
+ if( deployMgr == null )
+ {
+ String profileName = getProfileName();
+ InitialContext ctx = getInitialContext();
+ ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
+ deployMgr = ps.getDeploymentManager();
+ ProfileKey defaultKey = new ProfileKey(profileName);
+ deployMgr.loadProfile(defaultKey, false);
+ // Init the VFS to setup the vfs* protocol handlers
+ VFS.init();
+ }
+ return deployMgr;
+ }
+
+ protected String[] distribute(DeploymentManager deployMgr, String name, URL contentURL)
+ {
+ DeploymentProgress progress = deployMgr.distribute(name, DeploymentPhase.APPLICATION, contentURL, true);
+ getLog().debug("distribute: "+ contentURL);
+ progress.addProgressListener(this);
+ progress.run();
+
+ assertCompleted(progress.getDeploymentStatus());
+
+ return progress.getDeploymentID().getRepositoryNames();
+ }
+
+ protected void start(DeploymentManager deployMgr, String[] repositoryNames) throws Exception
+ {
+ DeploymentProgress progress = deployMgr.start(DeploymentPhase.APPLICATION, repositoryNames);
+ progress.addProgressListener(this);
+ progress.run();
+
+ DeploymentStatus status = progress.getDeploymentStatus();
+ assertCompleted(status);
+ }
+
+ protected void stop(DeploymentManager deployMgr, String[] repositoryNames) throws Exception
+ {
+ DeploymentProgress progress = deployMgr.stop(DeploymentPhase.APPLICATION, repositoryNames);
+ progress.addProgressListener(this);
+ progress.run();
+
+ DeploymentStatus status = progress.getDeploymentStatus();
+ assertCompleted(status);
+ }
+
+ protected void undeploy(DeploymentManager deployMgr, String[] repositoryNames) throws Exception
+ {
+ DeploymentProgress progress = deployMgr.undeploy(DeploymentPhase.APPLICATION, repositoryNames);
+ progress.addProgressListener(this);
+ progress.run();
+
+ assertCompleted(progress.getDeploymentStatus());
+ }
+
+ protected void assertCompleted(DeploymentStatus status)
+ {
+ assertTrue("DeploymentStatus.isCompleted: " + status, status.isCompleted());
+ assertFalse("DeploymentStatus.isFailed: " + status, status.isFailed());
+ }
+
+ protected URL getVFSdeployURL(String name) throws MalformedURLException
+ {
+ // TODO - hack to get off JDK's url handling
+ URL contentURL = getDeployURL(name);
+ assertNotNull(contentURL);
+ String urlString = contentURL.toExternalForm();
+ int p = urlString.indexOf(":/");
+ return new URL("vfszip" + urlString.substring(p));
+ }
+
+}
\ No newline at end of file
Added: trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ProfileServiceOverrideTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ProfileServiceOverrideTestCase.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/profileservice/override/test/ProfileServiceOverrideTestCase.java 2008-10-23 14:12:43 UTC (rev 79977)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.test.profileservice.override.test;
+
+import org.jboss.deployers.spi.management.ManagementView;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.managed.api.ManagedComponent;
+import org.jboss.managed.api.ManagedDeployment;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.ManagedDeployment.DeploymentPhase;
+import org.jboss.metatype.api.values.SimpleValueSupport;
+
+/**
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision$
+ */
+public class ProfileServiceOverrideTestCase extends AbstractProfileServiceTest
+{
+
+ /** The profile name */
+ private static final String PROFILENAME = "profileservice";
+
+ public ProfileServiceOverrideTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testDS() throws Exception
+ {
+ String deploymentName = "profileservice-test-ds.xml";
+
+ try
+ {
+ deployPackage(deploymentName);
+
+ ManagementView mgtView = getManagementView();
+ ManagedDeployment md = mgtView.getDeployment(deploymentName, DeploymentPhase.APPLICATION);
+ assertNotNull(md);
+
+ ManagedComponent mc = md.getComponent("ProfileServiceTestDS");
+ assertNotNull(mc);
+
+ // This should work too
+ ManagedComponent comp = getManagedComponent(mgtView, "ProfileServiceTestDS");
+ assertNotNull(comp);
+
+ ManagedProperty p = mc.getProperty("jndi-name");
+ p.setValue(SimpleValueSupport.wrap("ChangedDsJNDIName"));
+
+ mgtView.updateComponent(mc);
+ mgtView.process();
+
+ }
+ catch(Exception e)
+ {
+ log.error(e);
+ throw e;
+ }
+ finally
+ {
+ undeployPackage(new String[] { deploymentName });
+ }
+ }
+
+ public void testNestedDS() throws Exception
+ {
+ String deploymentName = "profileservice-datasource.ear";
+ try
+ {
+ deployPackage(deploymentName);
+ ManagementView mgtView = getManagementView();
+ ManagedDeployment md = mgtView.getDeployment(deploymentName, DeploymentPhase.APPLICATION);
+ assertNotNull(md);
+
+ assertNotNull(md.getChildren());
+ assertFalse(md.getChildren().isEmpty());
+
+ // get first deployment (test-ds.xml)
+ md = md.getChildren().get(0);
+
+ ManagedComponent mc = md.getComponent("ProfileServiceNestedTestDS");
+ assertNotNull(mc);
+
+ // This should work too
+ ManagedComponent comp = getManagedComponent(mgtView, "ProfileServiceNestedTestDS");
+ assertNotNull(comp);
+
+ ManagedProperty p = mc.getProperty("jndi-name");
+ p.setValue(SimpleValueSupport.wrap("ChangedNestedDsJNDIName"));
+
+ mgtView.updateComponent(mc);
+ mgtView.process();
+
+ }
+ catch(Exception e)
+ {
+ log.error(e);
+ throw e;
+ }
+ finally
+ {
+ undeployPackage(new String[] { deploymentName });
+ }
+ }
+
+ private ManagedComponent getManagedComponent(ManagementView mgtView, String name) throws Exception
+ {
+ ComponentType type = new ComponentType("DataSource", "LocalTx");
+ ManagedComponent ds = mgtView.getComponent(name, type);
+ return ds;
+ }
+
+ @Override
+ protected String getProfileName()
+ {
+ return PROFILENAME;
+ }
+
+}
Added: trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/META-INF/jboss-app.xml
===================================================================
--- trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/META-INF/jboss-app.xml (rev 0)
+++ trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/META-INF/jboss-app.xml 2008-10-23 14:12:43 UTC (rev 79977)
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!DOCTYPE jboss-app
+ PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
+<jboss-app>
+
+ <module><service>test-ds.xml</service></module>
+
+</jboss-app>
\ No newline at end of file
Added: trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/test-ds.xml
===================================================================
--- trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/test-ds.xml (rev 0)
+++ trunk/testsuite/src/resources/profileservice/override/profileservice-datasource.ear/test-ds.xml 2008-10-23 14:12:43 UTC (rev 79977)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>ProfileServiceNestedTestDS</jndi-name>
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <idle-timeout-minutes>0</idle-timeout-minutes>
+ <security-domain>HsqlDbRealm</security-domain>
+ <prepared-statement-cache-size>32</prepared-statement-cache-size>
+ <metadata>
+ <type-mapping>Hypersonic SQL</type-mapping>
+ </metadata>
+ </local-tx-datasource>
+
+
+ <mbean code="org.jboss.jdbc.HypersonicDatabase"
+ name="jboss:service=Hypersonic,database=profileserviceNestedTestDB">
+ <attribute name="Database">profileserviceNestedTestDB</attribute>
+ <attribute name="InProcessMode">true</attribute>
+ </mbean>
+
+</datasources>
\ No newline at end of file
Added: trunk/testsuite/src/resources/profileservice/override/profileservice-test-ds.xml
===================================================================
--- trunk/testsuite/src/resources/profileservice/override/profileservice-test-ds.xml (rev 0)
+++ trunk/testsuite/src/resources/profileservice/override/profileservice-test-ds.xml 2008-10-23 14:12:43 UTC (rev 79977)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources>
+ <local-tx-datasource>
+ <jndi-name>ProfileServiceTestDS</jndi-name>
+ <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
+ <driver-class>org.hsqldb.jdbcDriver</driver-class>
+ <user-name>sa</user-name>
+ <password></password>
+ <min-pool-size>5</min-pool-size>
+ <max-pool-size>20</max-pool-size>
+ <idle-timeout-minutes>0</idle-timeout-minutes>
+ <security-domain>HsqlDbRealm</security-domain>
+ <prepared-statement-cache-size>32</prepared-statement-cache-size>
+ <metadata>
+ <type-mapping>Hypersonic SQL</type-mapping>
+ </metadata>
+ </local-tx-datasource>
+
+
+ <mbean code="org.jboss.jdbc.HypersonicDatabase"
+ name="jboss:service=Hypersonic,database=profileserviceTestDB">
+ <attribute name="Database">profileserviceTestDB</attribute>
+ <attribute name="InProcessMode">true</attribute>
+ </mbean>
+
+</datasources>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list