Hey,
My use case is: some components from my enterprise application will be
marked as transactional. Throught qdox or xjavadoc we'll collection these
information and generate a .meta or something:
/**
* @transaction.aware
*/
public class HailToTheThiefImpl implements HailToTheThief
{
/**
* @transaction.support type="required"
*/
public void Hail1()
{
}
/**
* @transaction.support type="requiresnew"
*/
public void Hail2()
{
}
}
The best option is to not complicate even more the life from ours
developers, so if they just obtain a instance of this class throught lookup
a proxy will be returned and this proxy knows how to "read" and understand
this transactional configuration.
I didn't think twice: lifecycle extensions! So I explored a little the
lifecycle extension support in fortress and got a bit disappointed :-\
- There is a no extension for each method call - ok, this will be a
performance killer, but fortress already returns a proxy for each lookup.
- The current lifecycle extensions phases are creation and accessor (when
the container lookups). That would be enough if I could return my own
instance that should be returned to the client, but I can't do that:
/**
* Retrieve the object and execute access extensions.
*
* @return the object
* @throws Exception if unable to aquire object
*/
public Object get() throws Exception
{
final Object object = m_componentHandler.get();
m_extManager.executeAccessExtensions( object, m_context );
return object;
}
My proposal is change this to:
/**
* Retrieve the object and execute access extensions.
*
* @return the object
* @throws Exception if unable to aquire object
*/
public Object get() throws Exception
{
Object object = m_componentHandler.get();
Object newobject = m_extManager.executeAccessExtensions( object,
m_context );
return (newobject == null) ? object : newobject;
}
Or add an new phase just to allow the extension developer to switch
instances... But then'll have to find out a new verb to this :-)
How do you like that?
Can I go through a painless vote process? ;-)
--
hammett
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]