[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-13 Thread beve
Thanks for you help on this Ales!

Regards,

/Daniel

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4249392#4249392

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4249392
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-06 Thread beve
I've tried this with the ESB and I'm using the following configuration for the 
GroupingStructure:
bean name=GroupingStructure 
class=org.jboss.soa.esb.listeners.deployers.mc.GroupingStructure
  | property name=shortCircuitFilter
  | inject bean=EsbFilter/
  | /property
  | property name=metaDataPaths
  | array elementClass=java.lang.String
  | valueMETA-INF/value
  | value./value
  | /array
  | /property
  | property name=libs
  | set elementClass=java.lang.String
  | value./value
  | valuejars/value
  | /set
  | /property
  | property name=libFilter
  | inject bean=JarFilter/
  | /property
  | property name=groups
  | set elementClass=java.lang.String
  | value./value
  | valuewars/value
  | /set
  | /property
  | property name=groupFilter
  | inject bean=WarFilter/
  | /property
  | /bean
I've simply copied your GroupingStructure into our project for the time being 
hence the different package name.

So we can now have jars in either the root, or in a sub directory named 'jars'.
And we can have wars in either the root, or in a sub directory named 'wars'.

Now, we are going to have users that have wars in sub directories that have 
different names then 'wars'.
These users will have the following options (as I see it):
1. Renaming their sub directory to 'wars'.
2. Adding their sub directory names to the 'groups' list above.
3. Add a META-INF/jboss-structure.xml to their .esb archive:
?xml version=1.0 encoding=UTF-8?
  | structure
  | context
  | path name=/
  | metaDataPath
  | path name=META-INF/
  | path name=./
  | /metaDataPath
  | classpath
  | path name=/
  | path name=. suffixes=.jar/
  | /classpath
  | /context
  | context
  | path name=subdir/testwar.war/
  | metaDataPath
  | path name=WEB-INF/
  | /metaDataPath
  | classpath
  | path name=subdir/testwar.war/WEB-INF/classes/
  | /classpath
  | /context
  | /structure
  | 
4. Last resort (because of the negative performance impact) activate the 
DirectoryStructure by uncommenting it in 
deployers/directory-deployer-jboss-beans.xml.

Have I missed any options here?

Thanks for writing the GroupingStructure! I think it will be very useful.

Regards,

/Daniel

 





View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4248507#4248507

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4248507
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-04 Thread beve
anonymous wrote : Or even better, you provide me with your valid use cases,
  | and I'll include this as part of Deployers impl / tests, 
I'd be happy to provide the use cases that we have. 

The requirement we have today is to support sub-deployments that are located in 
sub directories. This is required so that we are backward compatible. For ESB 5 
we can look having more strict deployment rules, such as wars should be 
packaged in a wars directory for example. 

For us it would be great to have a StructureDeployer implementation that takes 
a suffix for the type of deployment being deployed. We'd also need this 
deployer to be able have the option of supporting all types of sub-deployments.

I've tried extending the JarStructure but that did not really work for me. I'm 
now trying just to extend AbstractVFSStructureDeployer and making this as 
flexible as possible. 

Not sure if that was the type of use case you meant. I've got some unit test 
for this too. Let me know if you'd like them and I'll send you them (they are 
not checked in).

anonymous wrote : 
  | as I see this should be a good use case - nice structure deployers 
extensions.
  | Hence any future demand should be easy - having this as an impl entry 
point. 
It would be really nice to have something like this I think:)

Thanks,

/Daniel





View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247765#4247765

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247765
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-04 Thread alesj
beve wrote : 
  | It would be really nice to have something like this I think:)
  | 
* 
http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/dir/GroupingStructure.java
* https://jira.jboss.org/jira/browse/JBDEPLOY-208

I still need to test this; I'll use your esb example + some other hacks. 

;-)

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247832#4247832

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247832
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-04 Thread beve
anonymous wrote : I still need to test this; I'll use your esb example + some 
other hacks. 
Nice, I'll give this a spin from my end as well. 

Thanks!

/Daniel

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247859#4247859

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247859
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-04 Thread alesj
beve wrote : anonymous wrote : I still need to test this; I'll use your esb 
example + some other hacks. 
  | Nice, I'll give this a spin from my end as well. 
  | 
* 
http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/dir/test/EsbStructureUnitTestCase.java

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247894#4247894

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247894
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-03 Thread beve
Hi Ales, 

thanks for the your help on this!

The DirectoryStructure solution works well but since it's deprecated I'll look 
into your second solution.

Regarding the solution with a StructureProcessor and the example you gave , 
SeamTempModificationTypeMatcher. Could you explain a little more how this could 
be used to solve the issue with subdirectory deployments?
 
Thanks,

/Daniel

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247558#4247558

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247558
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-03 Thread alesj
beve wrote : 
  | Regarding the solution with a StructureProcessor and the example you gave , 
SeamTempModificationTypeMatcher. Could you explain a little more how this could 
be used to solve the issue with subdirectory deployments?
  | 
You would write your own EsbModificationTypeMatcher.
Where ModificationTypeStructureProcessor picks up this EMTM by MC's incallback.

e.g.

  | public class EsbModificationTypeMatcher implements ModificationTypeMatcher
  | {
  |private StructureDeployer warStructureDeployer = null; // get it injected
  |private VFSStructuralDeployers deployers = null; // get it injected
  | 
  |public boolean determineModification(VirtualFile root, StructureMetaData 
structureMetaData)
  |{
  |   try
  |   {
  |  if (root.getName().endsWith(.esb))
  |  {
  | VirtualFile wars = root.getChild(wars);
  | if (wars != null)
  | {
  |ListVirtualFile children = wars.getChildren();
  |for (VirtualFile war : children)
  |{
  |   StructureContext context = new StructureContext(root, 
root, war, structureMetaData, deployers, null);
  |   warStructureDeployer.determineStructure(context);
  |}
  | }
  | return true;
  |  }
  |   }
  |   catch (Exception ignored)
  |   {
  |   }
  |   return false;
  |}
  | 
  |public boolean determineModification(VirtualFile root, ContextInfo 
contextInfo)
  |{
  |   // cannot change sub-deployment
  |   return false;
  |}
  | }
  | 

Perhaps try something like this.
If this doesn't work, I would fallback to writing my own StructureDeployer.
Where you can extend JARStructure (to only understand .esb) + change its 
candidateStructureVisitorFactory.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247569#4247569

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247569
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-03 Thread beve
For the moment I'm going to simply use a modified DirectoryStructure. If I have 
time before our next release I'll go back I'll try the solutions that you've 
given as I understand that this solution is not optimal. 

Thanks,

/Daniel

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247664#4247664

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247664
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-03 Thread alesj
beve wrote : For the moment I'm going to simply use a modified 
DirectoryStructure. If I have time before our next release I'll go back I'll 
try the solutions that you've given as I understand that this solution is not 
optimal. 
  | 
You should at least add a short-circuit check.
As we already have issues with slow boot time,
and this structure deployer affects all deployments, 
hence every unnecessary extra step is costly.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247666#4247666

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247666
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-03 Thread beve
anonymous wrote : You should at least add a short-circuit check.
  | As we already have issues with slow boot time,
  | and this structure deployer affects all deployments,
  | hence every unnecessary extra step is costly.
I've re-opened the jira for this and we will at the very least add the 
short-circuit check and hopefully have time to look into your other suggestions.

Regards,

/Daniel



View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247670#4247670

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247670
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-08-03 Thread alesj
beve wrote : 
  | I've re-opened the jira for this and we will at the very least add the 
short-circuit check and hopefully have time to look into your other suggestions.
  | 
I can hack you a few examples, and you test them.
e.g. trying to make JARStructure more flexible

Or even better, you provide me with your valid use cases,
and I'll include this as part of Deployers impl / tests,
as I see this should be a good use case - nice structure deployers extensions.
Hence any future demand should be easy - having this as an impl entry point.

I need to do new Deployers anyway, as I have some small bugs fixes ready.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247677#4247677

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247677
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Microcontainer] - Re: StructureDeployer that supports subdeployments

2009-07-31 Thread alesj
beve wrote : 
  | Is anyone aware of an example of a StructureDeployer that support 
subdeployments in this manner? Or is there another way to accomplish this?
  | 
There is DirectoryStructure which considers every directory as a potential 
location for sub-deployments.
It was developed to support old .sar/lib, but it's deprecated and commented out.
(still part of JBossAS, but left out on purpose)

I guess in your case it would be best to either have this new structure 
deployer,
or force every .esb user to jboss-structure.xml.

Or, you can use StructureProcessor, which can modify structure info just before 
we pass it to real deployers.
See SeamTempModificationTypeMatcher in seam-int project:
 - 
http://anonsvn.jboss.org/repos/jbossas/projects/jboss-seam-int/trunk/microcontainer/src/main/java/org/jboss/seam/integration/microcontainer/deployers/SeamTempModificationTypeMatcher.java
(this is callback matched with the current default StructureProcessor impl)

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4247301#4247301

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4247301
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user