[Design of POJO Server] - Re: Structure deployer changes comitted to trunk
by scott.stark@jboss.org
"kabir.khan(a)jboss.com" wrote : For me the MBean gets installed correctly, but the deployment of the nested .aop archive fails when using MainDeployer.deploy()
|
|
| | 2006-10-27 12:40:03,656 ERROR [org.jboss.ejb3.deployers.EJBRegistrationDeployer] Error during deployment: jar:file:/C:/cygwin/home/Kabir/sourcecontrol/jboss-head/testsuite/output/lib/aop-extendertest.sar!/aop-extendertest.aop
| | org.jboss.deployers.spi.DeploymentException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
| | at org.jboss.ejb3.deployers.EJBRegistrationDeployer.deploy(EJBRegistrationDeployer.java:147)
| | at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
| | at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:145)
| | at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:440)
| | at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:381)
| | at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:795)
| | at org.jboss.deployment.MainDeployer.redeploy(MainDeployer.java:570)
| | ....
| | Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
| | at java.lang.String.substring(String.java:1768)
| | at org.jboss.ejb3.deployers.JBoss5DeploymentScope.<init>(JBoss5DeploymentScope.java:57)
| | at org.jboss.ejb3.deployers.EJBRegistrationDeployer.deploy(EJBRegistrationDeployer.java:131)
| |
| |
|
| EJBRegistrationDeployer.deploy():
|
| | ...
| | DeploymentScope scope = null;
| | if (unit.getDeploymentContext().getParent() != null)
| | {
| | scope = new JBoss5DeploymentScope(unit.getDeploymentContext().getParent());
| | }
| | ...
| |
|
|
| | public JBoss5DeploymentScope(DeploymentContext parent)
| | {
| | // Use the root vfs path name
| | this.shortName = parent.getRoot().getPathName();
| |
| | }
| |
|
| The pathname returned by the JARHandler is an empty string.
That is the opposite of why I changed the JBoss5DeploymentScope. It was using the full string name of the deployment url which is an invalid jmx name. I think we need a short/canonical name accessor on the DeploymentContext which returns the base vfs file name, or '/' if its the vfs root. I'll beef up the name handling error checking regardless.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981362#3981362
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981362
19 years, 2 months
[Design of AOP on JBoss (Aspects/JBoss)] - Re: Metadata rewrite
by adrian@jboss.org
It is the org.jboss.metadata in the container project.
The three major parts that need doing are:
1) Creating the composite metadata tree from the key scopes
2) Mechansims to deploy metadata at different scopes
3) Adding constructor, method, parameter annotations to the api.
I've outlined (1) elsewhere, but it is not trivial because of the
"feedback" used to construct the tree, e.g. the deployment determines
the cluster.
(2) is really an issue for the deployers
(3) needs to define a "joinpoint notion" so you can for instance
say I want to override the annotations/metadata for this method/constructor
I didn't look at how you did this with the org.jboss.repository stuff
I stopped doing this before to work on the deployers but now I've
got to the stage where I'm going to get back to it with the deployment
metadata population/overriding.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981347#3981347
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981347
19 years, 2 months
[Design the new POJO MicroContainer] - Re: Parameter matching issue?
by adrian@jboss.org
There is no such task, we have discussed this before.
The problem is that it doesn't know the type.
The logic is as follows:
1) Guess the constructor based on the number of args
(explicit type declarations help to filter this).
2) Use the real parameter types from the constructor
to determine the values (property editors).
In this case, it doesn't know
| <constructor><parameter>.jar</parameter></constructor>
|
is a java.lang.String rather than say an integer or something else.
Without explicit declaration of the parameter type,
it can only guess what it is from the constructor parameter type.
Of course, it could iterate all the constructors (if there are multiple parameters it would need to perm them) and find the "best match".
The result might still be ambigous, e.g.
<constructor><parameter>4</parameter></constructor>
does this match
public MyObject(String string) or MyObject(int integer)
On consistent resolution logic, that also seems unachievable
(given that the information on what changed is not stored anywhere).
You could have rules that like prefer a java.lang.String parameter
if there is no explicit declaration. But then the addition of a constructor
that contains a String would cause the resolution to change, leaving
you in exactly in the same position as when you started.
As an aside, there is also a TODO in the code somwhere to
implement integer progression. e.g. being able to use a
<value class="int">4</value>
to match a
public MyObject(long x) {}
constructor.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981300#3981300
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981300
19 years, 2 months