/*
* 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.
*/
implements PostConstruct, EventListener {
HttpSessionListener.class, ServletRequestListener.class
// TODO need to add more classes
};
}
public void postConstruct() {
}
/**
* Specific stages of the Weld bootstrapping process will execute across different stages
* of the deployment process. Weld deployment will happen when the load phase of the
* deployment process is complete. When all modules have been loaded, a deployment
* graph is produced defining the accessiblity relationships between
* <code>BeanDeploymentArchive</code>s.
*/
WeldBootstrap.class);
WELD_DEPLOYMENT, DeploymentImpl.class);
}
}
//get Current TCL
try {
bootstrap.startContainer(Environments.SERVLET, deploymentImpl/*, new ConcurrentHashMapBeanStore()*/);
} catch (Throwable t) {
throw(de);
} finally {
//The TCL is originally the EAR classloader
//and is reset during Bean deployment to the
//corresponding module classloader in BeanDeploymentArchiveImpl.getBeans
//for Bean classloading to succeed. The TCL is reset
//to its old value here.
}
}
WeldBootstrap.class);
try {
} catch (Throwable t) {
throw(de);
}
}
}
}
}
return;
}
WeldBootstrap.class);
try {
} catch(Exception e) {
}
}
WELD_DEPLOYMENT, DeploymentImpl.class);
if (deploymentImpl != null) {
}
}
}
/*
* We are only firing ProcessInjectionTarget<X> for non-contextual EE
* components and not using the InjectionTarget<X> from the event during
* instance creation in JCDIServiceImpl.java
* TODO weld would provide a better way to do this, otherwise we may need
* TODO to store InjectionTarget<X> to be used in instance creation
*/
boolean isFullProfile = false;
//Web-Profile and other lighter distributions would not ship the JMS
//API and implementations. So, the weld-integration layer cannot
//have a direct dependency on the JMS API
try {
loadClass("javax.jms.MessageListener");
"need to fire PIT events to MDBs");
}
isFullProfile = true;
} catch (ClassNotFoundException cnfe){
//ignore cnfe
isFullProfile = false;
}
}
}
//For distributions that have the JMS API, an MDB is a valid
//non-contextual EE component to which we have to
//fire <code>ProcessInjectionTarget</code>
//events (see GLASSFISH-16730)
if (isFullProfile) {
"to fire a PIT event to it");
}
}
}
}
}
}
//Fix for issue GLASSFISH-17464
//The PIT event should not be fired for interfaces
if(bdaClazz.isInterface()){
return;
}
}
}
}
}
}
}
return null;
}
/**
* Processing in this method is performed for each module that is in the process of being
* loaded by the container. This method will collect information from each archive (module)
* and produce <code>BeanDeploymentArchive</code> information for each module.
* The <code>BeanDeploymentArchive</code>s are stored in the <code>Deployment</code>
* (that will eventually be handed off to <code>Weld</code>. Once this method is called
* for all modules (and <code>BeanDeploymentArchive</code> information has been collected
* for all <code>Weld</code> modules), a relationship structure is produced defining the
* accessiblity rules for the <code>BeanDeploymentArchive</code>s.
*/
// See if a WeldBootsrap has already been created - only want one per app.
WeldBootstrap.class);
bootstrap = new WeldBootstrap();
// Stash the WeldBootstrap instance, so we may access the WeldManager later..
}
}
// Check if we already have a Deployment
WELD_DEPLOYMENT, DeploymentImpl.class);
// Create a Deployment Collecting Information From The ReadableArchive (archive)
if (deploymentImpl == null) {
// Add services
} else {
}
// EJB Services is registered as a top-level service
}
// Add the Weld Listener if it does not already exist..
// Add Weld Context Listener - this listener will ensure the WeldELContextListener is used
// for JSP's..
}
// Register EE injection manager at the bean deployment archive level.
// We use the generic InjectionService service to handle all EE-style
// injection instead of the per-dependency-type InjectionPoint approach.
// Each InjectionServicesImpl instance knows its associated GlassFish bundle.
}
}
}
}
}
// Stash the WeldBootstrap instance, so we may access the WeldManager later..
//context.addTransientAppMetaData(WELD_BOOTSTRAP, bootstrap);
return wbApp;
}
Collection<EjbBundleDescriptor> ejbBundles = wDesc.getExtensionsDescriptors(EjbBundleDescriptor.class);
}
}
}
return ejbBundle;
}
}