JBoss Community

Re: JBoss 6.0: ignore persistence.xml in jar file

created by Gonne Martens in JBoss Microcontainer - View the full discussion

Hi Ales,

 

thank you for your response.

According to your advice I tried to add the META-INF/jboss-ignore.txt to the actual lib. It was properly parsed by the AbstractIgnoreFilesDeployer and the NameIgnoreMechanism was registered in the DeploymentUnit.

 

AbstractParsingDeployerWithOutput<T>: createMetaData()

...

unit.getTransientManagedObjects().addAttachment(key, result, getOutput());

...

But in the ignoreFile() method of AbstractVFSParsingDeployer<T> the DummyNameIgnoreMechanism is always used.

It seems that the nameIgnoreMechanism attribute is not set properly even though the correct one is registered in the DeploymentUnit as transientManagedObject "org.jboss.deployers.spi.deployer.matchers.NameIgnoreMechanism".

 

I overrided the nameIgnoreMechanism attribute in the debugger with the correct value and it worked as exprected.

 

setNameIgnoreMechanism((org.jboss.deployers.spi.deployer.matchers.NameIgnoreMechanism)unit.getTransientManagedObjects().getAttachment("org.jboss.deployers.spi.deployer.matchers.NameIgnoreMechanism"))

But I do not know where it should be fixed.

 

Kind regards,

Gonne

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community