// always creates a new ArrayList
InvocationArray result = new InvocationArray();
InvocationArray v = (InvocationArray) parentValue;
if (v.size() > 0 && v.outsideStartup()) {
// get current invocation
ComponentInvocation parentInv =
(ComponentInvocation) v.get(v.size()-1);
if (parentInv.getInvocationType() ==
parentInv.SERVLET_INVOCATION) {
ComponentInvocation inv =
new ComponentInvocation(null,
parentInv.getContainerContext());
result.add(inv);
} else if (parentInv.getInvocationType() != parentInv.EJB_INVOCATION) {
// Push a copy of invocation onto the new result ArrayList
ComponentInvocation cpy =
new ComponentInvocation
( parentInv.getInstance(),
parentInv.getContainerContext());
cpy.setTransaction (parentInv.getTransaction());
result.add(cpy);
}
}
return result;