IMO, looking up EJBs through JNDI is better than relying on injection.  Make 
the hostname (localhost, another ip, etc) part of the JNDI URL configurable and 
you give yourself the flexibility of being able to deploy them locally or in 
another VM.  If you are using EJBs with JPA this will allow your load balanced 
web applications to all use the same EJB and therefore the same EntityManager, 
ensuring that your merge operations work correctly and you can catch 
OptimisticLockExceptions properly.

Craig
  _____  

From: Major Péter [mailto:majorpe...@sch.bme.hu]
To: users@wicket.apache.org
Sent: Wed, 02 Dec 2009 19:00:26 -0500
Subject: Re: Wicket 1.5 experiences

Anyone?
  
  2009-12-01 23:17 keltezéssel, Major Péter írta:
  > Hi,
  > 
  > I'm trying to make my project 1.5-compatible, but I had run into two issues:
  > First I was stumbled when saw IComponentBorder has been deleted, but
  > after some Googling I found the corresponding ticket:
  > https://issues.apache.org/jira/browse/WICKET-2280
  > Okay, that's great, but I can't see this @deprecation javadoc in my
  > 1.4.3 source code (downloaded by maven), so could this commit just
  > missed somehow in the 1.4-releasing?
  > 
  > Another thing is, that I have problems with EJB injecting:
  > - with Wicket 1.3 -> Wicket 1.4 I saw that ComponentInjector moved into
  > wicket-ioc (great, caused me some headache)
  > - now Wicket 1.4 -> Wicket 1.5 I'm unable again to use
  > wicket-contrib-javaee like JavaEEComponentInjector, because
  > ComponentInjector is deleted now. (see 830078 commit via Igor). Now my
  > only question would be: how can I use @EJB annotation, now that this
  > class is deleted (okay I could rewrite it, but I'd happy to hear better
  > ways)? Or anyway, how can I use my EJB's the _right_ way, what would you
  > recommend?
  > (I can see, that you don't like @EJB annotation, I just guess, that you
  > have a better approach then..)
  > 
  > Any help would be really appreciated.
  > 
  > Best Regards,
  > Peter
  
  ---------------------------------------------------------------------
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
  
    

Reply via email to