Hi all,
I made a component to make the integration between Tapestry and EJB3
session beans a lot better.
The problem I was running into was that the EJBProxyFactory, already
present, is only working for EJB2 and it didn't support
statefulSessionBeans.
My component uses annotations so the only thing to do is place the
annotation above the getter and the component does the rest. More
details further on.
However I'm not that experienced with Tapestry or EJB3. I'm currently
trying to figure out if Tapestry is the thing for me (because I didn't
like JSF).
There are still some remarks about the error handling, i don't think it
is pretty right now but I don't know how to integrate it better. I hope
you could help me with this.
Actually the big question is:
Can you test it and give some feedback ?
Also I think more people like this add-on.
How to use.
Downloaded the jar from:
www.schootuiterkamp.net/tapestry/
Place it in WEB-INF/lib and the build path of your project.
I tested the component using JBoss 4.0.3SP1 and Tapestry 4.0, I didn't
test other set-ups.
The component adds 2 annotations. I haven't tested it with the XML file
but since EJB3 is all about annotations why use xml ...
@InjectStatelessSessionBean
@InjectStatefulSessionBean
Both are in the package: "ssu.tapestry.annotations" and don't need
variables.
The rest is the same as other annotations, place it above a getter and
call that.
Example of how to get the list of users where UserManager is a
statelessSessionBean managing the users.
public class ListUsers extends BasePage
{
@InjectStatelessSessionBean
public abstract UserManager getUserManager();
public List<User> getUsers() {
return getUserManager().getAllUsers();
}
}
For the statefulSessionBeans a session scoped ASO:
'statefulSessionBeanManager' is created to keep the bean instances in
the session.
I hope you can give me some feedback on this component / add-on.
Sander Schoot Uiterkamp
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]