geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Wilkins <gr...@mortbay.com>
Subject Re: [XML][Deployment]POJO design?
Date Fri, 12 Sep 2003 08:30:28 GMT


Aaron Mulder wrote:
> 	Stepping back a little, the truth is, any of the options on the
> table at this point will likely meet the requirements, and I suspect we're
> unlikely to reach 100% consensus on the design, so why don't you either
> call a vote on which alternative with a time limit, or just pick a
> deadline and say if there hasn't been a consensus by then you'll just pick
> one and check it in so we can move on from here.  If you call a vote, it
> would help if the people voting +1 are willing to put some time into
> implementing the code, since we have a fair bit of DD coverage left (EAR,
> RAR, and the missing Geronimo schemas).

I've had a look at your second patch and I'm still not convinced.  So I'm
going to apply my 2nd patch first thing tomorrow - unless Jeremy, Dain or
other heavy user of the geronimo DDs objects.

Once we start getting a lot of geronimo configuration added to the DD's
then I think it would be a good time to restard the discussion for the
support of a standard only POJO tree (either as interfaces or as per your patch).

Just for the record, the following is what I don't like about your patch 2.

Take o.a.g.d.m.e.Entity for example.  It now reads:

public class Entity extends org.apache.geronimo.deployment.model.ejb.Entity {
     private String jndiName;

     public String getJndiName() {
         return jndiName;
     }

     public void setJndiName(String jndiName) {
         this.jndiName = jndiName;
     }

     public SecurityRoleRef[] getGeronimoSecurityRoleRef() {
         return (SecurityRoleRef[])super.getSecurityRoleRef();
     }

     public SecurityRoleRef getGeronimoSecurityRoleRef(int i) {
         return (SecurityRoleRef)super.getSecurityRoleRef(i);
     }
}

So you have added Geronimo casting methods for SecurityRoleRef, but
you really need to add the same for all the Geronimo types:
   EjbRef, EjbLocalRef, ServiceRef, ResourceRef, ResourceEnvRef, MessageDesinationRef

Also it is not sufficient for type safety to just provide the getters.
You need to provide geronimo setters as well so we can get compile time
type checking.

But then it will still be possible for the standard setters to be called,
so they probably need to be overriden to make them check the type
of the array being set is a geronimo array. Even then, that is only run time
type checking.

Finally I still don't have a geronimo version of JNDIEnvironmentRefs that
will allow me to deal with Entity's, Sessions, etc as strongly typed
providers of geronimo JNDIRef entities.  All code written to this API
will be able to fail at run-time with simple type errors of passing
in the wrong type of POJO.   As type safety was one of the main drivers
for going for a POJO DD model, I think this is important.

regards







Mime
View raw message