[Design of POJO Server] - Re: Scoping of war/jar file embedded in sar service archives
by alesj
Cause for reopening JBDEPLOY-59.
I commited deployers/build/pom.xml to use the latest Classloading snapshot.
The ManifestClassLoaderUnitTestCase is failing due to ordering issue.
With the new Classloading code that tries to resolve ClassLoadingSpace,
this piece causes child modules to declare its vfs roots before parent modules.
org.jboss.classloading.spi.dependency.Domain:
| // Skip the classloader space checking when it is import all
| if (module.isImportAll() == false)
| {
| ClassLoadingSpace space = new ClassLoadingSpace();
| space.join(module); // starting here!
| }
|
In the test top-level.jar is import-all == true,
where top-levelsub.jar is import-all == false.
1) space.join(module) calls module.determinePackageNames
2) module.getCapabilities calls module.determineCapabilities
3) module.determineCapabilities in VFSDeploymentClassLoaderPolicyModule uses determineVFSRoots
And since parent hasn't been yet examined,
this code is never called
| Set<VirtualFile> parentClassPath = parent.getAttachment(VFS_CLASS_PATH, Set.class);
| if (parentClassPath != null)
| {
| if (log.isTraceEnabled())
| {
| for (VirtualFile parentFile : parentClassPath)
| {
| if (classPath.contains(parentFile))
| log.trace(unit + " weeding duplicate entry " + parentFile + " from classpath already in parent " + parent);
| }
| }
| classPath.removeAll(parentClassPath);
| }
|
leaving the sub's classpath intact.
Hence it loads class from it's own classloader.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165497#4165497
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165497
17 years, 8 months
[Design the new POJO MicroContainer] - ManagedObjectAttachmentsImpl::transientManagedObjects not tr
by alesj
Looking at this
| public class ManagedObjectAttachmentsImpl extends PredeterminedManagedObjectAttachmentsImpl implements ManagedObjectAttachments
| {
| /** The serialVersionUID */
| private static final long serialVersionUID = -195530143173768763L;
|
| /** The transient managed objects */
| private MutableAttachments transientManagedObjects = AttachmentsFactory.createMutableAttachments();
|
| public MutableAttachments getTransientManagedObjects()
| {
| return transientManagedObjects;
| }
|
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
| {
| super.readExternal(in);
| transientManagedObjects = (MutableAttachments) in.readObject();
| }
|
| /**
| * @serialData attachments
| * @param out the output
| * @throws IOException for any error
| */
| public void writeExternal(ObjectOutput out) throws IOException
| {
| super.writeExternal(out);
| out.writeObject(transientManagedObjects);
| }
| }
|
what's transient about it, except for the name? :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4165482#4165482
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4165482
17 years, 8 months