First Commit from Source Code Reply

This commit is contained in:
vincenzofariello
2024-05-09 17:40:24 +02:00
parent 11e3b57c5b
commit 107a016cb9
35225 changed files with 1111346 additions and 1 deletions

View File

@@ -0,0 +1,263 @@
@start rule: main
/**
* This code was automatically generated at @time on @date
* by @generator -- do not edit.
*
* @@version @buildString
* @@author Copyright (c) @year by BEA Systems, Inc. All Rights Reserved.
*/
@packageStatement
import weblogic.ejb.container.internal.ExtendedPersistenceContextWrapper;
import java.io.IOException;
public final class @simple_beanimpl_class_name
extends @simple_bean_class_name
implements @wlBeanInterface_name,
@simple_beanimpl_interface_name
{
@declareBeanStateVar
private int __WL_method_state;
private boolean __WL_busy = false;
private boolean __WL_isLocal = false;
private boolean __WL_needsRemove;
private boolean __WL_creatorOfTx;
private javax.ejb.EJBContext __WL_EJBContext;
private javax.transaction.Transaction __WL_bmtx;
private Object __WL_loadUser;
public @simple_beanimpl_class_name() @ctor_throws_clause {}
public boolean __WL_isBusy() { return __WL_busy; }
public void __WL_setBusy(boolean b) { __WL_busy = b; }
public boolean __WL_getIsLocal() { return __WL_isLocal; }
public void __WL_setIsLocal(boolean b) { __WL_isLocal = b; }
public javax.transaction.Transaction __WL_getBeanManagedTransaction() {
return __WL_bmtx;
}
public void __WL_setBeanManagedTransaction(javax.transaction.Transaction tx) {
__WL_bmtx = tx;
}
public javax.ejb.EJBContext __WL_getEJBContext() { return __WL_EJBContext; }
public void __WL_setEJBContext(javax.ejb.EJBContext ctx) {
__WL_EJBContext = ctx;
}
public int __WL_getMethodState() { return __WL_method_state; }
public void __WL_setMethodState(int state) { __WL_method_state = state; }
public boolean __WL_needsRemove() { return __WL_needsRemove; }
public void __WL_setNeedsRemove(boolean b) { __WL_needsRemove = b; }
public void __WL_setLoadUser(Object o) { __WL_loadUser = o;}
public Object __WL_getLoadUser() { return __WL_loadUser; }
public void __WL_setCreatorOfTx (boolean b) { __WL_creatorOfTx = b; }
public boolean __WL_isCreatorOfTx() { return __WL_creatorOfTx; }
@perhapsDeclareBeanStateValidAccessors
@wl_entitybean_fields
@ejb_callbacks
@bean_postcreate_methods
// create, find, remove, EJB 2.0 home methods
@bean_home_methods
@wl_entitybean_methods
}
@end rule: main
@start rule: common_ejb_callbacks
public void ejbActivate()
@activate_throws_clause
{
int oldState = __WL_method_state;
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(this);
__WL_method_state = STATE_EJB_ACTIVATE;
super.ejbActivate();
} finally {
__WL_method_state = oldState;
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
}
public void ejbPassivate()
@passivate_throws_clause
{
int oldState = __WL_method_state;
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(this);
__WL_method_state = STATE_EJB_PASSIVATE;
super.ejbPassivate();
} finally {
__WL_method_state = oldState;
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
}
public void ejbRemove()
@remove_throws_clause
{
int oldState = __WL_method_state;
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(this);
__WL_method_state = STATE_EJB_REMOVE;
super.ejbRemove();
} finally {
__WL_method_state = oldState;
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
}
@end rule: common_ejb_callbacks
@start rule: entity_callbacks
public void setEntityContext(javax.ejb.EntityContext ctx)
@setentitycontext_throws_clause
{
int oldState = __WL_method_state;
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(this);
__WL_method_state = STATE_SET_CONTEXT;
super.setEntityContext(ctx);
} finally {
__WL_method_state = oldState;
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
}
public void unsetEntityContext()
@unsetentitycontext_throws_clause
{
int oldState = __WL_method_state;
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(this);
__WL_method_state = STATE_UNSET_CONTEXT;
super.unsetEntityContext();
} finally {
__WL_method_state = oldState;
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
}
public void ejbLoad()
@ejbload_throws_clause
{
int oldState = __WL_method_state;
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(this);
__WL_method_state = STATE_EJBLOAD;
super.ejbLoad();
@perhapsSetLastLoadTime
} finally {
__WL_method_state = oldState;
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
}
public void ejbStore()
@ejbstore_throws_clause
{
int oldState = __WL_method_state;
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(this);
__WL_method_state = STATE_EJBSTORE;
super.ejbStore();
} finally {
__WL_method_state = oldState;
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
}
@end rule: entity_callbacks
@start rule: home_method
@method_signature_no_throws
@beanmethod_throws_clause
{
int oldState = __WL_method_state;
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(this);
__WL_method_state = @method_state;
@perhaps_return super.@method_name(@method_parameters_without_types);
} finally {
__WL_method_state = oldState;
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
}
@end rule: home_method
@start rule: wl_entitybean_fields_code
private boolean __WL_operationsComplete = false;
@end rule: wl_entitybean_fields_code
@start rule: wl_entitybean_methods_code
public void __WL_setOperationsComplete(boolean b) {
__WL_operationsComplete = b;
}
public boolean __WL_getOperationsComplete() {
return __WL_operationsComplete;
}
@end rule: wl_entitybean_methods_code
@start rule: bean_state_valid_accessors
public void __WL_setBeanStateValid(boolean valid) {
@setBeanStateValidMethodBody
}
public boolean __WL_isBeanStateValid() {
@isBeanStateValidMethodBody
}
public void __WL_setLastLoadTime(long time) {
@perhapsSetLastLoadTimeMethodBody
}
public long __WL_getLastLoadTime() {
@perhapsGetLastLoadTimeMethodBody
}
@end rule: bean_state_valid_accessors
@start rule: bean_state_timeout_check
long lastLoadTime = __WL_lastLoadTime.get();
if(lastLoadTime != 0) {
if(__WL_readTimeoutMS == 0 ||
System.currentTimeMillis() - lastLoadTime < __WL_readTimeoutMS)
return true;
}
return false;
@end rule: bean_state_timeout_check

View File

@@ -0,0 +1,21 @@
@start rule: main
/**
* This code was automatically generated at @time on @date
* by @generator -- do not edit.
*
* @@version @buildString
* @@author Copyright (c) @year by BEA Systems, Inc. All Rights Reserved.
*/
@packageStatement
import weblogic.ejb.container.interfaces.WLEnterpriseBean;
public interface @simple_beanimpl_interface_name
extends WLEnterpriseBean@extendsCMPBean
{
@declare_bean_interface_methods
}
@end rule: main

View File

@@ -0,0 +1,143 @@
@start rule: main
/**
* This code was automatically generated at @time on @date
* by @generator -- do not edit.
*
* @@version @buildString
* @@author Copyright (c) @year by BEA Systems, Inc. All Rights Reserved.
*/
@packageStatement
import javax.ejb.EJBException;
import weblogic.ejb20.interfaces.LocalHandle;
import weblogic.ejb.container.interfaces.WLEnterpriseBean;
public final class @simple_eloimpl_class_name
extends @extends_local_type
implements @local_interface_name, weblogic.utils.PlatformConstants, java.io.Serializable,
weblogic.ejb.EJBLocalObject
{
@declare_static_elo_method_descriptors
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_remove;
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_getEJBLocalHome;
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_getLocalHandle;
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_getPrimaryKey;
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_isIdentical_javax_ejb_EJBLocalObject;
public @simple_eloimpl_class_name() {}
@local_interface_methods
public void remove() throws javax.ejb.RemoveException {
super.remove(md_eo_remove);
}
public javax.ejb.EJBLocalHome getEJBLocalHome() throws EJBException {
return super.getEJBLocalHome(md_eo_getEJBLocalHome);
}
public LocalHandle getLocalHandle() throws EJBException {
return super.getLocalHandle(md_eo_getLocalHandle);
}
public Object getPrimaryKey() throws EJBException {
return super.getPrimaryKey(md_eo_getPrimaryKey);
}
public boolean isIdentical(javax.ejb.EJBLocalObject o) throws EJBException {
return super.isIdentical(md_eo_isIdentical_javax_ejb_EJBLocalObject, o);
}
private void writeObject(java.io.ObjectOutputStream out)
throws java.io.IOException
{
throw new javax.ejb.EJBException(
"Attempt to pass a reference to an EJBLocalObject to a remote " +
"client. A local EJB component may only be accessed by clients " +
"co-located in the same ear or standalone jar file.");
}
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException, java.lang.ClassNotFoundException
{
// this method is never called
throw new javax.ejb.EJBException(
"Attempt to pass a reference to an EJBLocalObject to a remote " +
"client. A local EJB component may only be accessed by clients " +
"co-located in the same ear or standalone jar file.");
}
public void operationsComplete() {
super.operationsComplete();
}
}
@end rule: main
@start rule: local_interface_method
@method_signature
{
java.lang.Throwable __ee = null;
weblogic.ejb.container.internal.InvocationWrapper __wrap = null;
weblogic.ejb.container.internal.MethodDescriptor __md = md_eo_@method_sig;
__wrap = super.__WL_preInvoke@perhapsLite(
__md, new weblogic.ejb.container.internal.EJBContextHandler(
__md, @method_parameters_in_array));
@declare_result
boolean doTxRetry = false;
do {
@simple_beanimpl_interface_name __bean = (@simple_beanimpl_interface_name) __wrap.getBean();
int __oldState = __bean.__WL_getMethodState();
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(__bean);
__bean.__WL_setMethodState(WLEnterpriseBean.STATE_BUSINESS_METHOD);
@result __bean.@method_name(@method_parameters_without_types);
@checkExistsOnMethod
} catch (java.lang.Throwable t) {
__ee = t;
} finally {
__bean.__WL_setMethodState(__oldState);
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
try {
// Here is where we try to commit if it's our TX
doTxRetry = super.__WL_postInvokeTxRetry(__wrap, __ee);
} catch (java.lang.Throwable t) {
__ee = t;
doTxRetry = false; // do not attempt any Tx Retry if we encountered
// an exception while attempting __WL_postInvokeTxRetry
// instead go directly to __WL_postInvokeCleanup
}
} while (doTxRetry);
// __WL_postInvokeCleanup must *always* be done if __WL_preInvoke succeeded
try {
super.__WL_postInvokeCleanup@perhapsLite(__wrap, __ee);
} catch (java.lang.Exception e) {
if (e instanceof javax.ejb.EJBException) {
throw (javax.ejb.EJBException) e;
}
@enum_exceptions
else {
throw new javax.ejb.EJBException("Unexpected exception in " +
"@ejb_class_name.@method_name():" + EOL +
weblogic.utils.StackTraceUtils.throwable2StackTrace(e), e);
}
}
@return_result
}
@end rule: local_interface_method

View File

@@ -0,0 +1,143 @@
@start rule: main
/**
* This code was automatically generated at @time on @date
* by @generator -- do not edit.
*
* @@version @buildString
* @@author Copyright (c) @year by BEA Systems, Inc. All Rights Reserved.
*/
@packageStatement
import weblogic.ejb.container.interfaces.WLEnterpriseBean;
public final class @simple_eoimpl_class_name
extends @extends_type
implements @remote_interface_name,
weblogic.utils.PlatformConstants, weblogic.ejb.EJBObject
{
@declare_static_eo_method_descriptors
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_remove;
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_getEJBHome;
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_getHandle;
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_getPrimaryKey;
public static weblogic.ejb.container.internal.MethodDescriptor md_eo_isIdentical_javax_ejb_EJBObject;
public @simple_eoimpl_class_name() {}
@remote_interface_methods
public void remove()
throws javax.ejb.RemoveException, java.rmi.RemoteException
{
super.remove(md_eo_remove);
}
public javax.ejb.EJBHome getEJBHome()
throws java.rmi.RemoteException
{
return super.getEJBHome(md_eo_getEJBHome);
}
public javax.ejb.Handle getHandle()
throws java.rmi.RemoteException
{
return super.getHandle(md_eo_getHandle);
}
public Object getPrimaryKey()
throws java.rmi.RemoteException
{
return super.getPrimaryKey(md_eo_getPrimaryKey);
}
public boolean isIdentical(javax.ejb.EJBObject o)
throws java.rmi.RemoteException
{
return super.isIdentical(md_eo_isIdentical_javax_ejb_EJBObject, o);
}
public void operationsComplete() {
super.operationsComplete();
}
}
@end rule: main
@start rule: remote_interface_method
@method_signature
{
java.lang.Throwable __ee = null;
weblogic.ejb.container.internal.InvocationWrapper __wrap;
weblogic.ejb.container.internal.MethodDescriptor __md =
md_eo_@method_sig;
__wrap = super.__WL_preInvoke(
__md, new weblogic.ejb.container.internal.EJBContextHandler(
__md, @method_parameters_in_array));
@declare_result
boolean doTxRetry = false;
do {
@simple_beanimpl_interface_name __bean = (@simple_beanimpl_interface_name) __wrap.getBean();
int __oldState = __bean.__WL_getMethodState();
try {
weblogic.ejb.container.internal.AllowedMethodsHelper.pushBean(__bean);
__bean.__WL_setMethodState(WLEnterpriseBean.STATE_BUSINESS_METHOD);
@result __bean.@method_name(@method_parameters_without_types);
@checkExistsOnMethod
} catch (java.lang.Throwable t) {
__ee = t;
}
finally {
__bean.__WL_setMethodState(__oldState);
weblogic.ejb.container.internal.AllowedMethodsHelper.popBean();
}
try {
// Here is where we try to commit if it's our TX
doTxRetry = super.__WL_postInvokeTxRetry(__wrap, __ee);
} catch (java.lang.Throwable t) {
__ee = t;
doTxRetry = false; // do not attempt any Tx Retry if we encountered
// an exception while attempting __WL_postInvokeTxRetry
// instead go directly to __WL_postInvokeCleanup
}
} while (doTxRetry);
// __WL_postInvokeCleanup must *always* be done
// if __WL_preInvoke succeeded
try {
super.__WL_postInvokeCleanup(__wrap, __ee);
} catch (java.lang.Exception e) {
if (e instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)e;
}
@enum_exceptions
else {
throw new java.rmi.UnexpectedException("Unexpected exception in " +
"@ejb_class_name.@method_name():" + EOL +
weblogic.utils.StackTraceUtils.throwable2StackTrace(e), e);
}
}
@return_result
}
@end rule: remote_interface_method

View File

@@ -0,0 +1,216 @@
@start rule: main
/**
* This code was automatically generated at @time on @date
* by @generator -- do not edit.
*
* @@version @buildString
* @@author Copyright (c) @year by BEA Systems, Inc. All Rights Reserved.
*/
@packageStatement
import javax.ejb.EJBMetaData;
import weblogic.ejb.container.interfaces.WLEnterpriseBean;
public final class @simple_home_class_name
extends @home_superclass_name
implements @home_interface_name, weblogic.utils.PlatformConstants
@invalidation_interface_name @dynamic_query_interface_name
{
@declare_create_method_descriptors
@declare_find_method_descriptors
@declare_create_methods
@declare_home_method_descriptors
public weblogic.ejb.container.internal.MethodDescriptor md_ejbRemove_javax_ejb_Handle;
public weblogic.ejb.container.internal.MethodDescriptor md_ejbRemove_O;
public weblogic.ejb.container.internal.MethodDescriptor md_getEJBMetaData;
public weblogic.ejb.container.internal.MethodDescriptor md_getHomeHandle;
@perhaps_initialize_create_methods
public @simple_home_class_name() {
super(@simple_eoimpl_class_name.class);
}
@create_methods
@find_methods
@home_methods
public EJBMetaData getEJBMetaData()
throws java.rmi.RemoteException
{
return super.getEJBMetaData(md_getEJBMetaData);
}
public javax.ejb.HomeHandle getHomeHandle()
throws java.rmi.RemoteException
{
return super.getHomeHandle(md_getHomeHandle);
}
public void remove(java.lang.Object pk)
throws java.rmi.RemoteException, javax.ejb.RemoveException
{
super.remove(md_ejbRemove_O, pk);
}
public void remove(javax.ejb.Handle h)
throws java.rmi.RemoteException, javax.ejb.RemoveException
{
super.remove(md_ejbRemove_javax_ejb_Handle, h);
}
}
@end rule: main
@start rule: declare_create_method
private static final java.lang.reflect.Method mth_@method_sig;
@end rule: declare_create_method
@start rule: declare_postCreate_method
private static final java.lang.reflect.Method mth_post@method_sig;
@end rule: declare_postCreate_method
@start rule: declare_home_method_descriptor
public weblogic.ejb.container.internal.MethodDescriptor md_@method_sig;
@end rule: declare_home_method_descriptor
@start rule: initialize_create_method
mth_@method_sig = @simple_beanimpl_interface_name.class.getMethod(
"@create_method_name", @method_types_as_array);
@end rule: initialize_create_method
@start rule: initialize_postCreate_method
mth_post@method_sig = @simple_beanimpl_interface_name.class.getMethod(
"@postCreate_method_name", @method_types_as_array);
@end rule: initialize_postCreate_method
@start rule: static_block_to_init_create_methods
static {
try {
@initialize_create_methods
} catch (Exception e) {
throw new AssertionError("Unable to find expected "+
"methods. Please check your classpath for stale versions of "+
"your ejb classes and re-run weblogic.ejbc.\n"+
"If this is a java.io.FilePermission exception and you are "+
"running under JACC security, then check your security policy file.\n"+
" Exception: '"+
e.getMessage()+"'");
}
}
@end rule: static_block_to_init_create_methods
@start rule: home_method_body
java.lang.Throwable ee = null;
weblogic.ejb.container.internal.InvocationWrapper wrap =
super.@pre_home_invoke_method(md_@method_sig);
@declare_result
int nextTxRetryCount = super.getRetryOnRollbackCount(wrap);
do {
@simple_beanimpl_interface_name bean = (@simple_beanimpl_interface_name)wrap.getBean();
int oldState = bean.__WL_getMethodState();
try {
bean.__WL_setMethodState(WLEnterpriseBean.STATE_EJBHOME);
@result bean.ejbHome@capitalized_method_name(@method_parameters_without_types);
} catch (java.lang.Throwable t) {
ee = t;
}
finally {
bean.__WL_setMethodState(oldState);
}
try {
// Here is where we try to commit if it's our TX
nextTxRetryCount = super.postEntityHomeInvokeTxRetry(wrap, ee, nextTxRetryCount);
} catch (java.lang.Throwable t) {
ee = t;
// do not attempt any Tx Retry if we encountered
// an exception while attempting postInvokeTxRetry
// instead go directly to postInvokeCleanup
nextTxRetryCount = -1;
}
} while (nextTxRetryCount >= 0);
try {
super.postEntityHomeInvokeCleanup(wrap, ee);
} catch (java.lang.Exception e) {
if (e instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)e;
}
@enum_exceptions
else {
throw new java.rmi.UnexpectedException("Unexpected exception in " +
"@home_class_name.@method_name():" + EOL +
weblogic.utils.StackTraceUtils.throwable2StackTrace(e), e);
}
}
@return_result
@end rule: home_method_body
@start rule: create_method_en
public @remote_interface_name @method_name (@method_parameters)
@method_throws_clause
{
try {
return (@remote_interface_name) super.create(md_@method_sig,
mth_@method_sig, mth_post@method_sig,
@method_parameters_in_array);
} catch (java.lang.Exception e) {
if (e instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)e;
}
@enum_exceptions
else {
throw new javax.ejb.CreateException ("Error while creating bean: " +
e.toString());
}
}
}
@end rule: create_method_en
@start rule: finder
public @method_return @method_name(@method_parameters)
@method_throws_clause
{
try {
return (@method_return)
super.@finder_name(md_@method_sig, @finder_parameters @optional_finder_type);
} catch (java.lang.Exception e) {
if (e instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException)e;
}
@enum_exceptions
else {
throw new javax.ejb.FinderException ("Error while finding bean: " +
e.toString());
}
}
}
@end rule: finder

View File

@@ -0,0 +1,214 @@
@start rule: main
/**
* This code was automatically generated at @time on @date
* by @generator -- do not edit.
*
* @@version @buildString
* @@author Copyright (c) @year by BEA Systems, Inc. All Rights Reserved.
*/
@packageStatement
import javax.ejb.EJBException;
import weblogic.ejb20.interfaces.LocalHomeHandle;
import weblogic.ejb.container.interfaces.WLEnterpriseBean;
public final class @simple_local_home_class_name
extends @local_home_superclass_name
implements @local_home_interface_name, weblogic.utils.PlatformConstants
@local_invalidation_interface_name
@dynamic_query_local_interface_name
{
@declare_local_create_method_descriptors
@declare_local_find_method_descriptors
@declare_local_create_methods
@declare_local_home_method_descriptors
public weblogic.ejb.container.internal.MethodDescriptor md_ejbRemove_O;
public weblogic.ejb.container.internal.MethodDescriptor md_getLocalHomeHandle;
@perhaps_initialize_local_create_methods
public @simple_local_home_class_name() {
super(@simple_eloimpl_class_name.class);
}
@local_create_methods
@local_find_methods
@local_home_methods
public LocalHomeHandle getLocalHomeHandle() throws EJBException {
return super.getLocalHomeHandle(md_getLocalHomeHandle);
}
public void remove(java.lang.Object pk) throws javax.ejb.RemoveException {
super.remove(md_ejbRemove_O, pk);
}
}
@end rule: main
@start rule: declare_create_method
private static final java.lang.reflect.Method mth_@method_sig;
@end rule: declare_create_method
@start rule: declare_postCreate_method
private static final java.lang.reflect.Method mth_post@method_sig;
@end rule: declare_postCreate_method
@start rule: declare_home_method_descriptor
public weblogic.ejb.container.internal.MethodDescriptor md_@method_sig;
@end rule: declare_home_method_descriptor
@start rule: initialize_ejbcreate_method
mth_@method_sig = @ejbcreate_method_owner.class.getMethod(
"@create_method_name", @method_types_as_array);
@end rule: initialize_ejbcreate_method
@start rule: initialize_ejbpostcreate_method
mth_post@method_sig = @simple_beanimpl_interface_name.class.getMethod(
"@postCreate_method_name", @method_types_as_array);
@end rule: initialize_ejbpostcreate_method
@start rule: initialize_create_method
mth_@method_sig = @simple_beanimpl_interface_name.class.getMethod(
"@create_method_name", @method_types_as_array);
@end rule: initialize_create_method
@start rule: initialize_postCreate_method
mth_post@method_sig = @simple_beanimpl_interface_name.class.getMethod(
"@postCreate_method_name", @method_types_as_array);
@end rule: initialize_postCreate_method
@start rule: static_block_to_init_create_methods
static {
try {
@initialize_local_create_methods
} catch (Exception e) {
throw new AssertionError("Unable to find expected "+
"methods. Please check your classpath for stale versions of "+
"your ejb classes and re-run weblogic.ejbc.\n"+
"If this is a java.io.FilePermission exception and you are "+
"running under JACC security, then check your security policy file.\n"+
" Exception: '"+
e.getMessage()+"'");
}
}
@end rule: static_block_to_init_create_methods
@start rule: home_method_body
java.lang.Throwable ee = null;
weblogic.ejb.container.internal.InvocationWrapper wrap =
super.@pre_home_invoke_method(md_@method_sig);
@declare_result
int nextTxRetryCount = super.getRetryOnRollbackCount(wrap);
do {
@simple_beanimpl_interface_name bean = (@simple_beanimpl_interface_name)wrap.getBean();
int oldState = bean.__WL_getMethodState();
try {
bean.__WL_setMethodState(WLEnterpriseBean.STATE_EJBHOME);
@result bean.ejbHome@capitalized_method_name(@method_parameters_without_types);
} catch (java.lang.Throwable t) {
ee = t;
}
finally {
bean.__WL_setMethodState(oldState);
}
try {
// Here is where we try to commit if it's our TX
nextTxRetryCount = super.postEntityHomeInvokeTxRetry(wrap, ee, nextTxRetryCount);
} catch (java.lang.Throwable t) {
ee = t;
// do not attempt any Tx Retry if we encountered
// an exception while attempting postInvokeTxRetry
// instead go directly to postInvokeCleanup
nextTxRetryCount = -1;
}
} while (nextTxRetryCount >= 0);
try {
super.postEntityHomeInvokeCleanup(wrap, ee);
} catch (java.lang.Exception e) {
if (e instanceof javax.ejb.EJBException) {
throw (javax.ejb.EJBException)e;
}
@enum_exceptions
else {
throw new javax.ejb.EJBException("Unexpected exception in " +
"@ejb_class_name.@method_name():" + EOL +
weblogic.utils.StackTraceUtils.throwable2StackTrace(e), e);
}
}
@return_result
@end rule: home_method_body
@start rule: create_method_en
public @local_interface_name @method_name (@method_parameters)
@method_throws_clause
{
try {
return (@local_interface_name) super.create(md_@method_sig,
mth_@method_sig, mth_post@method_sig,
@method_parameters_in_array);
} catch (java.lang.Exception e) {
if (e instanceof javax.ejb.EJBException) {
throw (javax.ejb.EJBException)e;
}
@enum_exceptions
else {
throw new javax.ejb.CreateException ("Error while creating bean: " +
e.toString());
}
}
}
@end rule: create_method_en
@start rule: finder
public @method_return @method_name(@method_parameters)
@method_throws_clause
{
try {
return (@method_return)
super.@finder_name(md_@method_sig, @finder_parameters @optional_finder_type);
} catch (java.lang.Exception e) {
if (e instanceof javax.ejb.EJBException) {
throw (javax.ejb.EJBException)e;
}
@enum_exceptions
else {
throw new javax.ejb.FinderException ("Error while finding bean: " +
e.toString());
}
}
}
@end rule: finder