On 12/20/06, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
> How easy will it be to take advantage of container resource injection when
> deploying wicket as client tier in glassfish server for instance.
Hi Ayodeji, as Igor has already pointed out, I've written a patch to
extend JEE dependency injection to wicket pages.
At the moment, the only supported annotation is @EJB, which means that
you have to write a stateless session bean which performs the
persistence logic, and use the @EJB annotation in your wicket pages.
Something like:
@Stateless
public class MyDao
{
@PersistenceContext EntityManager em;
public void create(PersistentObject po)
{
//....
and
public class MyWicketServlet extends WicketServlet
{
@EJB private MyDao dao;
//...
IMHO using the EntityManager API directly in the web page is not so
elegant, nevertheless it shouldn't be difficult to add this
functionality.
--
Filippo Diotalevi
[EMAIL PROTECTED]
http://www.diotalevi.com/weblog
http://www.jugmilano.it
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user