[Design of POJO Server] - Re: Depends on @JMX mbean name
by adrian@jboss.org
"anil.saldhana(a)jboss.com" wrote :
| I spent 30 mins of my time yesterday in tracing the log wondering why my xxx-beans.xml was not getting processed. How can we help users with this? Maybe some warning message hinting at xxx-jboss-beans.xml?
|
This really falls under the "missing deployer" category.
But I think this is broken because we are generating some default metadata
regardless of whether other deployers actually process the deployment.
AbstractDeployment has
| public Object addAttachment(String name, Object attachment)
| {
| DeploymentContext deploymentContext = getDeploymentContext();
| deploymentContext.deployed();
| return deploymentContext.getTransientAttachments().addAttachment(name, attachment);
| }
|
So when the classloader deployers adds attachments, e.g. create
a default ClassLoadingMetaData for this top level deployment,
it is treated as deployed.
The same goes for the classpath deployer.
I think to fix this, we need a new method that says the attachment we are
adding should not be considered as flagging the deployment as really processed/deployed.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181546#4181546
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181546
16 years, 3 months
[Design of AOP on JBoss (Aspects/JBoss)] - Re: Reimplementing ClassPools for AS
by adrian@jboss.org
By the way, you should consider what will make things easier for you
as changes to the classloader api.
Although as you know I don't agree with using the classloader to determine
what aspects apply, when I looked at it before, the basic information you are trying
to work out is:
"from this classloader where does it load this other class?"
Then from that found class you go
class -> classloader -> application/sub-deployment -> aspect config
The basics of this query already exists at the jmx level,
look at the jboss.classloader on the jmx console or BaseClassLoaderMBean
| /**
| * Find the classloader for a class
| *
| * @param name the class name
| * @return the classloader or null if it is not loaded by a managed classloader
| * @throws ClassNotFoundException when the class is not found
| */
| ObjectName findClassLoaderForClass(String name) throws ClassNotFoundException;
|
I wouldn't have a problem with adding something like the following to the Module
ClassLoader findClassLoaderForClass(String name) throws ClassNotFoundException;
or
Module findModuleForClass(String name) throws ClassNotFoundException;
or other things that might be useful.
Once you have the classloader/module you can work out the
(sub-)deployment/aspect domain.
Or equally if that is not useful to you, we can discuss other helpers that are. ;-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181540#4181540
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181540
16 years, 3 months
[Design of AOP on JBoss (Aspects/JBoss)] - Re: Reimplementing ClassPools for AS
by adrian@jboss.org
"kabir.khan(a)jboss.com" wrote : "adrian(a)jboss.org" wrote :
| | The requested rules are on the Module, e.g. importAll, exportAll and requirements/capabilities
| |
| So to get this straight I can get the exported packages from the ExportedPackages(PackageCapability) of the Modules's capabilites and the imported packages from the OptionalPackages(PackageRequirement/UsesPackageRequirement)?
| Will these only be set if importAll and exportAll are false?
|
The exported packages have nothing to do with importAll.
exportAll is just a convenience mechanism where you don't have to explicitly
list all package capabilities.
anonymous wrote :
| What is the difference between PackageRequirement and UsesPackageRequirement? The method name is getOptionalPackageNames(). What does that mean? I also see that AbstractRequirement has an optional flag. If false, does that mean it is required? If that is the case, I don't really get what an optional import means.
|
Uses = Package + optional, see discussions in the MC forum for more details
some of it is explained in the xsd.
"adrian(a)jboss.org" wrote :
| or by looking at the actual ClassLoaderPolicy used to create the classloader,
| e.g getPackageNames() and getDelegates().
Are you saying I should really be using this instead of Module? How do I obtain this from a deployer?
What about version ranges? How are they represented?
In the requirement.
anonymous wrote :
| What I am doing is implementing one DelegatingClassPool per classloader, and having that backed by a ClassPoolDomain which corresponds to a classloading domain. If a CtClass cannot be found in a DelegatingClassPool it will delegate to the domain which will then look in the registered pools.
|
| Should things like parentFirst be handled on pool or domain level? I originally had that on the domain, but from what I gather the other settings importAll/exportAll/imports/exports should be handled on the pool level.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181537#4181537
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181537
16 years, 3 months