FileDocCategorySizeDatePackage
BundleDescriptor.javaAPI DocGlassfish v2 API34436Fri May 04 22:31:20 BST 2007com.sun.enterprise.deployment

BundleDescriptor

public abstract class BundleDescriptor extends RootDeploymentDescriptor implements Roles
I am an abstract class representing all the deployment information common to all component container structures held by an application.
author
Danny Coward

Fields Summary
private static com.sun.enterprise.util.LocalStringManagerImpl
localStrings
private static final String
DEPLOYMENT_DESCRIPTOR_DIR
private static final String
WSDL_DIR
private static final double
ANNOTATION_EJB_VER
private static final double
ANNOTATION_WAR_VER
private static final double
ANNOTATION_CAR_VER
private final String
PERSISTENCE_UNIT_NAME_SEPARATOR
private Application
application
private Set
roles
private Set
messageDestinations
private WebServicesDescriptor
webServices
private boolean
fullFlag
private boolean
fullAttribute
private Map
entityManagerFactories
private com.sun.enterprise.deployment.util.ModuleDescriptor
moduleDescriptor
contains the information for this module (like it's module name)
private Hashtable
injectionInfos
Constructors Summary
public BundleDescriptor()
Construct a new BundleDescriptor

    
             
      
        super();
        webServices.setBundleDescriptor(this);
    
public BundleDescriptor(String name, String description)
Construct a new BundleDescriptor with a name and description

        super(name, description);
        webServices.setBundleDescriptor(this);
    
Methods Summary
voidaddBundleDescriptor(com.sun.enterprise.deployment.BundleDescriptor bundleDescriptor)

	this.getRoles().addAll(bundleDescriptor.getRoles());
	this.changed();
    
public voidaddEntityManagerFactory(java.lang.String unitName, javax.persistence.EntityManagerFactory emf)
Set the physical entity manager factory for a persistence unit within this module.


        entityManagerFactories.put(unitName, emf);
    
public voidaddMessageDestination(MessageDestinationDescriptor messageDestination)
Add a message destination to me.

	messageDestination.setBundleDescriptor(this);
	this.getMessageDestinations().add(messageDestination);
	super.changed();
    
public voidaddRole(Role role)
Adds a role object to me.

	this.getRoles().add(role);
	this.changed();
    
public voidaddRole(SecurityRoleDescriptor descriptor)
Adds a Role object based on the supplied SecurityRoleDescriptor.

A change in SecurityRoleNode to fix bug 4933385 causes the DOL to use SecurityRoleDescriptor, rather than Role, to contain information about security roles. To minimize the impact on BundleDescriptor, this method has been added for use by the DOL as it processes security-role elements.

This method creates a new Role object based on the characteristics of the SecurityRoleDescriptor and then delegates to addRole(Role) to preserve the rest of the behavior of this class.

param
descriptor SecurityRoleDescriptor that describes the username and description of the role

        Role role = new Role(descriptor.getName());
        role.setDescription(descriptor.getDescription());
        this.addRole(role);
    
public PersistenceUnitDescriptorfindDefaultPU()
This method is responsible for finding default persistence unit for a bundle descriptor.

return
the default persistence unit for this bundle. returns null, if there isno PU defined or default can not be calculated because there are more than 1 PUs defined.

        // step #1: see if we have only one PU in the local scope.
        PersistenceUnitDescriptor pu = null;
        int totalNumberOfPUInBundle = 0;
        for (PersistenceUnitsDescriptor nextPUs:
                getPersistenceUnitsDescriptors()) {
            for(PersistenceUnitDescriptor nextPU :
                    nextPUs.getPersistenceUnitDescriptors()) {
                pu = nextPU;
                totalNumberOfPUInBundle++;
            }
        }
        if(totalNumberOfPUInBundle == 1) { // there is only one PU in this bundle.
            return pu;
        } else if(totalNumberOfPUInBundle == 0) { // there are no PUs in this bundle.
            // step #2: see if we have only one PU in the ear.
            int totalNumberOfPUInEar = 0;
            for (PersistenceUnitsDescriptor nextPUs:
                    getApplication().getPersistenceUnitsDescriptors()) {
                for(PersistenceUnitDescriptor nextPU :
                        nextPUs.getPersistenceUnitDescriptors()) {
                    pu = nextPU;
                    totalNumberOfPUInEar++;
                }
            }
            if(totalNumberOfPUInEar == 1) {
                return pu;
            }
        }
        return null;
    
public PersistenceUnitDescriptorfindReferencedPU(java.lang.String unitName)
It accepts both a quailified (e.g.) "lib/a.jar#FooPU" as well as unqualified name (e.g.) "FooPU". It then searched all the PersistenceUnits that are defined in the scope of this bundle descriptor to see which one matches the give name.

param
unitName as used in @PersistenceUnit, @PersistenceContext or . If null, this method returns the default PU, if available. The reason it accepts null for default PU is because "" gets converted to null in EntityManagerReferenceHandler.processNewEmRefAnnotation.
return
PersistenceUnitDescriptor that this unitName resolves to. Returns null, if unitName could not be resolved.

        if(unitName == null || unitName.length()==0) { // uses default PU.
            return findDefaultPU();
        } else {
            return findReferencedPU0(unitName);
        }
    
private PersistenceUnitDescriptorfindReferencedPU0(java.lang.String unitName)
Internal method. This method is used to find referenced PU with a given name. It does not accept null or empty unit name.

param
unitName
return

        int separatorIndex =
            unitName.lastIndexOf(PERSISTENCE_UNIT_NAME_SEPARATOR);

        if( separatorIndex != -1 ) { // qualified name
            // uses # => must be defined in a utility jar at ear scope.
            String unqualifiedUnitName =
                unitName.substring(separatorIndex + 1);
            String path = unitName.substring(0, separatorIndex);
            // it' necessary to call getTargetUri as that takes care of
            // converting ././b to canonical forms.
            String puRoot = getTargetUri(this, path);
            final PersistenceUnitsDescriptor pus =
                    getApplication().getPersistenceUnitsDescriptor(puRoot);
            if(pus!=null) {
                for(PersistenceUnitDescriptor pu :
                        pus.getPersistenceUnitDescriptors()) {
                    if(pu.getName().equals(unqualifiedUnitName)) {
                        return pu;
                    }
                }
            }
        } else { // uses unqualified name.
            // first look to see if there is a match with unqualified name,
            // b'cos local scope takes precedence.
            Map<String, PersistenceUnitDescriptor> visiblePUs =
                    getVisiblePUs();
            PersistenceUnitDescriptor result = visiblePUs.get(unitName);
            if(result != null) return result;

            // next look to see if there is unique match in ear scope.
            int sameNamedEarScopedPUCount = 0;
            for(String s : visiblePUs.keySet()) {
                int idx = s.lastIndexOf(PERSISTENCE_UNIT_NAME_SEPARATOR);
                if(idx != -1 // ear scoped
                        && s.substring(idx+1).matches(unitName)) {
                    result = visiblePUs.get(s);
                    sameNamedEarScopedPUCount++;
                }
            }
            // if there are more than one ear scoped PU with same name (this
            // is possible when PU is inside two different library jar),
            // then user can not use unqualified name.
            if(sameNamedEarScopedPUCount == 1) {
                return result;
            }
        }
        return null;
    
public java.util.CollectionfindReferencedPUs()
This method returns all the persistence units that are referenced by this module. Depending on the type of component, a PU can be referenced by one of the four following ways: , @PersistenceContext, and @PersistenceUnit This method is intentionally not made abstract because we don't want every subclass to implement. So, we have a dummy implementation that we don't expect to be used ever. See, the actual implementation done in EjbBundleDescriptor, ApplicationClientDescriptor and WebBundleDescriptor.

return
persistence units that are referenced by this module

        /*
         * A dummy implementation that we don't expect to be used ever.
         */
        assert(false);
        return null;
    
protected static java.util.CollectionfindReferencedPUsViaPCRefs(JndiNameEnvironment component)
helper method: find all PUs referenced via @PersistenceContext or

        Collection<PersistenceUnitDescriptor> pus =
                new HashSet<PersistenceUnitDescriptor>();
        for(EntityManagerReference emRef :
                component.getEntityManagerReferenceDescriptors()) {
            final String unitName = emRef.getUnitName();
            final BundleDescriptor bundle =
                    emRef.getReferringBundleDescriptor();
            PersistenceUnitDescriptor pu = bundle.findReferencedPU(unitName);
            if(pu == null) {
                throw new RuntimeException(localStrings.getLocalString(
                        "enterprise.deployment.exception-unresolved-pc-ref", "xxx", // NOI18N
                        new Object[] {emRef.getName(),
                                      bundle.getName()})
                );
            }
            if("RESOURCE_LOCAL".equals(pu.getTransactionType())) { // NOI18N
                throw new RuntimeException(localStrings.getLocalString(
                        "enterprise.deployment.exception-non-jta-container-managed-em", "xxx", // NOI18N
                        new Object[] {emRef.getName(),
                                      bundle.getName(),
                                      pu.getName()})
                );
            }
            pus.add(pu);
        }
        return pus;
    
protected static java.util.CollectionfindReferencedPUsViaPURefs(JndiNameEnvironment component)
helper method: find all PUs referenced via @PersistenceUnit or

        Collection<PersistenceUnitDescriptor> pus =
                new HashSet<PersistenceUnitDescriptor>();
        for(EntityManagerFactoryReference emfRef :
                component.getEntityManagerFactoryReferenceDescriptors()) {
            final String unitName = emfRef.getUnitName();
            final BundleDescriptor bundle =
                    emfRef.getReferringBundleDescriptor();
            PersistenceUnitDescriptor pu = bundle.findReferencedPU(unitName);
            if(pu == null) {
                throw new RuntimeException(localStrings.getLocalString(
                        "enterprise.deployment.exception-unresolved-pu-ref", "xxx", // NOI18N
                        new Object[] {emfRef.getName(),
                                      bundle.getName()})
                );
            }
            pus.add(pu);
        }
        return pus;
    
public ApplicationgetApplication()
The application to which I belong, or none if I am standalone.

	return this.application;
    
public java.lang.ClassLoadergetClassLoader()

return
the class loader associated with this module

        if (classLoader!=null) {
            return classLoader;
        }
        if (application!=null) {
            return application.getClassLoader();
        } 
        throw new RuntimeException("No class loader associated with this module " + getName());
    
public java.lang.StringgetDeploymentDescriptorDir()

return
the deployment descriptor directory location inside the archive file

        return DEPLOYMENT_DESCRIPTOR_DIR;
    
public java.util.SetgetEntityManagerFactories()
Returns the set of physical entity manager factories associated with persistence units in this module.


        return new HashSet<EntityManagerFactory>
            (entityManagerFactories.values());

    
public javax.persistence.EntityManagerFactorygetEntityManagerFactory(java.lang.String unitName)
Retrieve the physical entity manager factory associated with the unitName of a persistence unit within this module. Returns null if no matching entry is found.

        
        return entityManagerFactories.get(unitName);
    
protected java.util.ListgetInjectableResources(JndiNameEnvironment jndiNameEnv)


        List<InjectionCapable> injectables = 
            new LinkedList<InjectionCapable>();
            
        Collection allEnvProps = new HashSet();

        for(Iterator envEntryItr = 
                jndiNameEnv.getEnvironmentProperties().iterator(); 
            envEntryItr.hasNext();) {
            EnvironmentProperty envEntry = (EnvironmentProperty) 
                envEntryItr.next();
            // Only env-entries that have been assigned a value are
            // eligible for injection.
            if( envEntry.hasAValue() ) {
                allEnvProps.add(envEntry);
            }
        }

        allEnvProps.addAll(jndiNameEnv.getEjbReferenceDescriptors());
        allEnvProps.addAll(jndiNameEnv.getServiceReferenceDescriptors());
        allEnvProps.addAll(jndiNameEnv.getResourceReferenceDescriptors());
        allEnvProps.addAll(jndiNameEnv.getJmsDestinationReferenceDescriptors());
        allEnvProps.addAll(jndiNameEnv.getMessageDestinationReferenceDescriptors());

        allEnvProps.addAll(jndiNameEnv.getEntityManagerFactoryReferenceDescriptors());
        allEnvProps.addAll(jndiNameEnv.getEntityManagerReferenceDescriptors());

        for(Iterator envItr = allEnvProps.iterator(); envItr.hasNext();) {
            InjectionCapable next = (InjectionCapable) envItr.next();
            if( next.isInjectable() ) {
                injectables.add(next);
            }
        }

        return injectables;     
    
protected java.util.ListgetInjectableResourcesByClass(java.lang.String className, JndiNameEnvironment jndiNameEnv)
Define implementation of getInjectableResourceByClass here so it isn't replicated across appclient, web, ejb descriptors.

        List<InjectionCapable> injectables = 
            new LinkedList<InjectionCapable>();

        for(InjectionCapable next : getInjectableResources(jndiNameEnv) ) {
            if( next.isInjectable()) {
                for (InjectionTarget target : next.getInjectionTargets()) {
                    if (target.getClassName().equals(className) ) {
                        injectables.add(next);
                    }
                }
            }
        }

        return injectables;
    
public InjectionInfogetInjectionInfoByClass(java.lang.String className, JndiNameEnvironment jndiNameEnv)


        // first look in the cache
        InjectionInfo injectionInfo = injectionInfos.get(className);
        if (injectionInfo != null) {
            return injectionInfo;
        }

        // if it's not in the cache, create a new one
        LifecycleCallbackDescriptor postConstructDesc =
            getPostConstructDescriptorByClass(className, jndiNameEnv);
        String postConstructMethodName = (postConstructDesc != null) ?
            postConstructDesc.getLifecycleCallbackMethod() : null;
        LifecycleCallbackDescriptor preDestroyDesc =
            getPreDestroyDescriptorByClass(className, jndiNameEnv);
        String preDestroyMethodName = (preDestroyDesc != null) ?
            preDestroyDesc.getLifecycleCallbackMethod() : null;
        injectionInfo = new InjectionInfo(className, 
                                 postConstructMethodName, preDestroyMethodName,
                                 getInjectableResourcesByClass(className,
                                                               jndiNameEnv));
        // store it in the cache and return
        injectionInfos.put(className, injectionInfo);
        return injectionInfo;
    
public MessageDestinationDescriptorgetMessageDestinationByName(java.lang.String name)
Returns a message destination descriptor that I have by the same name, or throws an IllegalArgumentException

	for (Iterator itr = this.getMessageDestinations().iterator(); 
             itr.hasNext();) {
	    Descriptor next = (Descriptor) itr.next();
	    if (next.getName().equals(name)) {
		return (MessageDestinationDescriptor) next;
	    }
	}
	throw new IllegalArgumentException(localStrings.getLocalString(
								       "enterprise.deployment.exceptionmessagedestbundle",
								       "Referencing error: this bundle has no message destination of name: {0}", new Object[] {name}));
    
public java.util.SetgetMessageDestinations()
Return the Set of message destinations I have

	if (this.messageDestinations == null) {
	    this.messageDestinations = new HashSet();
	}
	return this.messageDestinations;
    
public com.sun.enterprise.deployment.util.ModuleDescriptorgetModuleDescriptor()

return
the module descriptor for this bundle

        if (moduleDescriptor==null) {
            moduleDescriptor = new ModuleDescriptor();
            moduleDescriptor.setModuleType(getModuleType());
            moduleDescriptor.setDescriptor(this);
        }
        return moduleDescriptor;
    
public java.lang.StringgetModuleID()

return
the module ID for this module descriptor

        if (moduleID==null) {            
            moduleID = getModuleDescriptor().getArchiveUri();
        }
        if (getModuleDescriptor().isStandalone()) {
            return moduleID;
        }
        if (application!=null) {
            if (application.getModuleID()==null) {
                return getDisplayName();
            }
            return application.getModuleID()+"#"+moduleID;
        } else {
            return moduleID;
        }
    
public abstract javax.enterprise.deploy.shared.ModuleTypegetModuleType()

return
the type of this bundle descriptor

protected java.util.CollectiongetNamedDescriptorsFrom(JndiNameEnvironment nameEnvironment)
Utility method for iterating the set of named descriptors in the supplied nameEnvironment

	Collection namedDescriptors = new Vector();
	for (Iterator itr = nameEnvironment.getResourceReferenceDescriptors().iterator(); itr.hasNext();) {
	    ResourceReferenceDescriptor resourceReference = (ResourceReferenceDescriptor) itr.next();
	    namedDescriptors.add(resourceReference);
	}
	for (Iterator itr = nameEnvironment.getEjbReferenceDescriptors().iterator(); itr.hasNext();) {
	    EjbReferenceDescriptor ejbReference = (EjbReferenceDescriptor) itr.next();
	    namedDescriptors.add(ejbReference);
	}
	for (Iterator itr = nameEnvironment.getJmsDestinationReferenceDescriptors().iterator(); itr.hasNext();) {
	    JmsDestinationReferenceDescriptor resourceEnvRef = 
                (JmsDestinationReferenceDescriptor) itr.next();
	    namedDescriptors.add(resourceEnvRef);
	}
        
	return namedDescriptors;
    
protected java.util.VectorgetNamedReferencePairsFrom(JndiNameEnvironment nameEnvironment)
Utility method for iterating the set of NameReference pairs in the supplied nameEnvironment

	Vector pairs = new Vector();
	for (Iterator itr = nameEnvironment.getResourceReferenceDescriptors().iterator(); itr.hasNext();) {
	    ResourceReferenceDescriptor resourceReference = (ResourceReferenceDescriptor) itr.next();
	    pairs.add(NamedReferencePair.createResourceRefPair((Descriptor)nameEnvironment, resourceReference));
	}
	for (Iterator itr = nameEnvironment.getEjbReferenceDescriptors().iterator(); itr.hasNext();) {
	    EjbReferenceDescriptor ejbReference = (EjbReferenceDescriptor) itr.next();
	    pairs.add(NamedReferencePair.createEjbRefPair((Descriptor) nameEnvironment, ejbReference));
	}
	for (Iterator itr = nameEnvironment.getJmsDestinationReferenceDescriptors().iterator(); itr.hasNext();) {
	    JmsDestinationReferenceDescriptor resourceEnvRef = 
                (JmsDestinationReferenceDescriptor) itr.next();
	    pairs.add(NamedReferencePair.createResourceEnvRefPair((Descriptor) nameEnvironment, resourceEnvRef));
	}
        
	return pairs;
    
public LifecycleCallbackDescriptorgetPostConstructDescriptorByClass(java.lang.String className, JndiNameEnvironment jndiNameEnv)

        for (LifecycleCallbackDescriptor next :
                 jndiNameEnv.getPostConstructDescriptors()) {
            if (next.getLifecycleCallbackClass().equals(className)) {
                return next;
            }
        }
        return null;
    
public LifecycleCallbackDescriptorgetPreDestroyDescriptorByClass(java.lang.String className, JndiNameEnvironment jndiNameEnv)

        for (LifecycleCallbackDescriptor next :
                 jndiNameEnv.getPreDestroyDescriptors()) {
            if (next.getLifecycleCallbackClass().equals(className)) {
                return next;
            }
        }
        return null;
    
public java.util.SetgetRoles()
Return the set of com.sun.enterprise.deployment.Role objects I have plus the ones from application

	if (this.roles == null) {
	    this.roles = new OrderedSet();
	}
        if (application != null) {
            this.roles.addAll(application.getAppRoles());
        }

	return this.roles;
    
public abstract java.util.SetgetServiceReferenceDescriptors()

return
a set of service-ref from this bundle or an empty set if none

private java.lang.StringgetTargetUri(com.sun.enterprise.deployment.BundleDescriptor origin, java.lang.String relativeTargetUri)
Get the uri of a target based on a source module and a a relative uri from the perspective of that source module.

param
origin bundle descriptor within an application
param
relativeTargetUri relative uri from the given bundle descriptor
return
target uri

        try {
            String archiveUri = origin.getModuleDescriptor().getArchiveUri();
            return new URI(archiveUri).resolve(relativeTargetUri).getPath();
        } catch (URISyntaxException use) {
            throw new RuntimeException(use);
        }
    
public java.lang.StringgetUniqueFriendlyId()

        String uniqueId; 

        // for standalone jars, return its registration name
        // for applications, return the module uri

        if (getApplication().isVirtual()) {
            uniqueId = getApplication().getRegistrationName();
        } else {
            uniqueId = getModuleDescriptor().getArchiveUri();
        }
        return FileUtils.makeFriendlyFileName(uniqueId);
    
public java.util.MapgetVisiblePUs()
This method returns all the PUs that are defined in this bundle as well as the PUs defined in the ear level. e.g. for the following ear: ear/lib/a.jar#defines FooPU /lib/b.jar#defines FooPU ejb.jar#defines FooPU for the EjbBundleDescriptor (ejb.jar), the map will contain {(lib/a.jar#FooPU, PU1), (lib/b.jar#FooPU, PU2), (FooPU, PU3)}.

return
a map of names to PUDescriptors that are visbible to this bundle descriptor. The name is a qualified name for ear scoped PUs where as it is in unqualified form for local PUs.

        Map<String, PersistenceUnitDescriptor> result =
                new HashMap<String, PersistenceUnitDescriptor>();

        // local scoped PUs
        for (PersistenceUnitsDescriptor pus :
                getPersistenceUnitsDescriptors()) {
            for(PersistenceUnitDescriptor pu :
                    pus.getPersistenceUnitDescriptors()) {
                // for local PUs, use unqualified name.
                result.put(pu.getName(), pu);
            }
        }

        // ear scoped PUs
        final Application application = getApplication();
        if(application!=null) {
            for(PersistenceUnitsDescriptor pus:
                    application.getPersistenceUnitsDescriptors()) {
                for(PersistenceUnitDescriptor pu :
                        pus.getPersistenceUnitDescriptors()) {
                    // use fully qualified name for ear scoped PU
                    result.put(pu.getPuRoot()+ PERSISTENCE_UNIT_NAME_SEPARATOR + pu.getName(), pu);
                }
            }
        }
        return result;
    
public WebServiceEndpointgetWebServiceEndpointByName(java.lang.String name)

        return webServices.getEndpointByName(name);
    
public WebServicesDescriptorgetWebServices()
Return web services defined for this module. Not applicable for application clients.

        return webServices;
    
public java.lang.StringgetWsdlDir()

return
the wsdl directory location inside the archive file

        return getDeploymentDescriptorDir() + "/" + WSDL_DIR;
    
public booleanhasMessageDestinationByName(java.lang.String name)
Returns true if I have an message destiation by that name.

	for (Iterator itr = this.getMessageDestinations().iterator(); 
             itr.hasNext();) {
	    Descriptor next = (Descriptor) itr.next();
	    if (next.getName().equals(name)) {
		return true;
	    }
	}
	return false;
    
public booleanhasWebServiceClients()

return
true if this bundle descriptor defines web service clients

        return false;
    
public booleanhasWebServices()

return
true if this bundle descriptor defines web services

        return getWebServices().hasWebServices();
    
public booleanisApplication()

return
true if this module is an application object

	return false;    
    
public booleanisDDWithNoAnnotationAllowed()

return true for following cases: a. connector module; b. ejb module and schema version earlier than 3.0; c. web module and schema version earlier than 2.5; d. appclient module and schema version earlier than 5.0.

   
        ModuleType mType = getModuleType();

        double specVersion = Double.parseDouble(getSpecVersion());

        // connector DD doesn't have annotation, so always treated
        // as full DD
        if (mType.equals(ModuleType.RAR)) {
            return true;
        } else {
            // we do not process annotations for earlier versions of DD
            if ( (mType.equals(ModuleType.EJB) &&
                  specVersion < ANNOTATION_EJB_VER) ||
                 (mType.equals(ModuleType.WAR) &&
                  specVersion < ANNOTATION_WAR_VER) ||
                 (mType.equals(ModuleType.CAR) &&
                  specVersion < ANNOTATION_CAR_VER) ) {
                return true;
            } else {
                return false;
            }
        }
    
public booleanisFullAttribute()
Get the full attribute of the deployment descriptor

return
the full attribute

        return fullAttribute;
    
public booleanisFullFlag()

return true for following cases: 1. When the full attribute is true. This attribute only applies to ejb module with schema version equal or later than 3.0; web module and schema version equal or later than than 2.5; appclient module and schema version equal or later than 5.0. 2. When it's been tagged as "full" when processing annotations. 3. When DD has a version which doesn't allowed annotations. return false otherwise.

        // if the full attribute is true or it's been tagged as full,
        // return true
        if (fullAttribute == true || fullFlag == true) {
            return true;
        }
        return isDDWithNoAnnotationAllowed(); 
    
public voidprint(java.lang.StringBuffer toStringBuffer)
Prints a formatted string representing my state.

	toStringBuffer.append("\n");
        super.print(toStringBuffer);
	toStringBuffer.append("\n Roles[] = ").append(roles);
        if (getWebServices().hasWebServices()) {
            toStringBuffer.append("\n WebServices ");
            ((Descriptor)(getWebServices())).print(toStringBuffer);
        }
    
public voidremoveMessageDestination(MessageDestinationDescriptor msgDest)
Remove the given message destination descriptor from my (by equality).

	msgDest.setBundleDescriptor(null);
	this.getMessageDestinations().remove(msgDest);
	super.changed();
    
public voidremoveRole(Role role)
Removes a role object from me.

	this.getRoles().remove(role);
	this.changed();
    
public voidsetApplication(Application a)
Sets the application to which I belong.

	if (this.application != null) {
	    this.removeNotificationListener(this.application);
	}
	this.application = a;
	if (this.application != null) {
	    this.addNotificationListener(this.application);
	}
    
public voidsetFullAttribute(java.lang.String value)
Sets the full attribute of the deployment descriptor

param
value the full attribute

        fullAttribute = Boolean.valueOf(value);
    
public voidsetFullFlag(boolean flag)
Sets the full flag of the bundle descriptor. Once set, the annotations of the classes contained in the archive described by this bundle descriptor will be ignored.

param
flag a boolean to set or unset the flag

         fullFlag=flag;
     
public voidsetModuleDescriptor(com.sun.enterprise.deployment.util.ModuleDescriptor descriptor)
Sets the module descriptor for this bundle

param
descriptor for the module

        moduleDescriptor = descriptor;