[jboss-cvs] JBossAS SVN: r81055 - in trunk/hibernate-int: src/main/org/jboss/hibernate/deployers and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Nov 14 10:03:36 EST 2008
Author: dimitris at jboss.org
Date: 2008-11-14 10:03:36 -0500 (Fri, 14 Nov 2008)
New Revision: 81055
Modified:
trunk/hibernate-int/pom.xml
trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/HibernateDeployer.java
trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseElement.java
trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseNamedElement.java
trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/HibernateMetaData.java
trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/SessionFactoryMetaData.java
trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/HibernateMappingVisitor.java
trunk/hibernate-int/src/resources/hibernate-deployer-jboss-beans.xml
Log:
fix svn properties
Property changes on: trunk/hibernate-int/pom.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/HibernateDeployer.java
===================================================================
--- trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/HibernateDeployer.java 2008-11-14 15:02:54 UTC (rev 81054)
+++ trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/HibernateDeployer.java 2008-11-14 15:03:36 UTC (rev 81055)
@@ -1,76 +1,76 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.hibernate.deployers;
-
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.hibernate.deployers.metadata.HibernateMetaData;
-import org.jboss.hibernate.deployers.metadata.SessionFactoryMetaData;
-
-/**
- * Hibernate deployer.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class HibernateDeployer extends AbstractSimpleRealDeployer<HibernateMetaData>
-{
- private boolean scanFromTop;
-
- public HibernateDeployer()
- {
- super(HibernateMetaData.class);
- setOutput(BeanMetaData.class);
- }
-
- public void deploy(DeploymentUnit unit, HibernateMetaData metaData) throws DeploymentException
- {
- if (unit instanceof VFSDeploymentUnit == false)
- return;
-
- SessionFactoryMetaData sessionFactoryMetaData = metaData.getSessionFactory();
- if (sessionFactoryMetaData == null)
- return;
-
- VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
- if (scanFromTop)
- vfsUnit = vfsUnit.getTopLevel();
-
- // build the hibernate bean
- BeanMetaData beanMetaData = sessionFactoryMetaData.getBeanMetaData(vfsUnit.getRoot());
- vfsUnit.addAttachment(BeanMetaData.class + "$Hibernate", beanMetaData);
- log.info("Created Hibernate bean: " + beanMetaData);
- }
-
- /**
- * Do we scan for mapping from the top,
- * or from this deployment unit.
- *
- * @param scanFromTop true if we're scanning from the top
- */
- public void setScanFromTop(boolean scanFromTop)
- {
- this.scanFromTop = scanFromTop;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.hibernate.deployers;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.hibernate.deployers.metadata.HibernateMetaData;
+import org.jboss.hibernate.deployers.metadata.SessionFactoryMetaData;
+
+/**
+ * Hibernate deployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class HibernateDeployer extends AbstractSimpleRealDeployer<HibernateMetaData>
+{
+ private boolean scanFromTop;
+
+ public HibernateDeployer()
+ {
+ super(HibernateMetaData.class);
+ setOutput(BeanMetaData.class);
+ }
+
+ public void deploy(DeploymentUnit unit, HibernateMetaData metaData) throws DeploymentException
+ {
+ if (unit instanceof VFSDeploymentUnit == false)
+ return;
+
+ SessionFactoryMetaData sessionFactoryMetaData = metaData.getSessionFactory();
+ if (sessionFactoryMetaData == null)
+ return;
+
+ VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
+ if (scanFromTop)
+ vfsUnit = vfsUnit.getTopLevel();
+
+ // build the hibernate bean
+ BeanMetaData beanMetaData = sessionFactoryMetaData.getBeanMetaData(vfsUnit.getRoot());
+ vfsUnit.addAttachment(BeanMetaData.class + "$Hibernate", beanMetaData);
+ log.info("Created Hibernate bean: " + beanMetaData);
+ }
+
+ /**
+ * Do we scan for mapping from the top,
+ * or from this deployment unit.
+ *
+ * @param scanFromTop true if we're scanning from the top
+ */
+ public void setScanFromTop(boolean scanFromTop)
+ {
+ this.scanFromTop = scanFromTop;
+ }
+}
Property changes on: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/HibernateDeployer.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseElement.java
===================================================================
--- trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseElement.java 2008-11-14 15:02:54 UTC (rev 81054)
+++ trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseElement.java 2008-11-14 15:03:36 UTC (rev 81055)
@@ -1,50 +1,50 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.hibernate.deployers.metadata;
-
-import java.io.Serializable;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-
-/**
- * Simple name element.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
- at XmlType(name = "baseType")
-public class BaseElement implements Serializable
-{
- private static final long serialVersionUID = 1;
-
- private Object value;
-
- public Object getValue()
- {
- return value;
- }
-
- @XmlValue
- public void setValue(Object value)
- {
- this.value = value;
- }
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.hibernate.deployers.metadata;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * Simple name element.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at XmlType(name = "baseType")
+public class BaseElement implements Serializable
+{
+ private static final long serialVersionUID = 1;
+
+ private Object value;
+
+ public Object getValue()
+ {
+ return value;
+ }
+
+ @XmlValue
+ public void setValue(Object value)
+ {
+ this.value = value;
+ }
}
\ No newline at end of file
Property changes on: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseElement.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseNamedElement.java
===================================================================
--- trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseNamedElement.java 2008-11-14 15:02:54 UTC (rev 81054)
+++ trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseNamedElement.java 2008-11-14 15:03:36 UTC (rev 81055)
@@ -1,49 +1,49 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.hibernate.deployers.metadata;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * Simple name element.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
- at XmlType(name = "namedType")
-public class BaseNamedElement extends BaseElement
-{
- private static final long serialVersionUID = 1;
-
- private String name;
-
- public String getName()
- {
- return name;
- }
-
- @XmlAttribute
- public void setName(String name)
- {
- this.name = name;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.hibernate.deployers.metadata;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Simple name element.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at XmlType(name = "namedType")
+public class BaseNamedElement extends BaseElement
+{
+ private static final long serialVersionUID = 1;
+
+ private String name;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @XmlAttribute
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Property changes on: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/BaseNamedElement.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/HibernateMetaData.java
===================================================================
--- trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/HibernateMetaData.java 2008-11-14 15:02:54 UTC (rev 81054)
+++ trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/HibernateMetaData.java 2008-11-14 15:03:36 UTC (rev 81055)
@@ -1,70 +1,70 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.hibernate.deployers.metadata;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.List;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.xb.annotations.JBossXmlSchema;
-
-/**
- * Hibernate metadata.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
- at JBossXmlSchema(namespace="urn:jboss:hibernate-deployer:1.0", elementFormDefault=XmlNsForm.QUALIFIED, replacePropertyRefs=false)
- at XmlRootElement(name="hibernate-configuration")
- at XmlType(name="hibernateConfigurationType", propOrder={"sessionFactory"})
-public class HibernateMetaData implements Serializable, BeanMetaDataFactory
-{
- private static final long serialVersionUID = 1;
-
- private SessionFactoryMetaData sessionFactory;
-
- public SessionFactoryMetaData getSessionFactory()
- {
- return sessionFactory;
- }
-
- @XmlElement(name = "session-factory")
- public void setSessionFactory(SessionFactoryMetaData sessionFactory)
- {
- this.sessionFactory = sessionFactory;
- }
-
- @XmlTransient
- public List<BeanMetaData> getBeans()
- {
- if (sessionFactory != null)
- return Collections.singletonList(sessionFactory.getBeanMetaData());
- else
- return Collections.emptyList();
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.hibernate.deployers.metadata;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * Hibernate metadata.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at JBossXmlSchema(namespace="urn:jboss:hibernate-deployer:1.0", elementFormDefault=XmlNsForm.QUALIFIED, replacePropertyRefs=false)
+ at XmlRootElement(name="hibernate-configuration")
+ at XmlType(name="hibernateConfigurationType", propOrder={"sessionFactory"})
+public class HibernateMetaData implements Serializable, BeanMetaDataFactory
+{
+ private static final long serialVersionUID = 1;
+
+ private SessionFactoryMetaData sessionFactory;
+
+ public SessionFactoryMetaData getSessionFactory()
+ {
+ return sessionFactory;
+ }
+
+ @XmlElement(name = "session-factory")
+ public void setSessionFactory(SessionFactoryMetaData sessionFactory)
+ {
+ this.sessionFactory = sessionFactory;
+ }
+
+ @XmlTransient
+ public List<BeanMetaData> getBeans()
+ {
+ if (sessionFactory != null)
+ return Collections.singletonList(sessionFactory.getBeanMetaData());
+ else
+ return Collections.emptyList();
+ }
+}
Property changes on: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/HibernateMetaData.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/SessionFactoryMetaData.java
===================================================================
--- trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/SessionFactoryMetaData.java 2008-11-14 15:02:54 UTC (rev 81054)
+++ trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/SessionFactoryMetaData.java 2008-11-14 15:03:36 UTC (rev 81055)
@@ -1,138 +1,138 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.hibernate.deployers.metadata;
-
-import java.io.Serializable;
-import java.util.Set;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
-import org.jboss.hibernate.jmx.Hibernate;
-import org.jboss.util.id.GUID;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * Hibernate session factory metadata.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
- at XmlRootElement(name="session-factory")
- at XmlType(name="sessionFactoryType", propOrder={"properties", "depends"})
-public class SessionFactoryMetaData implements Serializable
-{
- private static final long serialVersionUID = 1;
-
- private String name;
- private String bean;
- private Set<BaseNamedElement> properties;
- private Set<BaseElement> depends;
-
- public SessionFactoryMetaData()
- {
- }
-
- @XmlTransient
- protected String getBeanName()
- {
- return bean != null ? bean : GUID.asString() + "$Hibernate";
- }
-
- @XmlTransient
- public BeanMetaData getBeanMetaData()
- {
- return getBeanMetaData(null);
- }
-
- /**
- * Create the BeanMetaData for Hibernate bean.
- *
- * @param root the root to scan from
- * @return bean meta data
- */
- public BeanMetaData getBeanMetaData(VirtualFile root)
- {
- BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(getBeanName(), Hibernate.class.getName());
- if (root != null)
- builder.addConstructorParameter(VirtualFile.class.getName(), root);
- builder.addPropertyMetaData("sessionFactoryName", getName());
- if (properties != null && properties.isEmpty() == false)
- {
- for (BaseNamedElement bne : properties)
- builder.addPropertyMetaData(bne.getName(), bne.getValue());
- }
- if (depends != null && depends.isEmpty() == false)
- {
- for (BaseElement bne : depends)
- builder.addDependency(bne.getValue());
- }
- return builder.getBeanMetaData();
- }
-
- public String getName()
- {
- return name;
- }
-
- @XmlAttribute(required = true)
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getBean()
- {
- return bean;
- }
-
- @XmlAttribute
- public void setBean(String bean)
- {
- this.bean = bean;
- }
-
- public Set<BaseNamedElement> getProperties()
- {
- return properties;
- }
-
- @XmlElement(name="property")
- public void setProperties(Set<BaseNamedElement> properties)
- {
- this.properties = properties;
- }
-
- public Set<BaseElement> getDepends()
- {
- return depends;
- }
-
- @XmlElement(name="depends")
- public void setDepends(Set<BaseElement> depends)
- {
- this.depends = depends;
- }
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.hibernate.deployers.metadata;
+
+import java.io.Serializable;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.hibernate.jmx.Hibernate;
+import org.jboss.util.id.GUID;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Hibernate session factory metadata.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+ at XmlRootElement(name="session-factory")
+ at XmlType(name="sessionFactoryType", propOrder={"properties", "depends"})
+public class SessionFactoryMetaData implements Serializable
+{
+ private static final long serialVersionUID = 1;
+
+ private String name;
+ private String bean;
+ private Set<BaseNamedElement> properties;
+ private Set<BaseElement> depends;
+
+ public SessionFactoryMetaData()
+ {
+ }
+
+ @XmlTransient
+ protected String getBeanName()
+ {
+ return bean != null ? bean : GUID.asString() + "$Hibernate";
+ }
+
+ @XmlTransient
+ public BeanMetaData getBeanMetaData()
+ {
+ return getBeanMetaData(null);
+ }
+
+ /**
+ * Create the BeanMetaData for Hibernate bean.
+ *
+ * @param root the root to scan from
+ * @return bean meta data
+ */
+ public BeanMetaData getBeanMetaData(VirtualFile root)
+ {
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(getBeanName(), Hibernate.class.getName());
+ if (root != null)
+ builder.addConstructorParameter(VirtualFile.class.getName(), root);
+ builder.addPropertyMetaData("sessionFactoryName", getName());
+ if (properties != null && properties.isEmpty() == false)
+ {
+ for (BaseNamedElement bne : properties)
+ builder.addPropertyMetaData(bne.getName(), bne.getValue());
+ }
+ if (depends != null && depends.isEmpty() == false)
+ {
+ for (BaseElement bne : depends)
+ builder.addDependency(bne.getValue());
+ }
+ return builder.getBeanMetaData();
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getBean()
+ {
+ return bean;
+ }
+
+ @XmlAttribute
+ public void setBean(String bean)
+ {
+ this.bean = bean;
+ }
+
+ public Set<BaseNamedElement> getProperties()
+ {
+ return properties;
+ }
+
+ @XmlElement(name="property")
+ public void setProperties(Set<BaseNamedElement> properties)
+ {
+ this.properties = properties;
+ }
+
+ public Set<BaseElement> getDepends()
+ {
+ return depends;
+ }
+
+ @XmlElement(name="depends")
+ public void setDepends(Set<BaseElement> depends)
+ {
+ this.depends = depends;
+ }
}
\ No newline at end of file
Property changes on: trunk/hibernate-int/src/main/org/jboss/hibernate/deployers/metadata/SessionFactoryMetaData.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/HibernateMappingVisitor.java
===================================================================
--- trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/HibernateMappingVisitor.java 2008-11-14 15:02:54 UTC (rev 81054)
+++ trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/HibernateMappingVisitor.java 2008-11-14 15:03:36 UTC (rev 81055)
@@ -1,88 +1,88 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.hibernate.jmx;
-
-import java.net.URL;
-import java.util.Set;
-import java.util.HashSet;
-
-import org.jboss.virtual.VirtualFile;
-import org.jboss.virtual.VirtualFileVisitor;
-import org.jboss.virtual.VisitorAttributes;
-
-/**
- * Mapping visitor, matching .hbm.xml files.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public class HibernateMappingVisitor implements VirtualFileVisitor
-{
- private Set<URL> urls = new HashSet<URL>();
-
- public Set<URL> getUrls()
- {
- return urls;
- }
-
- private static class MappingVisitorAttributes extends VisitorAttributes
- {
- public MappingVisitorAttributes()
- {
- setIgnoreErrors(true);
- setIncludeHidden(false);
- setIncludeRoot(false);
- setLeavesOnly(false);
- setRecurseFilter(RECURSE_ALL);
- }
- }
-
- private static final VisitorAttributes MAPPING_ATTRIBUTES = new MappingVisitorAttributes();
-
- public VisitorAttributes getAttributes()
- {
- return MAPPING_ATTRIBUTES;
- }
-
- public void visit(VirtualFile vf)
- {
- try
- {
- if (isMapping(vf))
- urls.add(vf.toURL());
- }
- catch (Exception e)
- {
- throw new RuntimeException("Visit failed: " + e);
- }
- }
-
- /**
- * Is virtual file a mapping file.
- *
- * @param vf the virtual file
- * @return true if virtual file is mapping
- */
- protected boolean isMapping(VirtualFile vf)
- {
- return vf.getName().indexOf(".hbm.xml") > 0;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.hibernate.jmx;
+
+import java.net.URL;
+import java.util.Set;
+import java.util.HashSet;
+
+import org.jboss.virtual.VirtualFile;
+import org.jboss.virtual.VirtualFileVisitor;
+import org.jboss.virtual.VisitorAttributes;
+
+/**
+ * Mapping visitor, matching .hbm.xml files.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class HibernateMappingVisitor implements VirtualFileVisitor
+{
+ private Set<URL> urls = new HashSet<URL>();
+
+ public Set<URL> getUrls()
+ {
+ return urls;
+ }
+
+ private static class MappingVisitorAttributes extends VisitorAttributes
+ {
+ public MappingVisitorAttributes()
+ {
+ setIgnoreErrors(true);
+ setIncludeHidden(false);
+ setIncludeRoot(false);
+ setLeavesOnly(false);
+ setRecurseFilter(RECURSE_ALL);
+ }
+ }
+
+ private static final VisitorAttributes MAPPING_ATTRIBUTES = new MappingVisitorAttributes();
+
+ public VisitorAttributes getAttributes()
+ {
+ return MAPPING_ATTRIBUTES;
+ }
+
+ public void visit(VirtualFile vf)
+ {
+ try
+ {
+ if (isMapping(vf))
+ urls.add(vf.toURL());
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Visit failed: " + e);
+ }
+ }
+
+ /**
+ * Is virtual file a mapping file.
+ *
+ * @param vf the virtual file
+ * @return true if virtual file is mapping
+ */
+ protected boolean isMapping(VirtualFile vf)
+ {
+ return vf.getName().indexOf(".hbm.xml") > 0;
+ }
+}
Property changes on: trunk/hibernate-int/src/main/org/jboss/hibernate/jmx/HibernateMappingVisitor.java
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/hibernate-int/src/resources/hibernate-deployer-jboss-beans.xml
===================================================================
--- trunk/hibernate-int/src/resources/hibernate-deployer-jboss-beans.xml 2008-11-14 15:02:54 UTC (rev 81054)
+++ trunk/hibernate-int/src/resources/hibernate-deployer-jboss-beans.xml 2008-11-14 15:03:36 UTC (rev 81055)
@@ -1,26 +1,26 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Hibernate deployer beans.
--->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
-<!--
- <jbossxb-parser xmlns="urn:jboss:deployers:2.0"
- name="HibernateParser"
- class="org.jboss.hibernate.deployers.metadata.HibernateMetaData"
- registerWithJBossXB="true"
- suffix="-hibernate.xml"/>
--->
-
- <bean name="HibernateParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
- <constructor>
- <parameter>org.jboss.hibernate.deployers.metadata.HibernateMetaData</parameter>
- </constructor>
- <property name="suffix">-hibernate.xml</property>
- <property name="registerWithJBossXB">true</property>
- </bean>
-
- <bean name="HibernateDeployer" class="org.jboss.hibernate.deployers.HibernateDeployer"/>
-
-</deployment>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Hibernate deployer beans.
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+<!--
+ <jbossxb-parser xmlns="urn:jboss:deployers:2.0"
+ name="HibernateParser"
+ class="org.jboss.hibernate.deployers.metadata.HibernateMetaData"
+ registerWithJBossXB="true"
+ suffix="-hibernate.xml"/>
+-->
+
+ <bean name="HibernateParser" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
+ <constructor>
+ <parameter>org.jboss.hibernate.deployers.metadata.HibernateMetaData</parameter>
+ </constructor>
+ <property name="suffix">-hibernate.xml</property>
+ <property name="registerWithJBossXB">true</property>
+ </bean>
+
+ <bean name="HibernateDeployer" class="org.jboss.hibernate.deployers.HibernateDeployer"/>
+
+</deployment>
Property changes on: trunk/hibernate-int/src/resources/hibernate-deployer-jboss-beans.xml
___________________________________________________________________
Name: svn:eol-style
+ native
More information about the jboss-cvs-commits
mailing list