-
1. Re: BSH script from client
starksm64 Nov 7, 2007 4:24 PM (in response to alesj)That is really a debatable operation on the management interface of some remote deployer component. I would not even port this.
-
2. Re: BSH script from client
alesj Nov 8, 2007 7:04 AM (in response to alesj)I've created a separate bean shell client bean - LegacyBeanShellScriptClient.
Its usage in bsh-deployers-beans.xml is currently commented. -
3. Re: BSH script from client
alesj Nov 8, 2007 7:17 AM (in response to alesj)We still need to port the actual deployer structure to
<server-configruation>/deployers/bsh.deployer
- META-INF/bsh-deployers-beans.xml
- bsh-deployer.jar
How does this - bsh-deployer.xml + coresponding lib - get into current AS build? -
4. Re: BSH script from client
adrian.brock Nov 8, 2007 8:17 AM (in response to alesj)You need to change varia/build.xml
such that it creates a structure like
bsh.deployer/
bsh.deployer/META-INF/bsh-deployers-beans.xml
bsh.deployer/bsh-deployer.jar
Then update build/build-distr.xml
such that this directory structure is copied into server/{all|default}/deployers -
5. Re: BSH script from client
alesj Nov 8, 2007 9:42 AM (in response to alesj)"adrian@jboss.org" wrote:
You need to change varia/build.xml
such that it creates a structure like
bsh.deployer/
bsh.deployer/META-INF/bsh-deployers-beans.xml
bsh.deployer/bsh-deployer.jar
Then update build/build-distr.xml
such that this directory structure is copied into server/{all|default}/deployers
Sure.
And I guess I need to remove copying of the bsh-deployer.xml to deploy dir as well - simply by deleting it in trunk. :-)
But where was the initial BeanShellSubDeployer class present - since I fail to find it. Or is this not present anymore in the current as5 trunk build? -
6. Re: BSH script from client
adrian.brock Nov 8, 2007 9:58 AM (in response to alesj)"alesj" wrote:
But where was the initial BeanShellSubDeployer class present - since I fail to find it. Or is this not present anymore in the current as5 trunk build?
?[ejort@warjort varia]$ find . -iname BeanShellSubDeployer.java ./src/main/org/jboss/varia/deployment/BeanShellSubDeployer.java
-
7. Re: BSH script from client
alesj Nov 8, 2007 10:02 AM (in response to alesj)"adrian@jboss.org" wrote:
[ejort@warjort varia]$ find . -iname BeanShellSubDeployer.java
./src/main/org/jboss/varia/deployment/BeanShellSubDeployer.java
Not .java file. ;-)
.class file.
In which .jar was/is present in current build?
Or, since nobody picked-up -deployer.xml files any more, there was no need for it to be present in current build? -
8. Re: BSH script from client
alesj Nov 9, 2007 10:56 AM (in response to alesj)"adrian@jboss.org" wrote:
You need to change varia/build.xml
such that it creates a structure like
bsh.deployer/
bsh.deployer/META-INF/bsh-deployers-beans.xml
bsh.deployer/bsh-deployer.jar
Then update build/build-distr.xml
such that this directory structure is copied into server/{all|default}/deployers
Done. -
9. Re: BSH script from client
dimitris Nov 14, 2007 4:21 PM (in response to alesj)I was looking into org.jboss.test.jmx.test.DeployXMBeanUnitTestCase failures.
The interceptors-xmbean.sar includes an embeded/nested .bsh script, which is not picked up by the new deployer, and so the test fails.
...
jmx/interceptors/scripts/
jmx/interceptors/scripts/SecurityConfig.bsh
...
How this .bsh script can be picked up? Do we need to change the bootstrap-beans.xml ? -
10. Re: BSH script from client
starksm64 Nov 14, 2007 4:46 PM (in response to alesj)This should be picked up by the bsh deployer Ales ported over. It should not require a change to the bootstrap-beans.xml as bsh should not be a bootstrap supported capability. I see that there is a deployers/bsh.deployer/, and this should be all that is needed. If the script is not getting deployed we need to look at why the bsh deployer is not being used.
-
11. Re: BSH script from client
alesj Nov 15, 2007 3:37 AM (in response to alesj)I'll have a look today.
My first guess would be that .bsh file is not listed as part of metadata files in that nested sar. -
12. Re: BSH script from client
adrian.brock Nov 15, 2007 5:47 AM (in response to alesj)"scott.stark@jboss.org" wrote:
This should be picked up by the bsh deployer Ales ported over. It should not require a change to the bootstrap-beans.xml as bsh should not be a bootstrap supported capability.
Whether it should or it shouldn't, it currently does require a change in bootstrap-beans.xml
i.e. for subdeployments you have to tell the FileStructure deployer what plain file
extensions are deployable.
I updated the JIRA issue with the required change.
Maybe we could add some mechanism where a deployer can automagically
register/unregister matching alogrithms with the FileStructure for otherwise
unrecognised files.
e.g.public interface FileMatcher { boolean isDeployable(VirtualFile file); } public class FileStructure implements StructureDeployer { ... @InCallback public void addFileMatcher(FileMatcher fm) {...}; @UnCallback public void removeFileMatcher(FileMatcher fm) {...}; }
The bean shell deployer could then implement FileMatcher to say
it wants files ending with .bsh and the MC will do the injection onto the FileStructure
without any extra xml or code. -
13. Re: BSH script from client
dimitris Nov 15, 2007 5:53 AM (in response to alesj)I did a quick test with the added '.bsh' suffix in the FileStructure deployer but it didn't work.
Do we actually recurse inside a deployment, or look only in the root? Is this controlled somewhere? -
14. Re: BSH script from client
adrian.brock Nov 15, 2007 6:06 AM (in response to alesj)"dimitris@jboss.org" wrote:
I did a quick test with the added '.bsh' suffix in the FileStructure deployer but it didn't work.
Do we actually recurse inside a deployment, or look only in the root? Is this controlled somewhere?
That's because the FileStructure algorithm is broken. ;-)
It expects a - in the file name.public static boolean isKnownFile(String name) { if (name == null) throw new IllegalArgumentException("Null name"); int index = name.lastIndexOf('-'); if (index == -1) return false; String suffix = name.substring(index); return fileSuffixes.contains(suffix); }
It should be interating over fileSuffixes and using endsWith().