/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
/*
* Represents a deployment of a CDI (Weld) application.
*/
// Keep track of our BDAs for this deployment
// A convenience Map to get BDA for a given BDA ID
/**
* Produce <code>BeanDeploymentArchive</code>s for this <code>Deployment</code>
* from information from the provided <code>ReadableArchive</code>.
*/
// Collect /lib Jar BDAs (if any) from the parent module.
// If we've produced BDA(s) from any /lib jars, <code>return</code> as
if (libJarBDAs == null) {
return;
}
}
}
}
}
}
/**
* Produce <code>BeanDeploymentArchive</code>s for this <code>Deployment</code>
* from information from the provided <code>ReadableArchive</code>.
* This method is called for subsequent modules after This <code>Deployment</code> has
* been created.
*/
if (libJarBDAs == null) {
return;
}
}
if (idToBeanDeploymentArchive == null) {
}
}
}
}
}
/**
* Build the accessibility relationship between <code>BeanDeploymentArchive</code>s
* for this <code>Deployment</code>. This method must be called after all <code>Weld</code>
* <code>BeanDeploymentArchive</code>s have been produced for the
* <code>Deployment</code>.
*/
public void buildDeploymentGraph() {
// Make jars accessible to each other - Example:
// /ejb1.jar <----> /ejb2.jar
// If there are any application (/lib) jars, make them accessible
boolean modifiedArchive = false;
continue;
}
modifiedArchive = true;
}
// Make /lib jars (application) accessible
if (libJarBDAs != null) {
while (libJarIter.hasNext()) {
modifiedArchive = true;
}
}
if (modifiedArchive) {
if (idx >= 0) {
}
modifiedArchive = false;
}
}
}
// Make jars (external to WAR modules) accessible to WAR BDAs - Example:
// /web.war ----> /ejb.jar
// If there are any application (/lib) jars, make them accessible
boolean modifiedArchive = false;
modifiedArchive = true;
}
}
// Make /lib jars (application) accessible
if (libJarBDAs != null) {
while (libJarIter.hasNext()) {
modifiedArchive = true;
}
}
if (modifiedArchive) {
if (idx >= 0) {
}
modifiedArchive = false;
}
}
}
}
return getBeanDeploymentArchives(true);
}
"Returning \n" + beanDeploymentArchives);
if (!beanDeploymentArchives.isEmpty()) {
return beanDeploymentArchives;
}
return Collections.emptyList();
}
//don't stuff this Bean Class into the BDA's beanClasses,
//as Weld automatically add theses classes to the BDA's bean Classes
+ " and so adding this class as a bean class it to " +
"existing bda: " + bda);
//((BeanDeploymentArchiveImpl)bda).addBeanClass(beanClass.getName());
return bda;
}
//XXX: As of now, we handle one-level. Ideally, a bean deployment
//descriptor is a composite and we should be able to search the tree
//and get the right BDA for the beanClass
if (match) {
//don't stuff this Bean Class into the BDA's beanClasses,
//as Weld automatically add theses classes to the BDA's bean Classes
"An existing BDA has this class "
"class as a bean class to existing bda:" + subBda);
//((BeanDeploymentArchiveImpl)subBda).addBeanClass(beanClass.getName());
return subBda;
}
}
}
}
// If the BDA was not found for the Class, create one and add it
+ beanClass + " not found in the BDAs of this deployment. " +
"Hence creating a new BDA");
+ newBda + "created. Now adding this new BDA to " +
"all root BDAs of this deployment");
}
+ beanClass + " finally returning the " +
"newly created BDA " + newBda);
return newBda;
}
if (simpleServiceRegistry == null) {
}
return simpleServiceRegistry;
}
}
}
return extnList;
}
}
return val;
}
}
public void cleanup() {
}
}
if (libJarBDAs!= null) {
libJarBDAs.clear();
}
if (idToBeanDeploymentArchive != null) {
}
}
// This method creates and returns a List of BeanDeploymentArchives for each
// Weld enabled jar under /lib of an existing Archive.
while (entries.hasMoreElements()) {
try {
}
}
}
} catch (IOException e) {
}
}
}
}
}
while (libJarIterator.hasNext()) {
+ libJarArchive.getName());
if (libJarBDAs == null) {
}
}
}
return libJarBDAs;
}
boolean modified = false;
//loop through the list once more
logger.log(FINE, "DeploymentImpl::ensureEarLibJarVisibility - " + firstBDA.getId() + " being associated with " + otherBDA.getId());
modified = true;
}
}
//update modified BDA
if (modified){
if (idx >= 0) {
}
}
}
}
}