Sunday, August 5, 2007

How to make Guice and EJB and SEAM bloat and ugly

Although the following code is only an imaginary example code of abusing Java Annotation. But it may help Java programmer to prepare for the Java Annotation bloating. The Java Annotation bloating may hurt Guice, EJB, SEAM and etc... Those Java programmers who claims that Spring XML bloats may be backfired when they switch to Java Annotation blindly.
...

@Inject
@Transactional
@Stateless
@Column(name="foo",type="VARCHAR"...
@Criteria(type="manager"...
@DynamicInclude("Bonus")
@MyJTextField(size="12",...
@Validate(require=true...
@MyFormatter(format="...
....
public void setFoo(MyObject foo) {
...

What is the problem of the above code? All the Java Annotations are NOT modularized and the Java Annotations BLOAT. I think Java programmer must think carefully about this. Otherwise Guice will bloat, EJB will bloat and JBoss SEAM will bloat.

chris tam
hong kong

2 comments:

Bob said...

What's your alternative?

Graeme Rocher said...

@bob Spring? ;-)