javaee / ejb-spec

See javax.ejb project for API. Contains legacy issues only.
https://github.com/javaee/javax.ejb
6 stars 1 forks source link

Add new method-intf type to deployment descriptor for transactional lifecycle interceptors #49

Closed glassfishrobot closed 12 years ago

glassfishrobot commented 12 years ago

Given that lifecycle callbacks of singleton and stateful bean interceptors can now run within container managed transactions, I think we need to add a new method-intf type to the possible values of the container-transaction->method definition in the DD. The current values do not provide the ability to specifically target transaction attributes to this style of interceptor via the DD. The name "LifecycleInterceptor" seems a good fit. Thoughts?

I've seen at least one location in Javadoc that provides the list of possible meta-inf values, so at least one, maybe more, updates would be needed there as well.

Affected Versions

[3.2]

glassfishrobot commented 12 years ago

Reported by jrbauer

glassfishrobot commented 12 years ago

mvatkina said: It's possible to use the current DD:

com.acme.SFSB destroy

...

SFSB destroy RequiresNew

How would the new element look like?

glassfishrobot commented 12 years ago

jrbauer said: The new value I'm proposing is primarily for consistency. The only addition would be a new enumeration value in method-intfType in the xsd. For example, for timer methods we provide a Timer method-intfType with description - "Timer refers to the bean's timeout callback methods."

I'm proposing we add - LifecycleInterceptor with description ~ "LifecycleInterceptor refers to the bean's lifecycle interceptor methods."

Example:

MySession LifecycleInterceptor preDestroy RequiresNew
glassfishrobot commented 12 years ago

jrbauer said: To further clarify -

In particular, the new method-intf type would be useful with wild-carding since it let's you scope to a specific interface type. For example, to set NotSupported for the lifecycle methods without affecting other interfaces:

MySession LifecycleInterceptor * NotSupported
glassfishrobot commented 12 years ago

mvatkina said: The changes checked into what eventually becomes the xsd file: https://svn.java.net/svn/glassfish~svn/trunk/schemas/javaee7/src/ejb-jar_3_2.xsds

glassfishrobot commented 12 years ago

Was assigned to mvatkina

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA EJB_SPEC-49

glassfishrobot commented 12 years ago

Marked as fixed on Thursday, July 5th 2012, 1:38:09 pm