|
From: Garvey, P. M \(GE C. Finance\) <pau...@ge...> - 2005-04-22 21:17:16
|
I do use ant to build but now that I am getting familiar with appfuse I =
will
need to convince other developers who are using JBuilder to develop =
their EJB
apps. I have been using ant and IntelliJ for a a while now.=20
-----Original Message-----
From: spr...@li...
[mailto:spr...@li...]On Behalf
Of Eugene Kuleshov
Sent: Friday, April 22, 2005 12:21 PM
To: spr...@li...
Subject: Re: [Springframework-developer] EJBs vs POJOs
Garvey, Paul M (GE Commercial Finance) wrote:
> Dmitriy,
> I haven't had a chance to look at Spring EJB support as yet=20
> but it sounds
> interesting, Will be reading about Spring support this weekend. IDEs=20
> such as JBuilder
> makes EJB development very easy, testing aside, is Spring EJB support=20
> easier to code
> than straight EJBs?=20
Paul, don't you think that rely your development on IDE is a bad idea? =
I believe it is better to setup a common build process (XDoclet,=20
MiddleGen, Cactus, Ant/Maven, etc) and do not rely on concrete IDE.
By the way, I have strange feeling about current Spring's EJB=20
convenience classes. The idea is that they will automatically lookup=20
Spring's application context for you and then you'll use=20
getBeanFactory().getBean() in onEjbCreate() method to pull pring-managed =
POJO. However it require java:comp/env/ejb/BeanFactoryPath env property=20
to be set and also custom implementation setSessionContext() in order to =
make bean factory a singleton (I don't know who would want non-singleton =
factory?).
So, we've ended up with our own EJBM helper classes (very similar to=20
the Spring but without factory ) and a custom SpringLocator singleton=20
that I'm using in onEjbCreate() methods instead:
public class SpringLocator {
private static final ApplicationContext context =3D new=20
ClassPathXmlApplicationContext( CONTEXT_PATH);
public static Object getBean(String id) {
return context.getBean(id);
}
....
In this case I don't have to override setSessionContext in every bean. =
That of course only makes sence and should be used only on facade beans=20
(session/mdb or transaction) and all inner components should use DI and=20
not locator.
regards,
Eugene
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick
_______________________________________________
Springframework-developer mailing list
Spr...@li...
https://lists.sourceforge.net/lists/listinfo/springframework-developer
|