Hi Erik,

On Nov 18, 2005, at 4:00 PM, [EMAIL PROTECTED] wrote:

See inline...

1 - Should the field-name attribute be used to generate the field
in the class?

No. The intent of the persistent interface is that the JDO
implementation creates an "anonymous" implementation class. There is
no requirement to even create a persistence-capable class; it's
perfectly fine to use dynamic Proxy as a strategy and to not even
define fields with names.


JPOX is using another strategy. It creates the PersistenceCapable at runtime,
and that's the context for the question.

That's fine. You are free to call the fields anything you want, and in fact there is no requirement that the user tell you the field name.

I was just pointing out that with an alternative strategy, the issue would not even arise because there are no fields to name!

Hope this satisfies your needs.

Craig


2 - There is no attribute that defines the binary name of the
generated class at
runtime. We may need a metadata attribute to allow specifying it,
and secondly,
we should define a default naming for the generated class if not
specified in
the metadata.

I have two proposals for a default:

- <interface-package>.Jdo<interface-classname>
- <interface-package>.<interface-classname>Impl

See above. There is no value in having a persistence-capable concrete
class visible to the user, as there is no user-visible behavior of
such a class. The only thing that a user can and should rely on is
that the persistent properties are available from the implementation
instance.

It seems that I wasn't clear in my reply below. Probably because
there are two different uses for persistent interfaces and properties.


Yes you were. Sorry for not inputing the context


Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Reply via email to