Skip to main content

Is there any EJB metadata API?

3 replies [Last post]
wangzaixiang
Offline
Joined: 2004-11-24

I think a Metadata API on EJB3 is useful, for example:

1. Is the class Persistencable?
2. What is the persistence field and Data type?
3. What is the Id field? and how to get/set it?
4. Information about the relationship.

Although the information can be retrieved from the annotation, but if there is a standard API and the JEE container may provide the implementation, that would be an good idea.

Based on the metadata, application can do metadata-driven programming, and do some general works.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
forax
Offline
Joined: 2004-10-07

It' a great idea.

With such kind of reflection specified,
you can see tools that automatically
create page likes creation, modification
deletion ("a la" naked object)
using reflection.

spullara
Offline
Joined: 2003-06-11

Why wouldn't you just use reflection to find out all of these things? It is all available in the annotations.

wangzaixiang
Offline
Joined: 2004-11-24

Of course you can.

It is the same problem why you need the class library, we can live without java.util.* since we can code myself my.util.*.

The way you can do it maybe a bad way.