[jboss-cvs] JBossAS SVN: r78312 - in trunk/connector/src/main/org/jboss/resource: adapter/mail/inflow and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 10 02:03:51 EDT 2008
Author: jesper.pedersen
Date: 2008-09-10 02:03:51 -0400 (Wed, 10 Sep 2008)
New Revision: 78312
Modified:
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/URLSelectorStrategy.java
trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPMailFolder.java
trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3MailFolder.java
trunk/connector/src/main/org/jboss/resource/adapter/quartz/inflow/JBossQuartzThreadPool.java
trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryDeployer.java
trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java
trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java
Log:
dos2unix
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/URLSelectorStrategy.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/URLSelectorStrategy.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/URLSelectorStrategy.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,26 +19,26 @@
* 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.resource.adapter.jdbc;
-
-import java.util.List;
-
-/**
- * URLSelectorStrategy
- *
- * @author <a href="mailto:vkak at redhat.com">Vicky Kak</a>
- *
- */
-
-public interface URLSelectorStrategy
-{
- public List getAllUrlObjects();
-
- public void failedUrlObject(Object urlObject);
-
- // The custom logic should go here.
- public List getCustomSortedUrls();
-
- public Object getUrlObject();
-
-}
+package org.jboss.resource.adapter.jdbc;
+
+import java.util.List;
+
+/**
+ * URLSelectorStrategy
+ *
+ * @author <a href="mailto:vkak at redhat.com">Vicky Kak</a>
+ *
+ */
+
+public interface URLSelectorStrategy
+{
+ public List getAllUrlObjects();
+
+ public void failedUrlObject(Object urlObject);
+
+ // The custom logic should go here.
+ public List getCustomSortedUrls();
+
+ public Object getUrlObject();
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPMailFolder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPMailFolder.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPMailFolder.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,53 +19,53 @@
* 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.resource.adapter.mail.inflow;
-
-import javax.mail.Folder;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.NoSuchProviderException;
-import javax.mail.Session;
-import javax.mail.Store;
-import javax.mail.Flags.Flag;
-
-public class IMAPMailFolder extends MailFolder {
-
- public IMAPMailFolder(MailActivationSpec spec) {
- super(spec);
- }
-
- protected Message[] getMessages(Folder folder) throws MessagingException {
- if (folder.getUnreadMessageCount() > 0) {
- int newCount = folder.getUnreadMessageCount();
- int messageCount = folder.getMessageCount();
- // folder.getMessages indexes from 1 and uses an inclusive range (ffs)
- return folder.getMessages(messageCount - newCount + 1, messageCount);
- }
- else
- {
- return new Message[0];
- }
- }
-
- protected Store openStore(Session session) throws NoSuchProviderException {
- return session.getStore("imap");
- }
-
- protected void markMessageSeen(Message message) throws MessagingException {
- message.setFlag(Flag.SEEN, true);
- }
-
- protected void closeStore(boolean success, Store store, Folder folder) throws MessagingException {
- try {
- if (folder != null && folder.isOpen()) {
- folder.close(success);
- }
- } finally {
- if (store != null && store.isConnected()) {
- store.close();
- }
- }
- }
-
-}
+package org.jboss.resource.adapter.mail.inflow;
+
+import javax.mail.Folder;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.NoSuchProviderException;
+import javax.mail.Session;
+import javax.mail.Store;
+import javax.mail.Flags.Flag;
+
+public class IMAPMailFolder extends MailFolder {
+
+ public IMAPMailFolder(MailActivationSpec spec) {
+ super(spec);
+ }
+
+ protected Message[] getMessages(Folder folder) throws MessagingException {
+ if (folder.getUnreadMessageCount() > 0) {
+ int newCount = folder.getUnreadMessageCount();
+ int messageCount = folder.getMessageCount();
+ // folder.getMessages indexes from 1 and uses an inclusive range (ffs)
+ return folder.getMessages(messageCount - newCount + 1, messageCount);
+ }
+ else
+ {
+ return new Message[0];
+ }
+ }
+
+ protected Store openStore(Session session) throws NoSuchProviderException {
+ return session.getStore("imap");
+ }
+
+ protected void markMessageSeen(Message message) throws MessagingException {
+ message.setFlag(Flag.SEEN, true);
+ }
+
+ protected void closeStore(boolean success, Store store, Folder folder) throws MessagingException {
+ try {
+ if (folder != null && folder.isOpen()) {
+ folder.close(success);
+ }
+ } finally {
+ if (store != null && store.isConnected()) {
+ store.close();
+ }
+ }
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3MailFolder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3MailFolder.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3MailFolder.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,48 +19,48 @@
* 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.resource.adapter.mail.inflow;
-
-import javax.mail.Folder;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.NoSuchProviderException;
-import javax.mail.Session;
-import javax.mail.Store;
-import javax.mail.Flags.Flag;
-
-public class POP3MailFolder extends MailFolder {
-
- private boolean flush;
-
- public POP3MailFolder(MailActivationSpec spec) {
- super(spec);
- this.flush = spec.isFlush();
- }
-
- protected Message[] getMessages(Folder folder) throws MessagingException {
- return folder.getMessages();
- }
-
- protected Store openStore(Session session) throws NoSuchProviderException {
- return session.getStore("pop3");
- }
-
- protected void markMessageSeen(Message message) throws MessagingException {
- message.setFlag(Flag.DELETED, true);
- }
-
- protected void closeStore(boolean success, Store store, Folder folder) throws MessagingException {
- try {
- if (folder != null && folder.isOpen()) {
- folder.close(success && flush);
- }
- } finally {
- if (store != null && store.isConnected()) {
- store.close();
- }
- }
-
- }
-
-}
+package org.jboss.resource.adapter.mail.inflow;
+
+import javax.mail.Folder;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.NoSuchProviderException;
+import javax.mail.Session;
+import javax.mail.Store;
+import javax.mail.Flags.Flag;
+
+public class POP3MailFolder extends MailFolder {
+
+ private boolean flush;
+
+ public POP3MailFolder(MailActivationSpec spec) {
+ super(spec);
+ this.flush = spec.isFlush();
+ }
+
+ protected Message[] getMessages(Folder folder) throws MessagingException {
+ return folder.getMessages();
+ }
+
+ protected Store openStore(Session session) throws NoSuchProviderException {
+ return session.getStore("pop3");
+ }
+
+ protected void markMessageSeen(Message message) throws MessagingException {
+ message.setFlag(Flag.DELETED, true);
+ }
+
+ protected void closeStore(boolean success, Store store, Folder folder) throws MessagingException {
+ try {
+ if (folder != null && folder.isOpen()) {
+ folder.close(success && flush);
+ }
+ } finally {
+ if (store != null && store.isConnected()) {
+ store.close();
+ }
+ }
+
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/quartz/inflow/JBossQuartzThreadPool.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/quartz/inflow/JBossQuartzThreadPool.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/adapter/quartz/inflow/JBossQuartzThreadPool.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,94 +19,94 @@
* 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.resource.adapter.quartz.inflow;
-
-import org.quartz.SchedulerConfigException;
-
-import javax.resource.spi.work.Work;
-import javax.resource.spi.work.WorkException;
-import javax.resource.spi.work.WorkManager;
-
-/**
- * Thread pool used to fire Quartz Jobs.
- * <p/>
- * Using BootstrapContext's workManager thread pool.
- * No dependency outside this rar or JCA.
- *
- * @see http://jira.jboss.com/jira/browse/JBAS-1792
- * @see quartz.properties
- *
- * @author <a href="mailto:ales.justin at gmail.com">Ales Justin</a>
- */
-public class JBossQuartzThreadPool implements org.quartz.spi.ThreadPool
-{
- private int poolSize = Integer.MAX_VALUE;
-
- private WorkManager workManager;
-
- public void initialize() throws SchedulerConfigException
- {
- workManager = QuartzResourceAdapter.getConfigTimeWorkManager();
- }
-
- /**
- * Currently this method is only used in metadata lookup.
- * Which is has no further use.
- * How to provide better estimate?
- */
- public int getPoolSize()
- {
- return poolSize;
- }
-
- public boolean runInThread(Runnable runnable)
- {
- try
- {
- WorkWrapper workWrapper = new WorkWrapper(runnable);
- workManager.doWork(workWrapper);
- return true;
- }
- catch (WorkException e)
- {
- return false;
- }
- }
-
- /**
- * No shutdown impl - workManager is shutdown by itself.
- */
- public void shutdown(boolean waitForJobsToComplete)
- {
- }
-
- /**
- * Just in case we want to set pool size.
- */
- public void setPoolSize(int poolSize)
- {
- this.poolSize = poolSize;
- }
-
- private class WorkWrapper implements Work
- {
-
- private Runnable delegate;
-
- public WorkWrapper(Runnable delegate)
- {
- this.delegate = delegate;
- }
-
- public void run()
- {
- delegate.run();
- }
-
- public void release()
- {
- }
-
- }
-
-}
+package org.jboss.resource.adapter.quartz.inflow;
+
+import org.quartz.SchedulerConfigException;
+
+import javax.resource.spi.work.Work;
+import javax.resource.spi.work.WorkException;
+import javax.resource.spi.work.WorkManager;
+
+/**
+ * Thread pool used to fire Quartz Jobs.
+ * <p/>
+ * Using BootstrapContext's workManager thread pool.
+ * No dependency outside this rar or JCA.
+ *
+ * @see http://jira.jboss.com/jira/browse/JBAS-1792
+ * @see quartz.properties
+ *
+ * @author <a href="mailto:ales.justin at gmail.com">Ales Justin</a>
+ */
+public class JBossQuartzThreadPool implements org.quartz.spi.ThreadPool
+{
+ private int poolSize = Integer.MAX_VALUE;
+
+ private WorkManager workManager;
+
+ public void initialize() throws SchedulerConfigException
+ {
+ workManager = QuartzResourceAdapter.getConfigTimeWorkManager();
+ }
+
+ /**
+ * Currently this method is only used in metadata lookup.
+ * Which is has no further use.
+ * How to provide better estimate?
+ */
+ public int getPoolSize()
+ {
+ return poolSize;
+ }
+
+ public boolean runInThread(Runnable runnable)
+ {
+ try
+ {
+ WorkWrapper workWrapper = new WorkWrapper(runnable);
+ workManager.doWork(workWrapper);
+ return true;
+ }
+ catch (WorkException e)
+ {
+ return false;
+ }
+ }
+
+ /**
+ * No shutdown impl - workManager is shutdown by itself.
+ */
+ public void shutdown(boolean waitForJobsToComplete)
+ {
+ }
+
+ /**
+ * Just in case we want to set pool size.
+ */
+ public void setPoolSize(int poolSize)
+ {
+ this.poolSize = poolSize;
+ }
+
+ private class WorkWrapper implements Work
+ {
+
+ private Runnable delegate;
+
+ public WorkWrapper(Runnable delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ public void run()
+ {
+ delegate.run();
+ }
+
+ public void release()
+ {
+ }
+
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryDeployer.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryDeployer.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryDeployer.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,179 +19,179 @@
* 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.resource.deployers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.spi.management.KnownComponentTypes;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.resource.deployers.builder.AbstractBuilder;
-import org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.NoTxDataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.XADataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.repository.DefaultJCAMetaDataRepository;
-import org.jboss.system.metadata.ServiceDeployment;
-import org.jboss.system.metadata.ServiceMetaData;
-
-/**
- * A ManagedConnectionFactoryDeployer.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @author Scott.Stark at jboss.org
- * @author adrian at jboss.org
- * @version $Revision: 1.1 $
- */
-public class ManagedConnectionFactoryDeployer
- extends AbstractSimpleRealDeployer<ManagedConnectionFactoryDeploymentGroup>
-{
- /** The repository */
- private DefaultJCAMetaDataRepository repository;
-
- /** The builders */
- private List<AbstractBuilder> builders = new ArrayList<AbstractBuilder>();
- /** The ManagedConnectionFactoryDeploymentGroup props to manage */
- private String[] propNames = {
- "jndiName",
- "jdbcURL",
- "userName",
- "passWord",
- "driverClass",
- "minPoolSize",
- "maxPoolSize",
- "securityMetaData",
- "managedConnectionFactoryProperties",
- };
- /**
- * A mapping from the managed property name to the attachment property name.
- */
- private Map<String, String> propertyNameMappings = new HashMap<String, String>();
-
- public Map<String, String> getPropertyNameMappings()
- {
- return propertyNameMappings;
- }
-
- public void setPropertyNameMappings(Map<String, String> mangedToMBeanNames)
- {
- propertyNameMappings.clear();
- /*
- propertyNameMappings.putAll(mangedToMBeanNames);
- */
- // Need to reverse the mapping
- for(String key : mangedToMBeanNames.keySet())
- {
- String value = mangedToMBeanNames.get(key);
- propertyNameMappings.put(value, key);
- }
- }
-
- public String[] getPropNames()
- {
- return propNames;
- }
-
- public void setPropNames(String[] propNames)
- {
- this.propNames = propNames;
- }
-
- /**
- * Create a new ManagedConnectionFactoryDeployer.
- */
- public ManagedConnectionFactoryDeployer()
- {
- super(ManagedConnectionFactoryDeploymentGroup.class);
- setOutput(ServiceDeployment.class);
- }
-
- public void setBuilders(List<AbstractBuilder> builders)
- {
- this.builders = builders;
- }
-
- public List<AbstractBuilder> getBuilders()
- {
- return this.builders;
- }
-
- /**
- * Get the repository.
- *
- * @return the repository.
- */
- public DefaultJCAMetaDataRepository getRepository()
- {
- return repository;
- }
-
- /**
- * Set the repository.
- *
- * @param repository The repository to set.
- */
- public void setRepository(DefaultJCAMetaDataRepository repository)
- {
- this.repository = repository;
- }
-
- @Override
- public void deploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup group) throws DeploymentException
- {
-
- List<ManagedConnectionFactoryDeploymentMetaData> deployments = group.getDeployments();
- ServiceDeployment serviceDeployment = new ServiceDeployment();
- List<ServiceMetaData> componentServices = new ArrayList<ServiceMetaData>();
- List<ServiceMetaData> serviceDefintion = group.getServices();
-
- serviceDeployment.setName(unit.getName()+" services");
- //For some reason, this didn't like the addAll method
- for (ServiceMetaData data : serviceDefintion)
- {
- componentServices.add(data);
- }
-
- ComponentType type = null;
- for (ManagedConnectionFactoryDeploymentMetaData data : deployments)
- {
- // TODO: there should be multiple component types
- if( type == null )
- {
- if( data instanceof LocalDataSourceDeploymentMetaData )
- type = KnownComponentTypes.DataSourceTypes.LocalTx.getType();
- if( data instanceof NoTxDataSourceDeploymentMetaData )
- type = KnownComponentTypes.DataSourceTypes.NoTx.getType();
- if( data instanceof XADataSourceDeploymentMetaData )
- type = KnownComponentTypes.DataSourceTypes.XA.getType();
- }
-
- for (AbstractBuilder builder : builders)
- {
- ServiceMetaData candidate = builder.build(data);
-
- if(candidate != null)
- {
- componentServices.add(candidate);
- }
- }
- }
-
- serviceDeployment.setServices(componentServices);
- unit.addAttachment(ServiceDeployment.class, serviceDeployment);
- if( type != null )
- unit.addAttachment(ComponentType.class, type);
- }
-
- @Override
- public void undeploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup deployment)
- {
- }
-
-}
+package org.jboss.resource.deployers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.spi.management.KnownComponentTypes;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.resource.deployers.builder.AbstractBuilder;
+import org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.NoTxDataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.XADataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.repository.DefaultJCAMetaDataRepository;
+import org.jboss.system.metadata.ServiceDeployment;
+import org.jboss.system.metadata.ServiceMetaData;
+
+/**
+ * A ManagedConnectionFactoryDeployer.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Scott.Stark at jboss.org
+ * @author adrian at jboss.org
+ * @version $Revision: 1.1 $
+ */
+public class ManagedConnectionFactoryDeployer
+ extends AbstractSimpleRealDeployer<ManagedConnectionFactoryDeploymentGroup>
+{
+ /** The repository */
+ private DefaultJCAMetaDataRepository repository;
+
+ /** The builders */
+ private List<AbstractBuilder> builders = new ArrayList<AbstractBuilder>();
+ /** The ManagedConnectionFactoryDeploymentGroup props to manage */
+ private String[] propNames = {
+ "jndiName",
+ "jdbcURL",
+ "userName",
+ "passWord",
+ "driverClass",
+ "minPoolSize",
+ "maxPoolSize",
+ "securityMetaData",
+ "managedConnectionFactoryProperties",
+ };
+ /**
+ * A mapping from the managed property name to the attachment property name.
+ */
+ private Map<String, String> propertyNameMappings = new HashMap<String, String>();
+
+ public Map<String, String> getPropertyNameMappings()
+ {
+ return propertyNameMappings;
+ }
+
+ public void setPropertyNameMappings(Map<String, String> mangedToMBeanNames)
+ {
+ propertyNameMappings.clear();
+ /*
+ propertyNameMappings.putAll(mangedToMBeanNames);
+ */
+ // Need to reverse the mapping
+ for(String key : mangedToMBeanNames.keySet())
+ {
+ String value = mangedToMBeanNames.get(key);
+ propertyNameMappings.put(value, key);
+ }
+ }
+
+ public String[] getPropNames()
+ {
+ return propNames;
+ }
+
+ public void setPropNames(String[] propNames)
+ {
+ this.propNames = propNames;
+ }
+
+ /**
+ * Create a new ManagedConnectionFactoryDeployer.
+ */
+ public ManagedConnectionFactoryDeployer()
+ {
+ super(ManagedConnectionFactoryDeploymentGroup.class);
+ setOutput(ServiceDeployment.class);
+ }
+
+ public void setBuilders(List<AbstractBuilder> builders)
+ {
+ this.builders = builders;
+ }
+
+ public List<AbstractBuilder> getBuilders()
+ {
+ return this.builders;
+ }
+
+ /**
+ * Get the repository.
+ *
+ * @return the repository.
+ */
+ public DefaultJCAMetaDataRepository getRepository()
+ {
+ return repository;
+ }
+
+ /**
+ * Set the repository.
+ *
+ * @param repository The repository to set.
+ */
+ public void setRepository(DefaultJCAMetaDataRepository repository)
+ {
+ this.repository = repository;
+ }
+
+ @Override
+ public void deploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup group) throws DeploymentException
+ {
+
+ List<ManagedConnectionFactoryDeploymentMetaData> deployments = group.getDeployments();
+ ServiceDeployment serviceDeployment = new ServiceDeployment();
+ List<ServiceMetaData> componentServices = new ArrayList<ServiceMetaData>();
+ List<ServiceMetaData> serviceDefintion = group.getServices();
+
+ serviceDeployment.setName(unit.getName()+" services");
+ //For some reason, this didn't like the addAll method
+ for (ServiceMetaData data : serviceDefintion)
+ {
+ componentServices.add(data);
+ }
+
+ ComponentType type = null;
+ for (ManagedConnectionFactoryDeploymentMetaData data : deployments)
+ {
+ // TODO: there should be multiple component types
+ if( type == null )
+ {
+ if( data instanceof LocalDataSourceDeploymentMetaData )
+ type = KnownComponentTypes.DataSourceTypes.LocalTx.getType();
+ if( data instanceof NoTxDataSourceDeploymentMetaData )
+ type = KnownComponentTypes.DataSourceTypes.NoTx.getType();
+ if( data instanceof XADataSourceDeploymentMetaData )
+ type = KnownComponentTypes.DataSourceTypes.XA.getType();
+ }
+
+ for (AbstractBuilder builder : builders)
+ {
+ ServiceMetaData candidate = builder.build(data);
+
+ if(candidate != null)
+ {
+ componentServices.add(candidate);
+ }
+ }
+ }
+
+ serviceDeployment.setServices(componentServices);
+ unit.addAttachment(ServiceDeployment.class, serviceDeployment);
+ if( type != null )
+ unit.addAttachment(ComponentType.class, type);
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup deployment)
+ {
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,174 +19,174 @@
* 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.resource.deployers;
-
-import java.io.InputStream;
-import java.util.Map;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-
-import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.NoTxConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.XADataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.NoTxDataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.TxConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.repository.JCAMetaDataRepository;
-import org.jboss.resource.deployers.management.LocalDSInstanceClassFactory;
-import org.jboss.resource.deployers.management.NoTxCFInstanceClassFactory;
-import org.jboss.resource.deployers.management.NoTxInstanceClassFactory;
-import org.jboss.resource.deployers.management.TxInstanceClassFactory;
-import org.jboss.resource.deployers.management.XADSInstanceClassFactory;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.api.factory.ManagedObjectFactory;
-import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
-import org.jboss.managed.plugins.factory.ManagedObjectFactoryBuilder;
-import org.jboss.metatype.api.types.CollectionMetaType;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.values.CollectionValue;
-import org.jboss.metatype.api.values.GenericValue;
-import org.jboss.metatype.api.values.MetaValue;
-
-/**
- * A ManagedConnectionFactoryParserDeployer.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @author adrian at jboss.org
- * @version $Revision$
- *
- * TODO Note, this is currently a total hack until we can rework the JAXBDeployer
- */
-public class ManagedConnectionFactoryParserDeployer extends AbstractVFSParsingDeployer<ManagedConnectionFactoryDeploymentGroup>
-{
- /** The context */
- private JAXBContext context;
-
- /** The repository */
- private JCAMetaDataRepository repository;
- private ManagedObjectFactory moFactory;
-
- /**
- * Create a new ManagedConnectionFactoryParserDeployer.
- */
- public ManagedConnectionFactoryParserDeployer()
- {
- super(ManagedConnectionFactoryDeploymentGroup.class);
- setIncludeDeploymentFile(true);
- setBuildManagedObject(true);
-
- moFactory = ManagedObjectFactoryBuilder.create();
- // Setup the ManagedObject builders and InstanceClassFactorys
- moFactory.setInstanceClassFactory(LocalDataSourceDeploymentMetaData.class, new LocalDSInstanceClassFactory(moFactory));
- moFactory.setInstanceClassFactory(XADataSourceDeploymentMetaData.class, new XADSInstanceClassFactory(moFactory));
- moFactory.setInstanceClassFactory(NoTxDataSourceDeploymentMetaData.class, new NoTxInstanceClassFactory(moFactory));
- moFactory.setInstanceClassFactory(TxConnectionFactoryDeploymentMetaData.class, new TxInstanceClassFactory(moFactory));
- moFactory.setInstanceClassFactory(NoTxConnectionFactoryDeploymentMetaData.class, new NoTxCFInstanceClassFactory(moFactory));
- }
-
- /**
- * Get the repository.
- *
- * @return the repository.
- */
- public JCAMetaDataRepository getRepository()
- {
- return repository;
- }
-
- /**
- * Set the repository.
- *
- * @param repository The repository to set.
- */
- public void setRepository(JCAMetaDataRepository repository)
- {
- this.repository = repository;
- }
-
- public void create() throws Exception
- {
- Class[] classes = {super.getOutput()};
- context = JAXBContext.newInstance(classes);
- }
-
- @Override
- protected ManagedConnectionFactoryDeploymentGroup parse(VFSDeploymentUnit unit, VirtualFile file, ManagedConnectionFactoryDeploymentGroup root) throws Exception
- {
- //TODO do we need to this every time?
- Unmarshaller um = context.createUnmarshaller();
- InputStream is = file.openStream();
-
- try
- {
- JAXBElement<ManagedConnectionFactoryDeploymentGroup> elem = um.unmarshal(new StreamSource(is), ManagedConnectionFactoryDeploymentGroup.class);
- ManagedConnectionFactoryDeploymentGroup deployment = elem.getValue();
- repository.addManagedConnectionFactoryDeploymentGroup(deployment);
- return deployment;
-
- }
- finally
- {
- if (is != null)
- is.close();
- }
- }
-
- @Override
- protected void init(VFSDeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup metaData, VirtualFile file) throws Exception
- {
- metaData.setUrl(file.toURL());
- }
-
- /**
- * Build managed object.
- *
- * @param unit the deployment unit
- * @param managedObjects map of managed objects
- * @throws DeploymentException for any deployment exception
- */
- @Override
- public void build(DeploymentUnit unit, Map<String, ManagedObject> managedObjects) throws DeploymentException
- {
- super.build(unit, managedObjects);
- if(isBuildManagedObject())
- {
- ManagedObject mcfdgMO = managedObjects.get(ManagedConnectionFactoryDeploymentGroup.class.getName());
- if(mcfdgMO != null)
- {
- ManagedProperty deployments = mcfdgMO.getProperty("deployments");
- MetaType propType = deployments.getMetaType();
- if (propType.isCollection())
- {
- CollectionMetaType amt = (CollectionMetaType) propType;
- MetaType etype = amt.getElementType();
- if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
- {
- CollectionValue avalue = (CollectionValue) deployments.getValue();
- if(avalue != null)
- {
- MetaValue[] elements = avalue.getElements();
- for(int n = 0; n < avalue.getSize(); n ++)
- {
- GenericValue gv = (GenericValue) elements[n];
- ManagedObject propMO = (ManagedObject) gv.getValue();
- managedObjects.put(propMO.getName(), propMO);
- }
- }
- }
- }
- }
-
- }
- }
-}
+package org.jboss.resource.deployers;
+
+import java.io.InputStream;
+import java.util.Map;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.stream.StreamSource;
+
+import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.NoTxConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.XADataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.NoTxDataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.TxConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.repository.JCAMetaDataRepository;
+import org.jboss.resource.deployers.management.LocalDSInstanceClassFactory;
+import org.jboss.resource.deployers.management.NoTxCFInstanceClassFactory;
+import org.jboss.resource.deployers.management.NoTxInstanceClassFactory;
+import org.jboss.resource.deployers.management.TxInstanceClassFactory;
+import org.jboss.resource.deployers.management.XADSInstanceClassFactory;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.factory.ManagedObjectFactory;
+import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
+import org.jboss.managed.plugins.factory.ManagedObjectFactoryBuilder;
+import org.jboss.metatype.api.types.CollectionMetaType;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.values.CollectionValue;
+import org.jboss.metatype.api.values.GenericValue;
+import org.jboss.metatype.api.values.MetaValue;
+
+/**
+ * A ManagedConnectionFactoryParserDeployer.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author adrian at jboss.org
+ * @version $Revision$
+ *
+ * TODO Note, this is currently a total hack until we can rework the JAXBDeployer
+ */
+public class ManagedConnectionFactoryParserDeployer extends AbstractVFSParsingDeployer<ManagedConnectionFactoryDeploymentGroup>
+{
+ /** The context */
+ private JAXBContext context;
+
+ /** The repository */
+ private JCAMetaDataRepository repository;
+ private ManagedObjectFactory moFactory;
+
+ /**
+ * Create a new ManagedConnectionFactoryParserDeployer.
+ */
+ public ManagedConnectionFactoryParserDeployer()
+ {
+ super(ManagedConnectionFactoryDeploymentGroup.class);
+ setIncludeDeploymentFile(true);
+ setBuildManagedObject(true);
+
+ moFactory = ManagedObjectFactoryBuilder.create();
+ // Setup the ManagedObject builders and InstanceClassFactorys
+ moFactory.setInstanceClassFactory(LocalDataSourceDeploymentMetaData.class, new LocalDSInstanceClassFactory(moFactory));
+ moFactory.setInstanceClassFactory(XADataSourceDeploymentMetaData.class, new XADSInstanceClassFactory(moFactory));
+ moFactory.setInstanceClassFactory(NoTxDataSourceDeploymentMetaData.class, new NoTxInstanceClassFactory(moFactory));
+ moFactory.setInstanceClassFactory(TxConnectionFactoryDeploymentMetaData.class, new TxInstanceClassFactory(moFactory));
+ moFactory.setInstanceClassFactory(NoTxConnectionFactoryDeploymentMetaData.class, new NoTxCFInstanceClassFactory(moFactory));
+ }
+
+ /**
+ * Get the repository.
+ *
+ * @return the repository.
+ */
+ public JCAMetaDataRepository getRepository()
+ {
+ return repository;
+ }
+
+ /**
+ * Set the repository.
+ *
+ * @param repository The repository to set.
+ */
+ public void setRepository(JCAMetaDataRepository repository)
+ {
+ this.repository = repository;
+ }
+
+ public void create() throws Exception
+ {
+ Class[] classes = {super.getOutput()};
+ context = JAXBContext.newInstance(classes);
+ }
+
+ @Override
+ protected ManagedConnectionFactoryDeploymentGroup parse(VFSDeploymentUnit unit, VirtualFile file, ManagedConnectionFactoryDeploymentGroup root) throws Exception
+ {
+ //TODO do we need to this every time?
+ Unmarshaller um = context.createUnmarshaller();
+ InputStream is = file.openStream();
+
+ try
+ {
+ JAXBElement<ManagedConnectionFactoryDeploymentGroup> elem = um.unmarshal(new StreamSource(is), ManagedConnectionFactoryDeploymentGroup.class);
+ ManagedConnectionFactoryDeploymentGroup deployment = elem.getValue();
+ repository.addManagedConnectionFactoryDeploymentGroup(deployment);
+ return deployment;
+
+ }
+ finally
+ {
+ if (is != null)
+ is.close();
+ }
+ }
+
+ @Override
+ protected void init(VFSDeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup metaData, VirtualFile file) throws Exception
+ {
+ metaData.setUrl(file.toURL());
+ }
+
+ /**
+ * Build managed object.
+ *
+ * @param unit the deployment unit
+ * @param managedObjects map of managed objects
+ * @throws DeploymentException for any deployment exception
+ */
+ @Override
+ public void build(DeploymentUnit unit, Map<String, ManagedObject> managedObjects) throws DeploymentException
+ {
+ super.build(unit, managedObjects);
+ if(isBuildManagedObject())
+ {
+ ManagedObject mcfdgMO = managedObjects.get(ManagedConnectionFactoryDeploymentGroup.class.getName());
+ if(mcfdgMO != null)
+ {
+ ManagedProperty deployments = mcfdgMO.getProperty("deployments");
+ MetaType propType = deployments.getMetaType();
+ if (propType.isCollection())
+ {
+ CollectionMetaType amt = (CollectionMetaType) propType;
+ MetaType etype = amt.getElementType();
+ if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
+ {
+ CollectionValue avalue = (CollectionValue) deployments.getValue();
+ if(avalue != null)
+ {
+ MetaValue[] elements = avalue.getElements();
+ for(int n = 0; n < avalue.getSize(); n ++)
+ {
+ GenericValue gv = (GenericValue) elements[n];
+ ManagedObject propMO = (ManagedObject) gv.getValue();
+ managedObjects.put(propMO.getName(), propMO);
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,132 +19,132 @@
* 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.resource.deployers.management;
-
-import java.lang.reflect.Type;
-import java.util.Map;
-import java.util.List;
-import java.util.ArrayList;
-import java.io.Serializable;
-import java.io.ObjectStreamException;
-import org.jboss.managed.plugins.WritethroughManagedPropertyImpl;
-import org.jboss.managed.plugins.ManagedPropertyImpl;
-import org.jboss.managed.plugins.factory.ManagedObjectFactoryBuilder;
-import org.jboss.managed.api.Fields;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.factory.ManagedObjectFactory;
-import org.jboss.managed.spi.factory.InstanceClassFactory;
-import org.jboss.metatype.api.types.MapCompositeMetaType;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.types.MetaTypeFactory;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.metatype.api.values.MetaValueFactory;
-import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.beans.info.spi.PropertyInfo;
-import org.jboss.beans.info.spi.BeanInfo;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryPropertyMetaData;
-import org.jboss.resource.metadata.mcf.XAConnectionPropertyMetaData;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision: $</tt>
- */
-public class XAConnectionFactoryProperty
- extends ManagedPropertyImpl
-{
- private static final long serialVersionUID = 1;
-
- private MetaValueFactory metaValueFactory;
- private ManagedObjectFactory moFactory;
- private MapCompositeMetaType type;
-
-
- public XAConnectionFactoryProperty(String s)
- {
- super(s);
- type = new MapCompositeMetaType(SimpleMetaType.STRING);
- setField(Fields.META_TYPE, null);
- }
-
- public XAConnectionFactoryProperty(Fields fields)
- {
- super(fields);
- type = new MapCompositeMetaType(SimpleMetaType.STRING);
- setField(Fields.META_TYPE, null);
- }
-
- public XAConnectionFactoryProperty(ManagedObject managedObject, Fields fields)
- {
- super(managedObject, fields);
- type = new MapCompositeMetaType(SimpleMetaType.STRING);
- setField(Fields.META_TYPE, null);
- }
-
-
- public MetaType getMetaType()
- {
- return type;
- }
-
- public void setField(String fieldName, Serializable value)
- {
- if(Fields.META_TYPE.equals(fieldName))
- value = type;
- super.setField(fieldName, value);
- }
-
- /**
- * Write the value back to the attachment if there is a PropertyInfo
- * in the Fields.PROPERTY_INFO field.
- */
- @Override
- @SuppressWarnings("unchecked")
- public void setValue(Serializable value)
- {
- super.setValue(value);
-
- PropertyInfo propertyInfo = getField(Fields.PROPERTY_INFO, PropertyInfo.class);
- if (propertyInfo != null)
- {
- Serializable attachment = getManagedObject().getAttachment();
- if (attachment != null)
- {
- if (value instanceof MetaValue)
- {
- MetaValue metaValue = (MetaValue) value;
- InstanceClassFactory icf = getMOFactory().getInstanceClassFactory(attachment.getClass());
- BeanInfo beanInfo = propertyInfo.getBeanInfo();
- icf.setValue(beanInfo, this, attachment, metaValue);
- }
- }
- }
- }
-
- private ManagedObjectFactory getMOFactory()
- {
- if(moFactory == null)
- moFactory = ManagedObjectFactoryBuilder.create();
- return moFactory;
- }
-
- private MetaValueFactory getMetaValueFactory()
- {
- if(metaValueFactory == null)
- metaValueFactory = MetaValueFactory.getInstance();
- return metaValueFactory;
- }
-
- /**
- * Expose only plain ManangedPropertyImpl.
- *
- * @return simpler ManagedPropertyImpl
- * @throws java.io.ObjectStreamException for any error
- */
- private Object writeReplace() throws ObjectStreamException
- {
- ManagedPropertyImpl managedProperty = new ManagedPropertyImpl(getManagedObject(), getFields());
- managedProperty.setTargetManagedObject(getTargetManagedObject());
- return managedProperty;
- }
-
-}
+package org.jboss.resource.deployers.management;
+
+import java.lang.reflect.Type;
+import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
+import java.io.Serializable;
+import java.io.ObjectStreamException;
+import org.jboss.managed.plugins.WritethroughManagedPropertyImpl;
+import org.jboss.managed.plugins.ManagedPropertyImpl;
+import org.jboss.managed.plugins.factory.ManagedObjectFactoryBuilder;
+import org.jboss.managed.api.Fields;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.factory.ManagedObjectFactory;
+import org.jboss.managed.spi.factory.InstanceClassFactory;
+import org.jboss.metatype.api.types.MapCompositeMetaType;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.types.MetaTypeFactory;
+import org.jboss.metatype.api.types.SimpleMetaType;
+import org.jboss.metatype.api.values.MetaValueFactory;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryPropertyMetaData;
+import org.jboss.resource.metadata.mcf.XAConnectionPropertyMetaData;
+
+/**
+ * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
+ * @version <tt>$Revision: $</tt>
+ */
+public class XAConnectionFactoryProperty
+ extends ManagedPropertyImpl
+{
+ private static final long serialVersionUID = 1;
+
+ private MetaValueFactory metaValueFactory;
+ private ManagedObjectFactory moFactory;
+ private MapCompositeMetaType type;
+
+
+ public XAConnectionFactoryProperty(String s)
+ {
+ super(s);
+ type = new MapCompositeMetaType(SimpleMetaType.STRING);
+ setField(Fields.META_TYPE, null);
+ }
+
+ public XAConnectionFactoryProperty(Fields fields)
+ {
+ super(fields);
+ type = new MapCompositeMetaType(SimpleMetaType.STRING);
+ setField(Fields.META_TYPE, null);
+ }
+
+ public XAConnectionFactoryProperty(ManagedObject managedObject, Fields fields)
+ {
+ super(managedObject, fields);
+ type = new MapCompositeMetaType(SimpleMetaType.STRING);
+ setField(Fields.META_TYPE, null);
+ }
+
+
+ public MetaType getMetaType()
+ {
+ return type;
+ }
+
+ public void setField(String fieldName, Serializable value)
+ {
+ if(Fields.META_TYPE.equals(fieldName))
+ value = type;
+ super.setField(fieldName, value);
+ }
+
+ /**
+ * Write the value back to the attachment if there is a PropertyInfo
+ * in the Fields.PROPERTY_INFO field.
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public void setValue(Serializable value)
+ {
+ super.setValue(value);
+
+ PropertyInfo propertyInfo = getField(Fields.PROPERTY_INFO, PropertyInfo.class);
+ if (propertyInfo != null)
+ {
+ Serializable attachment = getManagedObject().getAttachment();
+ if (attachment != null)
+ {
+ if (value instanceof MetaValue)
+ {
+ MetaValue metaValue = (MetaValue) value;
+ InstanceClassFactory icf = getMOFactory().getInstanceClassFactory(attachment.getClass());
+ BeanInfo beanInfo = propertyInfo.getBeanInfo();
+ icf.setValue(beanInfo, this, attachment, metaValue);
+ }
+ }
+ }
+ }
+
+ private ManagedObjectFactory getMOFactory()
+ {
+ if(moFactory == null)
+ moFactory = ManagedObjectFactoryBuilder.create();
+ return moFactory;
+ }
+
+ private MetaValueFactory getMetaValueFactory()
+ {
+ if(metaValueFactory == null)
+ metaValueFactory = MetaValueFactory.getInstance();
+ return metaValueFactory;
+ }
+
+ /**
+ * Expose only plain ManangedPropertyImpl.
+ *
+ * @return simpler ManagedPropertyImpl
+ * @throws java.io.ObjectStreamException for any error
+ */
+ private Object writeReplace() throws ObjectStreamException
+ {
+ ManagedPropertyImpl managedProperty = new ManagedPropertyImpl(getManagedObject(), getFields());
+ managedProperty.setTargetManagedObject(getTargetManagedObject());
+ return managedProperty;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,251 +19,251 @@
* 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.resource.metadata.mcf;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
+package org.jboss.resource.metadata.mcf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
-
-/**
- * A DataSourceDeploymentMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class DataSourceDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData implements JDBCProviderSupport
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = 1440129014410015366L;
-
- private static final String CONNECTION_DEFINITION = "javax.sql.DataSource";
-
- private static final String RAR_NAME = "jboss-local-jdbc.rar";
-
- @XmlElement(name="transaction-isolation")
+
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
+
+/**
+ * A DataSourceDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class DataSourceDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData implements JDBCProviderSupport
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 1440129014410015366L;
+
+ private static final String CONNECTION_DEFINITION = "javax.sql.DataSource";
+
+ private static final String RAR_NAME = "jboss-local-jdbc.rar";
+
+ @XmlElement(name="transaction-isolation")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String transactionIsolation;
-
- @XmlElement(name="user-name")
+ private String transactionIsolation;
+
+ @XmlElement(name="user-name")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String userName;
-
- @XmlElement(name="password")
+ private String userName;
+
+ @XmlElement(name="password")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String passWord;
-
- @XmlElement(name="new-connection-sql")
+ private String passWord;
+
+ @XmlElement(name="new-connection-sql")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String newConnectionSQL;
-
- @XmlElement(name="check-valid-connection-sql")
+ private String newConnectionSQL;
+
+ @XmlElement(name="check-valid-connection-sql")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String checkValidConnectionSQL;
-
- @XmlElement(name="valid-connection-checker-class-name")
+ private String checkValidConnectionSQL;
+
+ @XmlElement(name="valid-connection-checker-class-name")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String validConnectionCheckerClassName;
-
- @XmlElement(name="exception-sorter-class-name")
+ private String validConnectionCheckerClassName;
+
+ @XmlElement(name="exception-sorter-class-name")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String exceptionSorterClassName;
-
- @XmlElement(name="stale-connection-checker-class-name")
+ private String exceptionSorterClassName;
+
+ @XmlElement(name="stale-connection-checker-class-name")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String staleConnectionCheckerClassName;
-
- @XmlElement(name="track-statements")
+ private String staleConnectionCheckerClassName;
+
+ @XmlElement(name="track-statements")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String trackStatements;
-
- @XmlElement(name="prepared-statement-cache-size")
- private int preparedStatementCacheSize = 0;
-
- @XmlElement(name="share-prepared-statements")
- private boolean sharePreparedStatements;
-
- @XmlElement(name="set-tx-query-timeout")
- private boolean useQueryTimeout;
-
- @XmlElement(name="query-timeout")
- private int queryTimeout;
+ private String trackStatements;
+ @XmlElement(name="prepared-statement-cache-size")
+ private int preparedStatementCacheSize = 0;
+
+ @XmlElement(name="share-prepared-statements")
+ private boolean sharePreparedStatements;
+
+ @XmlElement(name="set-tx-query-timeout")
+ private boolean useQueryTimeout;
+
+ @XmlElement(name="query-timeout")
+ private int queryTimeout;
+
@XmlElement(name="use-try-lock")
private long useTryLock;
-
- @XmlElement(name="url-delimiter")
+
+ @XmlElement(name="url-delimiter")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String urlDelimiter;
-
- @XmlElement(name="url-selector-strategy-class-name")
+ private String urlDelimiter;
+
+ @XmlElement(name="url-selector-strategy-class-name")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String urlSelectorStrategyClassName;
-
- public DataSourceDeploymentMetaData()
- {
- setConnectionDefinition(CONNECTION_DEFINITION);
- setRarName(RAR_NAME);
-
- }
-
- @ManagementProperty(name="transaction-isolation",
- description="The DataSource transaction isolation level",
- includeInTemplate=true)
- public String getTransactionIsolation()
- {
- return transactionIsolation;
- }
-
- public void setTransactionIsolation(String transactionIsolation)
- {
- this.transactionIsolation = transactionIsolation;
- }
-
- @ManagementProperty(name="password", description="The DataSource password",
- includeInTemplate=true)
- public String getPassWord()
- {
- return passWord;
- }
-
- public void setPassWord(String passWord)
- {
- this.passWord = passWord;
- }
-
- @ManagementProperty(name="user-name", description="The DataSource username",
- includeInTemplate=true)
- public String getUserName()
- {
- return userName;
- }
-
- public void setUserName(String userName)
- {
- this.userName = userName;
- }
-
-
- @ManagementProperty(name="check-valid-connection-sql",
- description="The SQL statement to validate a connection",
- includeInTemplate=true)
- public String getCheckValidConnectionSQL()
- {
- return checkValidConnectionSQL;
- }
-
- public void setCheckValidConnectionSQL(String checkValidConnectionSQL)
- {
- this.checkValidConnectionSQL = checkValidConnectionSQL;
- }
-
- @ManagementProperty(name="exception-sorter-class-name",
- description="The exception sorter class name",
- includeInTemplate=true)
- public String getExceptionSorterClassName()
- {
- return exceptionSorterClassName;
- }
-
- public void setExceptionSorterClassName(String exceptionSorterClassName)
- {
- this.exceptionSorterClassName = exceptionSorterClassName;
- }
-
- @ManagementProperty(name="new-connection-sql", description="The new connection SQL",
- includeInTemplate=true)
- public String getNewConnectionSQL()
- {
- return newConnectionSQL;
- }
-
- public void setNewConnectionSQL(String newConnectionSQL)
- {
- this.newConnectionSQL = newConnectionSQL;
- }
-
- @ManagementProperty(name="valid-connection-checker-class-name",
- description="The DataSource connection checker class name",
- includeInTemplate=true)
- public String getValidConnectionCheckerClassName()
- {
- return validConnectionCheckerClassName;
- }
-
- public void setValidConnectionCheckerClassName(String validConnectionCheckerClassName)
- {
- this.validConnectionCheckerClassName = validConnectionCheckerClassName;
- }
-
- @ManagementProperty(name="stale-connection-checker-class-name",
- description="The DataSource stale connection checker class name",
- includeInTemplate=true)
- public String getStaleConnectionCheckerClassName()
- {
- return staleConnectionCheckerClassName;
- }
-
- public void setStaleConnectionCheckerClassName(String staleConnectionCheckerClassName)
- {
- this.staleConnectionCheckerClassName = staleConnectionCheckerClassName;
- }
-
- @ManagementProperty(name="url-delimiter", description="The DataSource url delimiter",
- includeInTemplate=true)
- public String getURLDelimiter()
- {
- return urlDelimiter;
- }
-
- public void setURLDelimiter(String urlDelimiter)
- {
- this.urlDelimiter = urlDelimiter;
- }
-
- @ManagementProperty(name="url-selector-strategy-class-name",
- description="The DataSource url selector strategy class name",
- includeInTemplate=true)
- public String getURLSelectorStrategyClassName()
- {
- return urlSelectorStrategyClassName;
- }
-
- public void setURLSelectorStrategyClassName(String urlSelectorStrategyClassName)
- {
- this.urlSelectorStrategyClassName = urlSelectorStrategyClassName;
- }
-
- @ManagementProperty(name="prepared-statement-cache-size",
- description="The DataSource prepared statement cache size",
- includeInTemplate=true)
- public int getPreparedStatementCacheSize()
- {
- return preparedStatementCacheSize;
- }
-
- public void setPreparedStatementCacheSize(int preparedStatementCacheSize)
- {
- this.preparedStatementCacheSize = preparedStatementCacheSize;
- }
-
- @ManagementProperty(name="query-timeout", description="The query timeout",
- includeInTemplate=true)
- public int getQueryTimeout()
- {
- return queryTimeout;
- }
-
- public void setQueryTimeout(int queryTimeout)
- {
- this.queryTimeout = queryTimeout;
- }
+ private String urlSelectorStrategyClassName;
+
+ public DataSourceDeploymentMetaData()
+ {
+ setConnectionDefinition(CONNECTION_DEFINITION);
+ setRarName(RAR_NAME);
+
+ }
+ @ManagementProperty(name="transaction-isolation",
+ description="The DataSource transaction isolation level",
+ includeInTemplate=true)
+ public String getTransactionIsolation()
+ {
+ return transactionIsolation;
+ }
+
+ public void setTransactionIsolation(String transactionIsolation)
+ {
+ this.transactionIsolation = transactionIsolation;
+ }
+
+ @ManagementProperty(name="password", description="The DataSource password",
+ includeInTemplate=true)
+ public String getPassWord()
+ {
+ return passWord;
+ }
+
+ public void setPassWord(String passWord)
+ {
+ this.passWord = passWord;
+ }
+
+ @ManagementProperty(name="user-name", description="The DataSource username",
+ includeInTemplate=true)
+ public String getUserName()
+ {
+ return userName;
+ }
+
+ public void setUserName(String userName)
+ {
+ this.userName = userName;
+ }
+
+
+ @ManagementProperty(name="check-valid-connection-sql",
+ description="The SQL statement to validate a connection",
+ includeInTemplate=true)
+ public String getCheckValidConnectionSQL()
+ {
+ return checkValidConnectionSQL;
+ }
+
+ public void setCheckValidConnectionSQL(String checkValidConnectionSQL)
+ {
+ this.checkValidConnectionSQL = checkValidConnectionSQL;
+ }
+
+ @ManagementProperty(name="exception-sorter-class-name",
+ description="The exception sorter class name",
+ includeInTemplate=true)
+ public String getExceptionSorterClassName()
+ {
+ return exceptionSorterClassName;
+ }
+
+ public void setExceptionSorterClassName(String exceptionSorterClassName)
+ {
+ this.exceptionSorterClassName = exceptionSorterClassName;
+ }
+
+ @ManagementProperty(name="new-connection-sql", description="The new connection SQL",
+ includeInTemplate=true)
+ public String getNewConnectionSQL()
+ {
+ return newConnectionSQL;
+ }
+
+ public void setNewConnectionSQL(String newConnectionSQL)
+ {
+ this.newConnectionSQL = newConnectionSQL;
+ }
+
+ @ManagementProperty(name="valid-connection-checker-class-name",
+ description="The DataSource connection checker class name",
+ includeInTemplate=true)
+ public String getValidConnectionCheckerClassName()
+ {
+ return validConnectionCheckerClassName;
+ }
+
+ public void setValidConnectionCheckerClassName(String validConnectionCheckerClassName)
+ {
+ this.validConnectionCheckerClassName = validConnectionCheckerClassName;
+ }
+
+ @ManagementProperty(name="stale-connection-checker-class-name",
+ description="The DataSource stale connection checker class name",
+ includeInTemplate=true)
+ public String getStaleConnectionCheckerClassName()
+ {
+ return staleConnectionCheckerClassName;
+ }
+
+ public void setStaleConnectionCheckerClassName(String staleConnectionCheckerClassName)
+ {
+ this.staleConnectionCheckerClassName = staleConnectionCheckerClassName;
+ }
+
+ @ManagementProperty(name="url-delimiter", description="The DataSource url delimiter",
+ includeInTemplate=true)
+ public String getURLDelimiter()
+ {
+ return urlDelimiter;
+ }
+
+ public void setURLDelimiter(String urlDelimiter)
+ {
+ this.urlDelimiter = urlDelimiter;
+ }
+
+ @ManagementProperty(name="url-selector-strategy-class-name",
+ description="The DataSource url selector strategy class name",
+ includeInTemplate=true)
+ public String getURLSelectorStrategyClassName()
+ {
+ return urlSelectorStrategyClassName;
+ }
+
+ public void setURLSelectorStrategyClassName(String urlSelectorStrategyClassName)
+ {
+ this.urlSelectorStrategyClassName = urlSelectorStrategyClassName;
+ }
+
+ @ManagementProperty(name="prepared-statement-cache-size",
+ description="The DataSource prepared statement cache size",
+ includeInTemplate=true)
+ public int getPreparedStatementCacheSize()
+ {
+ return preparedStatementCacheSize;
+ }
+
+ public void setPreparedStatementCacheSize(int preparedStatementCacheSize)
+ {
+ this.preparedStatementCacheSize = preparedStatementCacheSize;
+ }
+
+ @ManagementProperty(name="query-timeout", description="The query timeout",
+ includeInTemplate=true)
+ public int getQueryTimeout()
+ {
+ return queryTimeout;
+ }
+
+ public void setQueryTimeout(int queryTimeout)
+ {
+ this.queryTimeout = queryTimeout;
+ }
+
@ManagementProperty(name="use-try-lock", description="The internal lock timeout",
includeInTemplate=true)
public long getUseTryLock()
@@ -275,183 +275,183 @@
{
this.useTryLock = useTryLock;
}
-
- @ManagementProperty(name="share-prepared-statements",
- description="Should prepared statements be shared",
- includeInTemplate=true)
- public boolean isSharePreparedStatements()
- {
- return sharePreparedStatements;
- }
-
- public void setSharePreparedStatements(boolean sharePreparedStatements)
- {
- this.sharePreparedStatements = sharePreparedStatements;
- }
-
- @ManagementProperty(name="track-statements", description="The track statements method",
- includeInTemplate=true)
- public String getTrackStatements()
- {
- return trackStatements;
- }
-
- public void setTrackStatements(String trackStatements)
- {
- this.trackStatements = trackStatements;
- }
-
- @ManagementProperty(name="set-tx-query-timeout", description="Should query timeout be enabled",
- includeInTemplate=true)
- public boolean isUseQueryTimeout()
- {
- return useQueryTimeout;
- }
-
- public void setUseQueryTimeout(boolean useQueryTimeout)
- {
- this.useQueryTimeout = useQueryTimeout;
- }
-
- @Override
- @ManagementProperty(name="config-property",
- description="The connection factory property info", managed=true, propertyFactory= ConnectionFactoryProperty.class,
- includeInTemplate=true)
- public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
- {
- List<ManagedConnectionFactoryPropertyMetaData> properties = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
- ManagedConnectionFactoryPropertyMetaData property = null;
-
- if(getUserName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("UserName");
- property.setValue(getUserName());
- properties.add(property);
- }
-
- if(getPassWord() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("Password");
- property.setValue(getPassWord());
- properties.add(property);
-
- }
-
- if(getTransactionIsolation() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("TransactionIsolation");
- property.setValue(getTransactionIsolation());
- properties.add(property);
-
- }
-
- if(getNewConnectionSQL() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("NewConnectionSQL");
- property.setValue(getNewConnectionSQL());
- properties.add(property);
-
- }
-
- if(getCheckValidConnectionSQL() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("CheckValidConnectionSQL");
- property.setValue(getCheckValidConnectionSQL());
- properties.add(property);
-
- }
-
- if(getValidConnectionCheckerClassName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("ValidConnectionCheckerClassName");
- property.setValue(getValidConnectionCheckerClassName());
- properties.add(property);
-
- }
-
- if(getExceptionSorterClassName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("ExceptionSorterClassName");
- property.setValue(getExceptionSorterClassName());
- properties.add(property);
- }
-
- if(getStaleConnectionCheckerClassName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("StaleConnectionCheckerClassName");
- property.setValue(getStaleConnectionCheckerClassName());
- properties.add(property);
- }
-
- if(getURLSelectorStrategyClassName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("URLSelectorStrategyClassName");
- property.setValue(getURLSelectorStrategyClassName());
- properties.add(property);
- }
-
- if(getURLDelimiter() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("URLDelimiter");
- property.setValue(getURLDelimiter());
- properties.add(property);
- }
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("PreparedStatementCacheSize");
- property.setType("int");
- property.setValue(String.valueOf(getPreparedStatementCacheSize()));
- properties.add(property);
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("SharePreparedStatements");
- property.setType("boolean");
- property.setValue(String.valueOf(isSharePreparedStatements()));
- properties.add(property);
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("QueryTimeout");
- property.setType("int");
- property.setValue(String.valueOf(getQueryTimeout()));
- properties.add(property);
+
+ @ManagementProperty(name="share-prepared-statements",
+ description="Should prepared statements be shared",
+ includeInTemplate=true)
+ public boolean isSharePreparedStatements()
+ {
+ return sharePreparedStatements;
+ }
+
+ public void setSharePreparedStatements(boolean sharePreparedStatements)
+ {
+ this.sharePreparedStatements = sharePreparedStatements;
+ }
+
+ @ManagementProperty(name="track-statements", description="The track statements method",
+ includeInTemplate=true)
+ public String getTrackStatements()
+ {
+ return trackStatements;
+ }
+
+ public void setTrackStatements(String trackStatements)
+ {
+ this.trackStatements = trackStatements;
+ }
+
+ @ManagementProperty(name="set-tx-query-timeout", description="Should query timeout be enabled",
+ includeInTemplate=true)
+ public boolean isUseQueryTimeout()
+ {
+ return useQueryTimeout;
+ }
+
+ public void setUseQueryTimeout(boolean useQueryTimeout)
+ {
+ this.useQueryTimeout = useQueryTimeout;
+ }
+
+ @Override
+ @ManagementProperty(name="config-property",
+ description="The connection factory property info", managed=true, propertyFactory= ConnectionFactoryProperty.class,
+ includeInTemplate=true)
+ public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
+ {
+ List<ManagedConnectionFactoryPropertyMetaData> properties = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
+ ManagedConnectionFactoryPropertyMetaData property = null;
+
+ if(getUserName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("UserName");
+ property.setValue(getUserName());
+ properties.add(property);
+ }
+ if(getPassWord() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("Password");
+ property.setValue(getPassWord());
+ properties.add(property);
+
+ }
+
+ if(getTransactionIsolation() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("TransactionIsolation");
+ property.setValue(getTransactionIsolation());
+ properties.add(property);
+
+ }
+
+ if(getNewConnectionSQL() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("NewConnectionSQL");
+ property.setValue(getNewConnectionSQL());
+ properties.add(property);
+
+ }
+
+ if(getCheckValidConnectionSQL() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("CheckValidConnectionSQL");
+ property.setValue(getCheckValidConnectionSQL());
+ properties.add(property);
+
+ }
+
+ if(getValidConnectionCheckerClassName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("ValidConnectionCheckerClassName");
+ property.setValue(getValidConnectionCheckerClassName());
+ properties.add(property);
+
+ }
+
+ if(getExceptionSorterClassName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("ExceptionSorterClassName");
+ property.setValue(getExceptionSorterClassName());
+ properties.add(property);
+ }
+
+ if(getStaleConnectionCheckerClassName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("StaleConnectionCheckerClassName");
+ property.setValue(getStaleConnectionCheckerClassName());
+ properties.add(property);
+ }
+
+ if(getURLSelectorStrategyClassName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("URLSelectorStrategyClassName");
+ property.setValue(getURLSelectorStrategyClassName());
+ properties.add(property);
+ }
+
+ if(getURLDelimiter() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("URLDelimiter");
+ property.setValue(getURLDelimiter());
+ properties.add(property);
+ }
+
property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("PreparedStatementCacheSize");
+ property.setType("int");
+ property.setValue(String.valueOf(getPreparedStatementCacheSize()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("SharePreparedStatements");
+ property.setType("boolean");
+ property.setValue(String.valueOf(isSharePreparedStatements()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("QueryTimeout");
+ property.setType("int");
+ property.setValue(String.valueOf(getQueryTimeout()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
property.setName("UseTryLock");
property.setType("long");
property.setValue(String.valueOf(getUseTryLock()));
properties.add(property);
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("TransactionQueryTimeout");
- property.setType("boolean");
- property.setValue(String.valueOf(isUseQueryTimeout()));
- properties.add(property);
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("ValidateOnMatch");
- property.setType("boolean");
- property.setValue(String.valueOf(isValidateOnMatch()));
- properties.add(property);
-
- if (getTrackStatements() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("TrackStatements");
- property.setType("java.lang.String");
- property.setValue(String.valueOf(getTrackStatements()));
- properties.add(property);
- }
-
- return properties;
- }
-}
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("TransactionQueryTimeout");
+ property.setType("boolean");
+ property.setValue(String.valueOf(isUseQueryTimeout()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("ValidateOnMatch");
+ property.setType("boolean");
+ property.setValue(String.valueOf(isValidateOnMatch()));
+ properties.add(property);
+
+ if (getTrackStatements() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("TrackStatements");
+ property.setType("java.lang.String");
+ property.setValue(String.valueOf(getTrackStatements()));
+ properties.add(property);
+ }
+
+ return properties;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,126 +19,126 @@
* 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.resource.metadata.mcf;
-
-import java.io.Serializable;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
+package org.jboss.resource.metadata.mcf;
+
+import java.io.Serializable;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperty;
import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
-import org.jboss.system.metadata.ServiceMetaData;
-
-/**
- * A ManagedConnectionFactoryDeploymentGroup.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @author Scott.Stark at jboss.org
- * @version $Revision: 1.1 $
- */
- at XmlAccessorType(XmlAccessType.NONE)
- at ManagementObject
-public class ManagedConnectionFactoryDeploymentGroup implements Serializable
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = -7650097438654698297L;
-
- /** The fileUrl */
- private URL fileUrl;
-
- /** The deployments */
-
- @XmlElements({@XmlElement(name="local-tx-datasource", type=LocalDataSourceDeploymentMetaData.class),
- @XmlElement(name="no-tx-datasource", type=NoTxDataSourceDeploymentMetaData.class),
- @XmlElement(name="xa-datasource", type=XADataSourceDeploymentMetaData.class),
- @XmlElement(name="no-tx-connection-factory", type=NoTxConnectionFactoryDeploymentMetaData.class),
- @XmlElement(name="tx-connection-factory",type=TxConnectionFactoryDeploymentMetaData.class)})
- private List<ManagedConnectionFactoryDeploymentMetaData> deployments = new ArrayList<ManagedConnectionFactoryDeploymentMetaData>();
-
- /** The services */
- @XmlElement(name="mbean")
- @XmlJavaTypeAdapter(ServiceMetaDataAdapter.class)
- private List<ServiceMetaData> services = new ArrayList<ServiceMetaData>();
+import org.jboss.system.metadata.ServiceMetaData;
+
+/**
+ * A ManagedConnectionFactoryDeploymentGroup.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.NONE)
+ at ManagementObject
+public class ManagedConnectionFactoryDeploymentGroup implements Serializable
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -7650097438654698297L;
+
+ /** The fileUrl */
+ private URL fileUrl;
+
+ /** The deployments */
+
+ @XmlElements({@XmlElement(name="local-tx-datasource", type=LocalDataSourceDeploymentMetaData.class),
+ @XmlElement(name="no-tx-datasource", type=NoTxDataSourceDeploymentMetaData.class),
+ @XmlElement(name="xa-datasource", type=XADataSourceDeploymentMetaData.class),
+ @XmlElement(name="no-tx-connection-factory", type=NoTxConnectionFactoryDeploymentMetaData.class),
+ @XmlElement(name="tx-connection-factory",type=TxConnectionFactoryDeploymentMetaData.class)})
+ private List<ManagedConnectionFactoryDeploymentMetaData> deployments = new ArrayList<ManagedConnectionFactoryDeploymentMetaData>();
+ /** The services */
+ @XmlElement(name="mbean")
+ @XmlJavaTypeAdapter(ServiceMetaDataAdapter.class)
+ private List<ServiceMetaData> services = new ArrayList<ServiceMetaData>();
+
/** The loader repository config */
@XmlElement(name="loader-repository")
@XmlJavaTypeAdapter(LoaderRepositoryAdapter.class)
private LoaderRepositoryConfig loaderRepositoryConfig;
-
- public void addManagedConnectionFactoryDeployment(ManagedConnectionFactoryDeploymentMetaData deployment)
- {
- this.deployments.add(deployment);
- }
-
- @ManagementProperty(description="The connection factories", managed=true)
- public List<ManagedConnectionFactoryDeploymentMetaData> getDeployments()
- {
- return Collections.unmodifiableList(deployments);
- }
-
- /**
- * Get the fileUrl.
- *
- * @return the fileUrl.
- */
- @ManagementProperty(description="The ds.xml url", ignored=true)
- public URL getUrl()
- {
- return fileUrl;
- }
-
- /**
- * Set the fileUrl.
- *
- * @param fileUrl The fileUrl to set.
- */
- public void setUrl(URL fileUrl)
- {
- this.fileUrl = fileUrl;
- }
-
- /**
- * Set the deployments.
- *
- * @param deployments The deployments to set.
- */
- public void setDeployments(List<ManagedConnectionFactoryDeploymentMetaData> deployments)
- {
- this.deployments = deployments;
- }
-
- /**
- * Get the services.
- *
- * @return the services.
- */
- @ManagementProperty(description="The extra mbeans from the ds.xml", managed=true)
- public List<ServiceMetaData> getServices()
- {
- return services;
- }
-
- /**
- * Set the services.
- *
- * @param services The services to set.
- */
- public void setServices(List<ServiceMetaData> services)
- {
- this.services = services;
+
+ public void addManagedConnectionFactoryDeployment(ManagedConnectionFactoryDeploymentMetaData deployment)
+ {
+ this.deployments.add(deployment);
}
+
+ @ManagementProperty(description="The connection factories", managed=true)
+ public List<ManagedConnectionFactoryDeploymentMetaData> getDeployments()
+ {
+ return Collections.unmodifiableList(deployments);
+ }
/**
+ * Get the fileUrl.
+ *
+ * @return the fileUrl.
+ */
+ @ManagementProperty(description="The ds.xml url", ignored=true)
+ public URL getUrl()
+ {
+ return fileUrl;
+ }
+
+ /**
+ * Set the fileUrl.
+ *
+ * @param fileUrl The fileUrl to set.
+ */
+ public void setUrl(URL fileUrl)
+ {
+ this.fileUrl = fileUrl;
+ }
+
+ /**
+ * Set the deployments.
+ *
+ * @param deployments The deployments to set.
+ */
+ public void setDeployments(List<ManagedConnectionFactoryDeploymentMetaData> deployments)
+ {
+ this.deployments = deployments;
+ }
+
+ /**
+ * Get the services.
+ *
+ * @return the services.
+ */
+ @ManagementProperty(description="The extra mbeans from the ds.xml", managed=true)
+ public List<ServiceMetaData> getServices()
+ {
+ return services;
+ }
+
+ /**
+ * Set the services.
+ *
+ * @param services The services to set.
+ */
+ public void setServices(List<ServiceMetaData> services)
+ {
+ this.services = services;
+ }
+
+ /**
* Get the loaderRepositoryConfig.
*
* @return the loaderRepositoryConfig.
@@ -156,6 +156,6 @@
public void setLoaderRepositoryConfig(LoaderRepositoryConfig loaderRepositoryConfig)
{
this.loaderRepositoryConfig = loaderRepositoryConfig;
- }
-
-}
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -1,601 +1,601 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.resource.metadata.mcf;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementObjectID;
-import org.jboss.managed.api.annotation.ManagementObjectRef;
-import org.jboss.managed.api.annotation.ManagementProperties;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.jboss.system.metadata.ServiceMetaData;
-import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
-
-
-/**
- * A ManagedConnectionFactoryDeployment.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at ManagementObject(properties=ManagementProperties.EXPLICIT)
-public class ManagedConnectionFactoryDeploymentMetaData
- implements Serializable, ConnectionPoolMetaData
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = -4591557831734316580L;
-
- /** The jndiName */
- @XmlElement(name="jndi-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String jndiName;
-
- /** The rarName */
- @XmlElement(name="rar-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String rarName;
-
- /** The useJavaContext */
- @XmlElement(name="use-java-context")
- private boolean useJavaContext = true;
-
- /** The connectionDefinition */
- @XmlElement(name="connection-definition")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- protected String connectionDefinition;
-
- /** The jmxInvokerName */
- @XmlElement(name="jmx-invoker-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String jmxInvokerName = "jboss:service=invoker,type=jrmp";
-
- @XmlElement(name="min-pool-size")
- private int minSize = 0;
-
- @XmlElement(name="max-pool-size")
- private int maxPoolSize = 10;
-
- @XmlElement(name="blocking-timeout-millis")
- private long blockingTimeout = 30000;
-
- @XmlElement(name="idle-timeout-minutes")
- private int idleTimeout = 30;
-
- @XmlElement(name="prefill")
- private Boolean prefill = Boolean.FALSE;
-
- @XmlElement(name="background-validation")
- private boolean backgroundValidation;
-
- @XmlElement(name="background-validation-millis")
- private long backgroundValidationMillis;
-
- @XmlElement(name="validate-on-match")
- private boolean validateOnMatch = true;
-
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="use-strict-min")
- private Boolean useStrictMin = Boolean.FALSE;
-
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="no-tx-separate-pools")
- private Boolean noTxSeparatePools = Boolean.FALSE;
-
- @XmlElement(name="statistics-formatter")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String statisticsFormatter = "org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter";
-
- @XmlElement(name="isSameRM-override-value")
- private Boolean isSameRMOverrideValue = Boolean.FALSE;
-
- // is always true now and left here for the xml binding
- @Deprecated
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="track-connection-by-tx")
- private Boolean trackConnectionByTransaction;
-
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="interleaving")
- private Boolean interleaving;
-
- /** The transactionSupportMetaData */
- @XmlTransient
- private ManagedConnectionFactoryTransactionSupportMetaData transactionSupportMetaData = ManagedConnectionFactoryTransactionSupportMetaData.NONE;
-
- /** The managedConnectionFactoryProperties */
- @XmlElement(name="config-property")
- private List<ManagedConnectionFactoryPropertyMetaData> managedConnectionFactoryProperties = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
-
- /** The securityMetaData */
- @XmlElements({@XmlElement(name="security-domain", type=SecurityDomainMetaData.class), @XmlElement(name="security-domain-and-application",type=SecurityDomainApplicationManagedMetaData.class), @XmlElement(name="application-managed-security",type=ApplicationManagedSecurityMetaData.class)})
- private SecurityMetaData securityMetaData;
-
- @XmlElement(name="depends")
- private List<String> dependsNames = new ArrayList<String>();
-
- @XmlTransient
- private List<ServiceMetaData> dependsServices = new ArrayList<ServiceMetaData>();
-
- @XmlElement(name="metadata")
- private DBMSMetaData dbmsMetaData;
-
- // todo: this should be wrapped into <metadata> element
- @XmlElement(name="type-mapping")
- String typeMapping;
-
- /** The localTransactions */
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="local-transaction")
- private Boolean localTransactions = Boolean.FALSE;
-
- public ManagedConnectionFactoryDeploymentMetaData()
- {
- this.interleaving = Boolean.FALSE;
- }
-
- /**
- * Get the connectionDefinition.
- *
- * @return the connectionDefinition.
- */
- @ManagementProperty(name="connection-definition",
- includeInTemplate=true)
- public String getConnectionDefinition()
- {
- return connectionDefinition;
- }
-
- /**
- * Set the connectionDefinition.
- *
- * @param connectionDefinition The connectionDefinition to set.
- */
- public void setConnectionDefinition(String connectionDefinition)
- {
- this.connectionDefinition = connectionDefinition;
- }
-
- /**
- * Get the jndiName. This is the id for the DataSource ManagedObject.
- *
- * @return the jndiName.
- */
- @ManagementProperty(name="jndi-name",
- description="The global JNDI name to bind the factory under",
- includeInTemplate=true)
- @ManagementObjectID(type="DataSource")
- public String getJndiName()
- {
- return jndiName;
- }
-
- /**
- * Set the jndiName.
- *
- * @param jndiName The jndiName to set.
- */
- public void setJndiName(String jndiName)
- {
- this.jndiName = jndiName;
- }
-
- /**
- * Get the transactionSupportMetaData.
- *
- * @return the transactionSupportMetaData.
- */
- @ManagementProperty(ignored=true)
- public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
- {
- return transactionSupportMetaData;
- }
-
- /**
- * Set the transactionSupportMetaData.
- *
- * @param transactionSupportMetaData The transactionSupportMetaData to set.
- */
- public void setTransactionSupportMetaData(ManagedConnectionFactoryTransactionSupportMetaData transactionSupportMetaData)
- {
- this.transactionSupportMetaData = transactionSupportMetaData;
- }
-
- /**
- * Get the useJavaContext.
- *
- * @return the useJavaContext.
- */
- @ManagementProperty(name="use-java-context",
- description="Should the jndi name be bound under the java: context",
- includeInTemplate=true)
- public boolean isUseJavaContext()
- {
- return useJavaContext;
- }
-
- /**
- * Set the useJavaContext.
- *
- * @param useJavaContext The useJavaContext to set.
- */
- public void setUseJavaContext(boolean useJavaContext)
- {
- this.useJavaContext = useJavaContext;
- }
-
- /**
- * Get the managedConnectionFactoryProperties.
- *
- * @return the managedConnectionFactoryProperties.
- */
- @ManagementProperty(name="config-property", managed=true, includeInTemplate=true,
- propertyFactory= ConnectionFactoryProperty.class)
- public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
- {
- return managedConnectionFactoryProperties;
- }
-
- /**
- * Set the managedConnectionFactoryProperties.
- *
- * @param managedConnectionFactoryProperties The managedConnectionFactoryProperties to set.
- */
- public void setManagedConnectionFactoryProperties(
- List<ManagedConnectionFactoryPropertyMetaData> managedConnectionFactoryProperties)
- {
- this.managedConnectionFactoryProperties = managedConnectionFactoryProperties;
- }
-
- /**
- * Get the rarName.
- *
- * @return the rarName.
- */
- @ManagementProperty(name="rar-name")
- public String getRarName()
- {
- return rarName;
- }
-
- /**
- * Set the rarName.
- *
- * @param rarName The rarName to set.
- */
- public void setRarName(String rarName)
- {
- this.rarName = rarName;
- }
-
- /**
- * Get the securityMetaData.
- *
- * @return the securityMetaData.
- */
- @ManagementProperty(name="security-domain", managed=true, includeInTemplate=true)
- public SecurityMetaData getSecurityMetaData()
- {
- return securityMetaData;
- }
-
- /**
- * Set the securityMetaData.
- *
- * @param securityMetaData The securityMetaData to set.
- */
- public void setSecurityMetaData(SecurityMetaData securityMetaData)
- {
- this.securityMetaData = securityMetaData;
- }
-
-
- /**
- * Get the typeMapping.
- *
- * @return the typeMapping.
- */
- @ManagementProperty(name="type-mapping", includeInTemplate=true)
- public String getTypeMapping()
- {
- return typeMapping;
- }
-
- /**
- * Set the typeMapping.
- *
- * @param typeMapping The typeMapping to set.
- */
- public void setTypeMapping(String typeMapping)
- {
- this.typeMapping = typeMapping;
- }
-
- /**
- * Get the jmxInvokerName.
- *
- * @return the jmxInvokerName.
- */
- @ManagementProperty(name="jmx-invoker-name")
- @ManagementObjectRef(type="JMXInvoker")
- public String getJmxInvokerName()
- {
- return jmxInvokerName;
- }
-
- /**
- * Set the jmxInvokerName.
- *
- * @param jmxInvokerName The jmxInvokerName to set.
- */
- public void setJmxInvokerName(String jmxInvokerName)
- {
- this.jmxInvokerName = jmxInvokerName;
- }
-
- /**
- * Get the dependsNames.
- *
- * @return the dependsNames.
- */
- @ManagementProperty(name="depends", ignored=true)
- public List<String> getDependsNames()
- {
- return dependsNames;
- }
-
- /**
- * Set the dependsNames.
- *
- * @param dependsNames The dependsNames to set.
- */
- public void setDependsNames(List<String> dependsNames)
- {
- this.dependsNames = dependsNames;
- }
-
- /**
- * Get the dependsServices.
- *
- * @return the dependsServices.
- */
- @ManagementProperty(name="services", ignored=true)
- public List<ServiceMetaData> getDependsServices()
- {
- return dependsServices;
- }
-
- /**
- * Set the dependsServices.
- *
- * @param dependsServices The dependsServices to set.
- */
- public void setDependsServices(List<ServiceMetaData> dependsServices)
- {
- this.dependsServices = dependsServices;
- }
-
- @ManagementProperty(name="min-pool-size", includeInTemplate=true)
- public void setMinSize(int minSize)
- {
- this.minSize = minSize;
- }
-
- public int getMinSize()
- {
- return this.minSize;
-
- }
-
- @ManagementProperty(name="max-pool-size", includeInTemplate=true)
- public void setMaxSize(int maxSize)
- {
- this.maxPoolSize = maxSize;
- }
-
- public int getMaxSize()
- {
- if (this.maxPoolSize >= this.minSize)
- {
- return this.maxPoolSize;
- } else {
- return this.minSize;
- }
-
- }
-
- @ManagementProperty(name="blocking-timeout-millis", includeInTemplate=true)
- public void setBlockingTimeoutMilliSeconds(long blockTimeout)
- {
- this.blockingTimeout = blockTimeout;
-
- }
-
- public long getBlockingTimeoutMilliSeconds()
- {
- return this.blockingTimeout;
-
- }
-
- @ManagementProperty(name="idle-timeout-minutes", includeInTemplate=true)
- public void setIdleTimeoutMinutes(int idleTimeout)
- {
- this.idleTimeout = idleTimeout;
- }
-
- public int getIdleTimeoutMinutes()
- {
- return this.idleTimeout;
-
- }
-
- @ManagementProperty(name="prefill", includeInTemplate=true)
- public void setPrefill(Boolean prefill)
- {
- this.prefill = prefill;
- }
-
- public Boolean getPrefill()
- {
- return this.prefill;
- }
-
- @ManagementProperty(name="background-validation", includeInTemplate=true)
- public boolean isBackgroundValidation()
- {
- return backgroundValidation;
- }
-
- public void setBackgroundValidation(boolean backgroundValidation)
- {
- this.backgroundValidation = backgroundValidation;
- }
-
- public void setBackgroundValidationMillis(long interval)
- {
- this.backgroundValidationMillis = interval;
- }
-
- @ManagementProperty(name="background-validation-millis", includeInTemplate=true)
- public long getBackgroundValidationMillis()
- {
- return this.backgroundValidationMillis;
- }
-
- public void setValidateOnMatch(boolean validateOnMatch)
- {
- this.validateOnMatch = validateOnMatch;
- }
-
- @ManagementProperty(name="validate-on-match", includeInTemplate=true)
- public boolean isValidateOnMatch()
- {
- return this.validateOnMatch;
-
- }
-
- @ManagementProperty(name="isSameRM-override-value", includeInTemplate=true)
- public Boolean getIsSameRMOverrideValue()
- {
- return isSameRMOverrideValue;
- }
-
- public void setIsSameRMOverrideValue(Boolean isSameRMOverrideValue)
- {
- this.isSameRMOverrideValue = isSameRMOverrideValue;
- }
-
- @Deprecated
- @ManagementProperty(name="track-connection-by-tx", includeInTemplate=true)
- public Boolean getTrackConnectionByTransaction()
- {
- return !isInterleaving();
- }
-
- @Deprecated
- public void setTrackConnectionByTransaction(Boolean trackConnectionByTransaction)
- {
- if(Boolean.TRUE == getLocalTransactions() && !Boolean.TRUE.equals(trackConnectionByTransaction))
- throw new IllegalStateException("In case of local transactions track-connection-by-tx must always be true");
- setInterleaving(!Boolean.TRUE.equals(trackConnectionByTransaction));
- }
-
- @ManagementProperty(name="interleaving", includeInTemplate=true)
- public Boolean isInterleaving()
- {
- return interleaving == Boolean.TRUE && !Boolean.TRUE.equals(getLocalTransactions());
- }
-
- public void setInterleaving(Boolean interleaving)
- {
- this.interleaving = interleaving;
- }
-
- @ManagementProperty(name="local-transaction", use={ViewUse.RUNTIME})
- public Boolean getLocalTransactions()
- {
- return localTransactions;
- }
-
- public void setLocalTransactions(Boolean localTransactions)
- {
- this.localTransactions = localTransactions;
- }
-
- @ManagementProperty(name="use-strict-min", includeInTemplate=true)
- public Boolean getUseStrictMin()
- {
- return useStrictMin;
- }
-
- public void setUseStrictMin(Boolean useStrictMin)
- {
- this.useStrictMin = useStrictMin;
- }
-
- @ManagementProperty(name="statistics-formatter", includeInTemplate=true)
- public String getStatisticsFormatter()
- {
- return statisticsFormatter;
- }
-
- public void setStatisticsFormatter(String statisticsFormatter)
- {
- this.statisticsFormatter = statisticsFormatter;
- }
-
- @ManagementProperty(name="no-tx-separate-pools", includeInTemplate=true)
- public Boolean getNoTxSeparatePools()
- {
- return this.noTxSeparatePools;
- }
-
- public void setNoTxSeparatePools(Boolean notxpool)
- {
- this.noTxSeparatePools = notxpool;
- }
-
- @ManagementProperty(name="metadata", includeInTemplate=true)
- public DBMSMetaData getDBMSMetaData()
- {
- return dbmsMetaData;
- }
-
- public void setDBMSMetaData(DBMSMetaData dbmsMetaData)
- {
- this.dbmsMetaData = dbmsMetaData;
- }
-
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.resource.metadata.mcf;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementObjectID;
+import org.jboss.managed.api.annotation.ManagementObjectRef;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.system.metadata.ServiceMetaData;
+import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
+
+
+/**
+ * A ManagedConnectionFactoryDeployment.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at ManagementObject(properties=ManagementProperties.EXPLICIT)
+public class ManagedConnectionFactoryDeploymentMetaData
+ implements Serializable, ConnectionPoolMetaData
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -4591557831734316580L;
+
+ /** The jndiName */
+ @XmlElement(name="jndi-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String jndiName;
+
+ /** The rarName */
+ @XmlElement(name="rar-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String rarName;
+
+ /** The useJavaContext */
+ @XmlElement(name="use-java-context")
+ private boolean useJavaContext = true;
+
+ /** The connectionDefinition */
+ @XmlElement(name="connection-definition")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ protected String connectionDefinition;
+
+ /** The jmxInvokerName */
+ @XmlElement(name="jmx-invoker-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String jmxInvokerName = "jboss:service=invoker,type=jrmp";
+
+ @XmlElement(name="min-pool-size")
+ private int minSize = 0;
+
+ @XmlElement(name="max-pool-size")
+ private int maxPoolSize = 10;
+
+ @XmlElement(name="blocking-timeout-millis")
+ private long blockingTimeout = 30000;
+
+ @XmlElement(name="idle-timeout-minutes")
+ private int idleTimeout = 30;
+
+ @XmlElement(name="prefill")
+ private Boolean prefill = Boolean.FALSE;
+
+ @XmlElement(name="background-validation")
+ private boolean backgroundValidation;
+
+ @XmlElement(name="background-validation-millis")
+ private long backgroundValidationMillis;
+
+ @XmlElement(name="validate-on-match")
+ private boolean validateOnMatch = true;
+
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="use-strict-min")
+ private Boolean useStrictMin = Boolean.FALSE;
+
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="no-tx-separate-pools")
+ private Boolean noTxSeparatePools = Boolean.FALSE;
+
+ @XmlElement(name="statistics-formatter")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String statisticsFormatter = "org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter";
+
+ @XmlElement(name="isSameRM-override-value")
+ private Boolean isSameRMOverrideValue = Boolean.FALSE;
+
+ // is always true now and left here for the xml binding
+ @Deprecated
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="track-connection-by-tx")
+ private Boolean trackConnectionByTransaction;
+
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="interleaving")
+ private Boolean interleaving;
+
+ /** The transactionSupportMetaData */
+ @XmlTransient
+ private ManagedConnectionFactoryTransactionSupportMetaData transactionSupportMetaData = ManagedConnectionFactoryTransactionSupportMetaData.NONE;
+
+ /** The managedConnectionFactoryProperties */
+ @XmlElement(name="config-property")
+ private List<ManagedConnectionFactoryPropertyMetaData> managedConnectionFactoryProperties = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
+
+ /** The securityMetaData */
+ @XmlElements({@XmlElement(name="security-domain", type=SecurityDomainMetaData.class), @XmlElement(name="security-domain-and-application",type=SecurityDomainApplicationManagedMetaData.class), @XmlElement(name="application-managed-security",type=ApplicationManagedSecurityMetaData.class)})
+ private SecurityMetaData securityMetaData;
+
+ @XmlElement(name="depends")
+ private List<String> dependsNames = new ArrayList<String>();
+
+ @XmlTransient
+ private List<ServiceMetaData> dependsServices = new ArrayList<ServiceMetaData>();
+
+ @XmlElement(name="metadata")
+ private DBMSMetaData dbmsMetaData;
+
+ // todo: this should be wrapped into <metadata> element
+ @XmlElement(name="type-mapping")
+ String typeMapping;
+
+ /** The localTransactions */
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="local-transaction")
+ private Boolean localTransactions = Boolean.FALSE;
+
+ public ManagedConnectionFactoryDeploymentMetaData()
+ {
+ this.interleaving = Boolean.FALSE;
+ }
+
+ /**
+ * Get the connectionDefinition.
+ *
+ * @return the connectionDefinition.
+ */
+ @ManagementProperty(name="connection-definition",
+ includeInTemplate=true)
+ public String getConnectionDefinition()
+ {
+ return connectionDefinition;
+ }
+
+ /**
+ * Set the connectionDefinition.
+ *
+ * @param connectionDefinition The connectionDefinition to set.
+ */
+ public void setConnectionDefinition(String connectionDefinition)
+ {
+ this.connectionDefinition = connectionDefinition;
+ }
+
+ /**
+ * Get the jndiName. This is the id for the DataSource ManagedObject.
+ *
+ * @return the jndiName.
+ */
+ @ManagementProperty(name="jndi-name",
+ description="The global JNDI name to bind the factory under",
+ includeInTemplate=true)
+ @ManagementObjectID(type="DataSource")
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+
+ /**
+ * Set the jndiName.
+ *
+ * @param jndiName The jndiName to set.
+ */
+ public void setJndiName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+ /**
+ * Get the transactionSupportMetaData.
+ *
+ * @return the transactionSupportMetaData.
+ */
+ @ManagementProperty(ignored=true)
+ public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
+ {
+ return transactionSupportMetaData;
+ }
+
+ /**
+ * Set the transactionSupportMetaData.
+ *
+ * @param transactionSupportMetaData The transactionSupportMetaData to set.
+ */
+ public void setTransactionSupportMetaData(ManagedConnectionFactoryTransactionSupportMetaData transactionSupportMetaData)
+ {
+ this.transactionSupportMetaData = transactionSupportMetaData;
+ }
+
+ /**
+ * Get the useJavaContext.
+ *
+ * @return the useJavaContext.
+ */
+ @ManagementProperty(name="use-java-context",
+ description="Should the jndi name be bound under the java: context",
+ includeInTemplate=true)
+ public boolean isUseJavaContext()
+ {
+ return useJavaContext;
+ }
+
+ /**
+ * Set the useJavaContext.
+ *
+ * @param useJavaContext The useJavaContext to set.
+ */
+ public void setUseJavaContext(boolean useJavaContext)
+ {
+ this.useJavaContext = useJavaContext;
+ }
+
+ /**
+ * Get the managedConnectionFactoryProperties.
+ *
+ * @return the managedConnectionFactoryProperties.
+ */
+ @ManagementProperty(name="config-property", managed=true, includeInTemplate=true,
+ propertyFactory= ConnectionFactoryProperty.class)
+ public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
+ {
+ return managedConnectionFactoryProperties;
+ }
+
+ /**
+ * Set the managedConnectionFactoryProperties.
+ *
+ * @param managedConnectionFactoryProperties The managedConnectionFactoryProperties to set.
+ */
+ public void setManagedConnectionFactoryProperties(
+ List<ManagedConnectionFactoryPropertyMetaData> managedConnectionFactoryProperties)
+ {
+ this.managedConnectionFactoryProperties = managedConnectionFactoryProperties;
+ }
+
+ /**
+ * Get the rarName.
+ *
+ * @return the rarName.
+ */
+ @ManagementProperty(name="rar-name")
+ public String getRarName()
+ {
+ return rarName;
+ }
+
+ /**
+ * Set the rarName.
+ *
+ * @param rarName The rarName to set.
+ */
+ public void setRarName(String rarName)
+ {
+ this.rarName = rarName;
+ }
+
+ /**
+ * Get the securityMetaData.
+ *
+ * @return the securityMetaData.
+ */
+ @ManagementProperty(name="security-domain", managed=true, includeInTemplate=true)
+ public SecurityMetaData getSecurityMetaData()
+ {
+ return securityMetaData;
+ }
+
+ /**
+ * Set the securityMetaData.
+ *
+ * @param securityMetaData The securityMetaData to set.
+ */
+ public void setSecurityMetaData(SecurityMetaData securityMetaData)
+ {
+ this.securityMetaData = securityMetaData;
+ }
+
+
+ /**
+ * Get the typeMapping.
+ *
+ * @return the typeMapping.
+ */
+ @ManagementProperty(name="type-mapping", includeInTemplate=true)
+ public String getTypeMapping()
+ {
+ return typeMapping;
+ }
+
+ /**
+ * Set the typeMapping.
+ *
+ * @param typeMapping The typeMapping to set.
+ */
+ public void setTypeMapping(String typeMapping)
+ {
+ this.typeMapping = typeMapping;
+ }
+
+ /**
+ * Get the jmxInvokerName.
+ *
+ * @return the jmxInvokerName.
+ */
+ @ManagementProperty(name="jmx-invoker-name")
+ @ManagementObjectRef(type="JMXInvoker")
+ public String getJmxInvokerName()
+ {
+ return jmxInvokerName;
+ }
+
+ /**
+ * Set the jmxInvokerName.
+ *
+ * @param jmxInvokerName The jmxInvokerName to set.
+ */
+ public void setJmxInvokerName(String jmxInvokerName)
+ {
+ this.jmxInvokerName = jmxInvokerName;
+ }
+
+ /**
+ * Get the dependsNames.
+ *
+ * @return the dependsNames.
+ */
+ @ManagementProperty(name="depends", ignored=true)
+ public List<String> getDependsNames()
+ {
+ return dependsNames;
+ }
+
+ /**
+ * Set the dependsNames.
+ *
+ * @param dependsNames The dependsNames to set.
+ */
+ public void setDependsNames(List<String> dependsNames)
+ {
+ this.dependsNames = dependsNames;
+ }
+
+ /**
+ * Get the dependsServices.
+ *
+ * @return the dependsServices.
+ */
+ @ManagementProperty(name="services", ignored=true)
+ public List<ServiceMetaData> getDependsServices()
+ {
+ return dependsServices;
+ }
+
+ /**
+ * Set the dependsServices.
+ *
+ * @param dependsServices The dependsServices to set.
+ */
+ public void setDependsServices(List<ServiceMetaData> dependsServices)
+ {
+ this.dependsServices = dependsServices;
+ }
+
+ @ManagementProperty(name="min-pool-size", includeInTemplate=true)
+ public void setMinSize(int minSize)
+ {
+ this.minSize = minSize;
+ }
+
+ public int getMinSize()
+ {
+ return this.minSize;
+
+ }
+
+ @ManagementProperty(name="max-pool-size", includeInTemplate=true)
+ public void setMaxSize(int maxSize)
+ {
+ this.maxPoolSize = maxSize;
+ }
+
+ public int getMaxSize()
+ {
+ if (this.maxPoolSize >= this.minSize)
+ {
+ return this.maxPoolSize;
+ } else {
+ return this.minSize;
+ }
+
+ }
+
+ @ManagementProperty(name="blocking-timeout-millis", includeInTemplate=true)
+ public void setBlockingTimeoutMilliSeconds(long blockTimeout)
+ {
+ this.blockingTimeout = blockTimeout;
+
+ }
+
+ public long getBlockingTimeoutMilliSeconds()
+ {
+ return this.blockingTimeout;
+
+ }
+
+ @ManagementProperty(name="idle-timeout-minutes", includeInTemplate=true)
+ public void setIdleTimeoutMinutes(int idleTimeout)
+ {
+ this.idleTimeout = idleTimeout;
+ }
+
+ public int getIdleTimeoutMinutes()
+ {
+ return this.idleTimeout;
+
+ }
+
+ @ManagementProperty(name="prefill", includeInTemplate=true)
+ public void setPrefill(Boolean prefill)
+ {
+ this.prefill = prefill;
+ }
+
+ public Boolean getPrefill()
+ {
+ return this.prefill;
+ }
+
+ @ManagementProperty(name="background-validation", includeInTemplate=true)
+ public boolean isBackgroundValidation()
+ {
+ return backgroundValidation;
+ }
+
+ public void setBackgroundValidation(boolean backgroundValidation)
+ {
+ this.backgroundValidation = backgroundValidation;
+ }
+
+ public void setBackgroundValidationMillis(long interval)
+ {
+ this.backgroundValidationMillis = interval;
+ }
+
+ @ManagementProperty(name="background-validation-millis", includeInTemplate=true)
+ public long getBackgroundValidationMillis()
+ {
+ return this.backgroundValidationMillis;
+ }
+
+ public void setValidateOnMatch(boolean validateOnMatch)
+ {
+ this.validateOnMatch = validateOnMatch;
+ }
+
+ @ManagementProperty(name="validate-on-match", includeInTemplate=true)
+ public boolean isValidateOnMatch()
+ {
+ return this.validateOnMatch;
+
+ }
+
+ @ManagementProperty(name="isSameRM-override-value", includeInTemplate=true)
+ public Boolean getIsSameRMOverrideValue()
+ {
+ return isSameRMOverrideValue;
+ }
+
+ public void setIsSameRMOverrideValue(Boolean isSameRMOverrideValue)
+ {
+ this.isSameRMOverrideValue = isSameRMOverrideValue;
+ }
+
+ @Deprecated
+ @ManagementProperty(name="track-connection-by-tx", includeInTemplate=true)
+ public Boolean getTrackConnectionByTransaction()
+ {
+ return !isInterleaving();
+ }
+
+ @Deprecated
+ public void setTrackConnectionByTransaction(Boolean trackConnectionByTransaction)
+ {
+ if(Boolean.TRUE == getLocalTransactions() && !Boolean.TRUE.equals(trackConnectionByTransaction))
+ throw new IllegalStateException("In case of local transactions track-connection-by-tx must always be true");
+ setInterleaving(!Boolean.TRUE.equals(trackConnectionByTransaction));
+ }
+
+ @ManagementProperty(name="interleaving", includeInTemplate=true)
+ public Boolean isInterleaving()
+ {
+ return interleaving == Boolean.TRUE && !Boolean.TRUE.equals(getLocalTransactions());
+ }
+
+ public void setInterleaving(Boolean interleaving)
+ {
+ this.interleaving = interleaving;
+ }
+
+ @ManagementProperty(name="local-transaction", use={ViewUse.RUNTIME})
+ public Boolean getLocalTransactions()
+ {
+ return localTransactions;
+ }
+
+ public void setLocalTransactions(Boolean localTransactions)
+ {
+ this.localTransactions = localTransactions;
+ }
+
+ @ManagementProperty(name="use-strict-min", includeInTemplate=true)
+ public Boolean getUseStrictMin()
+ {
+ return useStrictMin;
+ }
+
+ public void setUseStrictMin(Boolean useStrictMin)
+ {
+ this.useStrictMin = useStrictMin;
+ }
+
+ @ManagementProperty(name="statistics-formatter", includeInTemplate=true)
+ public String getStatisticsFormatter()
+ {
+ return statisticsFormatter;
+ }
+
+ public void setStatisticsFormatter(String statisticsFormatter)
+ {
+ this.statisticsFormatter = statisticsFormatter;
+ }
+
+ @ManagementProperty(name="no-tx-separate-pools", includeInTemplate=true)
+ public Boolean getNoTxSeparatePools()
+ {
+ return this.noTxSeparatePools;
+ }
+
+ public void setNoTxSeparatePools(Boolean notxpool)
+ {
+ this.noTxSeparatePools = notxpool;
+ }
+
+ @ManagementProperty(name="metadata", includeInTemplate=true)
+ public DBMSMetaData getDBMSMetaData()
+ {
+ return dbmsMetaData;
+ }
+
+ public void setDBMSMetaData(DBMSMetaData dbmsMetaData)
+ {
+ this.dbmsMetaData = dbmsMetaData;
+ }
+
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,15 +19,15 @@
* 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.resource.metadata.mcf;
-
-/**
- * A ManagedConnectionFactoryTransactionSupportMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public enum ManagedConnectionFactoryTransactionSupportMetaData
-{
- NONE, LOCAL, XA;
-}
+package org.jboss.resource.metadata.mcf;
+
+/**
+ * A ManagedConnectionFactoryTransactionSupportMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public enum ManagedConnectionFactoryTransactionSupportMetaData
+{
+ NONE, LOCAL, XA;
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java 2008-09-10 05:00:28 UTC (rev 78311)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java 2008-09-10 06:03:51 UTC (rev 78312)
@@ -19,61 +19,61 @@
* 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.resource.metadata.mcf;
-
-import java.io.Serializable;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlValue;
+package org.jboss.resource.metadata.mcf;
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlValue;
+
import org.jboss.managed.api.annotation.ManagementObject;
import org.jboss.managed.api.annotation.ManagementProperty;
-
-/**
- * A SecurityMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
+
+/**
+ * A SecurityMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
@XmlAccessorType(XmlAccessType.NONE)
- at ManagementObject(description="The security domain, type information")
-public class SecurityMetaData implements Serializable, SecurityMetaDataSupport
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = 8939054836116025885L;
-
- @XmlValue
- private String domain;
-
- protected SecurityDeploymentType type;
-
-
- public SecurityMetaData()
- {
- type = SecurityDeploymentType.NONE;
-
- }
-
- public boolean requiresDomain()
- {
- return (getSecurityDeploymentType().equals(SecurityDeploymentType.DOMAIN)
- || getSecurityDeploymentType().equals(SecurityDeploymentType.DOMAIN_AND_APPLICATION));
- }
+ at ManagementObject(description="The security domain, type information")
+public class SecurityMetaData implements Serializable, SecurityMetaDataSupport
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 8939054836116025885L;
+
+ @XmlValue
+ private String domain;
+
+ protected SecurityDeploymentType type;
+
+
+ public SecurityMetaData()
+ {
+ type = SecurityDeploymentType.NONE;
+
+ }
+
+ public boolean requiresDomain()
+ {
+ return (getSecurityDeploymentType().equals(SecurityDeploymentType.DOMAIN)
+ || getSecurityDeploymentType().equals(SecurityDeploymentType.DOMAIN_AND_APPLICATION));
+ }
- @ManagementProperty
- public String getDomain()
- {
- return domain;
+ @ManagementProperty
+ public String getDomain()
+ {
+ return domain;
}
public void setDomain(String domain)
{
this.domain = domain;
- }
-
+ }
+
@ManagementProperty
- public SecurityDeploymentType getSecurityDeploymentType()
- {
- return type;
+ public SecurityDeploymentType getSecurityDeploymentType()
+ {
+ return type;
}
-}
+}
More information about the jboss-cvs-commits
mailing list