/*
* 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.
*/
/**
* Objects of this kind represent the deployment information describing a single
* Session Ejb : { stateful , stateless, singleton }
*@author Danny Coward
*/
new HashSet<LifecycleCallbackDescriptor>();
new HashSet<LifecycleCallbackDescriptor>();
// For EJB 3.0 stateful session beans, information about the assocation
// between a business method and bean removal.
// For EJB 3.0 stateful session beans with adapted homes, list of
// Holds @StatefulTimeout or stateful-timeout from
// ejb-jar.xml. Only applies to stateful session beans.
// Initialize to "not set"(null) state so annotation processing
// can apply the correct overriding behavior.
/** The Session type String.*/
/** The String to indicate stalessness. */
/** Idicates statefullness of a session ejb.*/
private boolean sessionTypeIsSet = false;
private boolean isStateless = false;
private boolean isStateful = false;
private boolean isSingleton = false;
new ArrayList<AccessTimeoutHolder>();
// Controls eager vs. lazy Singleton initialization
new LocalStringManagerImpl(EjbSessionDescriptor.class);
/**
* Default constructor.
*/
public EjbSessionDescriptor() {
}
/**
* Returns the type of this bean - always "Session".
*/
return TYPE;
}
/**
* Returns the string STATELESS or STATEFUL according as to whether
* the bean is stateless or stateful.
**/
if (this.isStateless()) {
return STATELESS;
} else if( isStateful() ){
return STATEFUL;
} else {
return SINGLETON;
}
}
/**
* Accepts the Strings STATELESS / STATEFUL / SINGLETON
*/
isStateless = true;
isStateful = true;
isSingleton = true;
} else {
if (this.isBoundsChecking()) {
"enterprise.deployment.exceptionsessiontypenotlegaltype",
"{0} is not a legal session type for session ejbs. The type must be {1} or {2}",
}
}
sessionTypeIsSet = true;
return;
}
/**
* Useful for certain annotation / .xml processing. ejb-jar.xml might
* not set <session-type> if it's only being used for sparse overriding.
* @return
*/
public boolean isSessionTypeSet() {
return sessionTypeIsSet;
}
/**
* Sets my type
*/
"enterprise.deployment.exceptioncannotsettypeofsessionbean",
"Cannot set the type of a session bean"));
}
/**
* Sets the transaction type for this bean. Must be either BEAN_TRANSACTION_TYPE or CONTAINER_TRANSACTION_TYPE.
*/
if (!isValidType && this.isBoundsChecking()) {
"enterprise.deployment..exceptointxtypenotlegaltype",
} else {
super.transactionType = transactionType;
super.setMethodContainerTransactions(new Hashtable());
}
}
/**
* Returns true if I am describing a stateless session bean.
*/
public boolean isStateless() {
return isStateless;
}
public boolean isStateful() {
return isStateful;
}
public boolean isSingleton() {
return isSingleton;
}
public boolean hasAsynchronousMethods() {
}
asyncMethods.add(m);
}
}
boolean async = false;
if( (nextMethod != null) &&
async = true;
break;
}
}
return async;
}
}
}
public boolean hasStatefulTimeout() {
return (statefulTimeoutValue != null);
}
return statefulTimeoutValue;
}
return statefulTimeoutUnit;
}
public boolean hasRemoveMethods() {
return (!removeMethods.isEmpty());
}
/**
* @return remove method info for the given method or null if the
* given method is not a remove method for this stateful session bean.
*/
// first try to find the exact match
}
}
// if nothing is found, try to find the loose match
}
}
return null;
}
}
}
public boolean hasInitMethods() {
return (!initMethods.isEmpty());
}
}
}
if (postActivateDescs == null) {
new HashSet<LifecycleCallbackDescriptor>();
}
return postActivateDescs;
}
boolean found = false;
for (LifecycleCallbackDescriptor next :
found = true;
break;
}
}
if (!found) {
}
}
public LifecycleCallbackDescriptor
for (LifecycleCallbackDescriptor next :
return next;
}
}
return null;
}
public boolean hasPostActivateMethod() {
}
if (prePassivateDescs == null) {
new HashSet<LifecycleCallbackDescriptor>();
}
return prePassivateDescs;
}
boolean found = false;
for (LifecycleCallbackDescriptor next :
found = true;
break;
}
}
if (!found) {
}
}
public LifecycleCallbackDescriptor
for (LifecycleCallbackDescriptor next :
return next;
}
}
return null;
}
public boolean hasPrePassivateMethod() {
}
// Session beans that implement SessionSynchronization interface
// have a limited set of possible transaction attributes.
if( isStateful() ) {
try {
AnnotationTypesProvider provider = Globals.getDefaultHabitat().getComponent(AnnotationTypesProvider.class, "EJB");
txAttributes = new Vector();
}
}
} catch(Exception e) {
// Don't treat this as a fatal error. Just return full
// set of possible transaction attributes.
}
}
return txAttributes;
}
afterBeginMethod = m;
}
}
}
/**
* Set the Method annotated @AfterBegin.
*/
if( afterBeginMethod == null) {
afterBeginMethod = m;
}
}
/**
* Returns the Method annotated @AfterBegin.
*/
return afterBeginMethod;
}
/**
* Set the Method annotated @BeforeCompletion.
*/
if( beforeCompletionMethod == null ) {
}
}
/**
* Returns the Method annotated @AfterBegin.
*/
return beforeCompletionMethod;
}
/**
* Set the Method annotated @AfterCompletion.
*/
if( afterCompletionMethod == null ) {
}
}
/**
* Returns the Method annotated @AfterCompletion.
*/
return afterCompletionMethod;
}
public boolean getInitOnStartup() {
}
}
if( initOnStartup == null ) {
}
}
return dependsOn;
}
public boolean hasDependsOn() {
}
}
if( !hasDependsOn() ) {
}
}
}
public boolean hasContainerManagedConcurrency() {
}
public boolean hasBeanManagedConcurrency() {
}
}
if( concurrencyManagementType == null) {
}
}
// and access timeout are optional.
if( concMethod.hasLockMetadata()) {
if( concMethod.isWriteLocked()) {
} else {
}
}
if( concMethod.hasAccessTimeout() ) {
}
}
}
}
}
}
return readAndWriteLockMethods;
}
}
}
return methods;
}
}
return all;
}
/**
* Returns a formatted String of the attributes of this object.
*/
super.print(toStringBuffer);
}
/**
* Return the fully-qualified portable JNDI name for a given
* client view (Remote, Local, or no-interface).
*/
}
}
return javaGlobalPrefix.toString();
}
public static class AccessTimeoutHolder {
value = v;
unit = u;
method = m;
}
public long value;
}
public enum ConcurrencyManagementType {
Bean,
}
}