[jboss-user] [JBoss Microcontainer Users] - Re: Running a deployer on resource in classpath
That should be simple - extend AbstractSimpleVFSRealDeployer. And use its VFSDeploymentUnit to find the resource you're looking for. If it exists, do whatever ... View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268136#4268136 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268136 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Microcontainer Users] - Re: Running a deployer on resource in classpath
I extended the my deployer using the AbstractSimpleVFSRealDeployer as below | public class SystemVDBDeployer extends AbstractSimpleVFSRealDeployer { | | public SystemVDBDeployer() { | super(SystemVDBMetadata.class); | } | | @Override | public void deploy(VFSDeploymentUnit unit, SystemVDBMetadata deployment) | throws DeploymentException { | System.out.println("My deployer invoked"); | } | } | added the "-jboss-beans.xml" file to the "deployers" directory, but "deploy" call never invoked by the container. Then I thought there is no "deployment unit" available for this to be invoked, so added "@ManagementDeployment" and "@ManagementObject" annotations to my metadata object "SystemVDBMetadata" class and deployed that object, this object is available as input to the deployer by adding "setInput", still the deployer never invoked. | @ManagementObject | @ManagementDeployment(types = {"vdb"}) | public class SystemVDBMetadata implements Serializable { | } | What I am confused is what will be my deployment unit in this case, as the resource I want to load is inside a JAR in "lib" directory. My intention was use the above code and once I am in the "deploy" call use the technique mentioned above to load resource. Any suggestions as what I may be doing wrong? Thank you. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269840#4269840 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269840 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Microcontainer Users] - Re: Running a deployer on resource in classpath
"rareddy" wrote : | Then I thought there is no "deployment unit" available for this to be invoked, so added "@ManagementDeployment" and "@ManagementObject" annotations to my metadata object "SystemVDBMetadata" class and deployed that object, this object is available as input to the deployer by adding "setInput", still the deployer never invoked. | | | | @ManagementObject | | @ManagementDeployment(types = {"vdb"}) | | public class SystemVDBMetadata implements Serializable { | | } | | | There is no need for this -- this is just for management features, ProfileService etc. "rareddy" wrote : | What I am confused is what will be my deployment unit in this case, as the resource I want to load is inside a JAR in "lib" directory. My intention was use the above code and once I am in the "deploy" call use the technique mentioned above to load resource. | Who creates and attaches this SystemVDBMetadata to DeploymentUnit? Parsing deployers only look into metadata locations. For spec defined deployments these are: * META-INF for .jar and .ear * WEB-INF for .war (see StructureDeployer(s) for more details) So, jar's lib directory won't be checked unless you explicitly configure it. The DeploymentUnit == (Sub)Deployment == .ear or .war or .jar (.jar which is not just lib, but real (sub)deployment) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269866#4269866 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269866 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user