[Design of JBoss Collaboration Server] - Re: JBCS, JBoss 4.0.4 GA and JoinPoint
by Rudi Vankeirsbilck
Well... it definitely responds differently now. Not sure if it's an improvement though ;-)
| 19:14:32,445 INFO [EARDeployer] Init J2EE application: file:/Lab/jboss/v404/server/default/deploy/mail.ear/
| 19:14:36,060 INFO [STDOUT] mail list delivery listener started
| 19:14:36,790 INFO [POP3Protocol] pop3 security domain set to java:/jaas/Mail+SSL
| 19:14:37,567 INFO [EjbModule] Deploying LocalDelivery
| 19:14:37,836 INFO [EjbModule] Deploying RemoteDelivery
| 19:14:37,883 INFO [EjbModule] Deploying ListDelivery
| 19:14:38,379 INFO [JaccHelper] Initialising JACC Context for deployment: mail.par
| 19:14:39,646 INFO [Ejb3Deployment] Found persistence.xml file in EJB3 jar
| 19:14:39,654 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=mail.par
| java.lang.NoSuchMethodError: org.hibernate.ejb.packaging.PersistenceXmlLoader.deploy(Ljava/net/URL;)Lorg/hibernate/ejb/packaging/PersistenceMetadata;
| at org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:407)
| at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:219)
| at org.jboss.ejb3.Ejb3Module.createService(Ejb3Module.java:34)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
|
Has anyone seen that after building and dropping the mail.ear in the deploy dir of an existing JBAS4.0.4GA server?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976112#3976112
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976112
19 years, 3 months
[Design of POJO Server] - Re: Allowing multiple AbstractParsingDeployer to work with t
by scott.stark@jboss.org
I have committed a change that allows propagation of an existing deployment type instance if the AbstractParsingDeployer.allowsReparse() is true. Here is the patch:
| Index: C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java
| ===================================================================
| --- C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java (revision 57411)
| +++ C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java (working copy)
| @@ -61,7 +61,7 @@
| * @return the metadata
| * @throws Exception for any error
| */
| - protected T parse(DeploymentUnit unit, VirtualFile file) throws Exception
| + protected T parse(DeploymentUnit unit, VirtualFile file, T root) throws Exception
| {
| if (file == null)
| throw new IllegalArgumentException("Null file");
| @@ -70,8 +70,7 @@
| Object parsed = null;
| try
| {
| - ObjectModelFactory factory = getObjectModelFactory();
| - Object root = null;
| + ObjectModelFactory factory = getObjectModelFactory(root);
| URL url = file.toURL();
| parsed = unmarshaller.unmarshal(url.toString(), factory, root);
| }
| @@ -90,5 +89,5 @@
| *
| * @return the object model factory
| */
| - protected abstract ObjectModelFactory getObjectModelFactory();
| + protected abstract ObjectModelFactory getObjectModelFactory(T root);
| }
| Index: C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/SchemaResolverDeployer.java
| ===================================================================
| --- C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/SchemaResolverDeployer.java (revision 57411)
| +++ C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/SchemaResolverDeployer.java (working copy)
| @@ -65,7 +65,7 @@
| * @return the metadata
| * @throws Exception for any error
| */
| - protected T parse(DeploymentUnit unit, VirtualFile file) throws Exception
| + protected T parse(DeploymentUnit unit, VirtualFile file, T root) throws Exception
| {
| if (file == null)
| throw new IllegalArgumentException("Null file");
| Index: C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/JAXPDeployer.java
| ===================================================================
| --- C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/JAXPDeployer.java (revision 57411)
| +++ C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/JAXPDeployer.java (working copy)
| @@ -142,7 +142,7 @@
| * @return the metadata
| * @throws Exception for any error
| */
| - protected T parse(DeploymentUnit unit, VirtualFile file) throws Exception
| + protected T parse(DeploymentUnit unit, VirtualFile file, T root) throws Exception
| {
| Document document = doParse(unit, file);
| return parse(unit, file, document);
| Index: C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/AbstractParsingDeployer.java
| ===================================================================
| --- C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/AbstractParsingDeployer.java (revision 57411)
| +++ C:/svn/JBossMC/jbossmc/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/AbstractParsingDeployer.java (working copy)
| @@ -28,7 +28,9 @@
| import org.jboss.virtual.VirtualFile;
|
| /**
| - * AbstractParsingDeployer.
| + * AbstractParsingDeployer. Extends AbstractTypedDeployer to add a notion of obtaining an instance of the
| + * deploymentType by parsing a metadata file. Subclasses need to override
| + * parse(DeploymentUnit, VirtualFile) to define this behavior.
| *
| * @param <T> the expected type
| * @author <a href="adrian(a)jboss.com">Adrian Brock</a>
| @@ -51,8 +53,19 @@
| {
| return PARSER_DEPLOYER;
| }
| -
| +
| /**
| + * A flag indicating whether createMetaData should execute a parse even if a non-null metadata value exists.
| + *
| + * @return false if a parse should be performed only if there is no existing metadata value. True indicates
| + * that parse should be done regardless of an existing metadata value.
| + */
| + protected boolean allowsReparse()
| + {
| + return false;
| + }
| +
| + /**
| * Get some meta data
| *
| * @param unit the deployment unit
| @@ -65,7 +78,7 @@
| }
|
| /**
| - * Create some meta data
| + * Create some meta data. Calls createMetaData(unit, name, suffix, getDeploymentType().getName()).
| *
| * @param unit the deployment unit
| * @param name the name
| @@ -78,7 +91,8 @@
| }
|
| /**
| - * Create some meta data
| + * Create some meta data. Invokes parse(unit, name, suffix) if there is not already a
| + * metadata
| *
| * @param unit the deployment unit
| * @param name the name
| @@ -90,16 +104,16 @@
| {
| // First see whether it already exists
| T result = getMetaData(unit, key);
| - if (result != null)
| + if (result != null && allowsReparse() == false)
| return;
|
| // Create it
| try
| {
| if (suffix == null)
| - result = parse(unit, name);
| + result = parse(unit, name, result);
| else
| - result = parse(unit, name, suffix);
| + result = parse(unit, name, suffix, result);
| }
| catch (Exception e)
| {
| @@ -122,14 +136,14 @@
| * @return the metadata or null if it doesn't exist
| * @throws Exception for any error
| */
| - protected T parse(DeploymentUnit unit, String name) throws Exception
| + protected T parse(DeploymentUnit unit, String name, T root) throws Exception
| {
| // Try to find the metadata
| VirtualFile file = unit.getMetaDataFile(name);
| if (file == null)
| return null;
|
| - T result = parse(unit, file);
| + T result = parse(unit, file, root);
| init(unit, result, file);
| return result;
| }
| @@ -143,7 +157,7 @@
| * @return the metadata or null if it doesn't exist
| * @throws Exception for any error
| */
| - protected T parse(DeploymentUnit unit, String name, String suffix) throws Exception
| + protected T parse(DeploymentUnit unit, String name, String suffix, T root) throws Exception
| {
| // Try to find the metadata
| List<VirtualFile> files = unit.getMetaDataFiles(name, suffix);
| @@ -156,7 +170,7 @@
|
| VirtualFile file = files.get(0);
|
| - T result = parse(unit, file);
| + T result = parse(unit, file, root);
| init(unit, result, file);
| return result;
| }
| @@ -169,7 +183,7 @@
| * @return the metadata
| * @throws Exception for any error
| */
| - protected abstract T parse(DeploymentUnit unit, VirtualFile file) throws Exception;
| + protected abstract T parse(DeploymentUnit unit, VirtualFile file, T root) throws Exception;
|
| /**
| * Initialise the metadata
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976108#3976108
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976108
19 years, 3 months