> > I agree that we should not focus on any given container. > > Apparently we cannot > > agree upon which concept JavaBean/CDI is the way to go, so > I then move > > in favour of supporting both. That way we can run in any POJO > > container. As someone (sorry forgot who) posted earlier
Me ;-) > this is quite > > easy as the CDI constructor can be implemented like: > > > > SomePOJO (String a, String b, String c, String d) { > > this(); > > setA(a); setB(b); setC(c); setD(d); } > > > > Alongside the mandatory no-args constructor. > > > > AFAIK this wont work, as CDI relies on a constructors to > determine dependencies. If there is a no-argument > constructor, then it will determine that there are no > dependencies! If you support both, then you will have to > extend the classses to make a CDI version: > > public class SomePOJOCDI{ > SomePOJOCDI (String a, String b, String c, String d) > { > super(); > setA(a); setB(b); setC(c); setD(d); > } > } I think we should stop loosing time in this never-ending discussion. We can create SDI POJO (JavaBeans) with setters and no-argument constructor and then create an extended class with only the new constructor for the CDI. public class SomePOJO { SomePOJO () {} public function setA(a); public function setB(b); public function setC(c); public function setD(d); } public class SomePOJOCDI estends SomePOJO { SomePOJOCDI (String a, String b, String c, String d) { super(); setA(a); setB(b); setC(c); setD(d); } } It seems to me the simplest way to support both concept and both container styles. Anyway, I think we should convert the james object to POJO, I don't care CDI vs SDI (it is really easy to convert them later). The developer that will do the conversion job will decide if he prefer CDI or SDI, I think this should not be decided before. If you really want CDI or SDI then do the refactoring job before someone else does it the "wrong" way! ;-) Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]