Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] programmatic customization of mapping meta-data at runtime

Hi Tom,

Thank you for your reply.

Tom Ware wrote:
Hi Olaf,

  What kinds of things do you want to do in your meta-data modification?
I think it will mostly be modifying the mapping type of certain fields (for example changing it from basic to N:N or a custom mapping), excluding fields etc.

Depending on what you want to do, there may be several ways to make modifications to the metadata.

1. There is a Customization mechanism that allows you to customize the mappings that are created by our meta-data processing
Very interesting - which specific mechanism are you referring to?
2. There is an event mechanism the provides you with callbacks at certain stages of our initialization
I have seen the event mechanism - but will this actually work before the meta data of the entities has been processed?
3. You can specify your mappings in XML. (with the option of having the XML be the only source of mappings)

I know, but this is not an option, since this would require custom mappings for framework users affecting fields they cannot see. Furthermore, the fields are subject to a lot of changes when altering classes. Basically, i must identify the generated fields by a certain prefix and handle them with regard to their content.
You should also be aware that some performance features in EclipseLink are enabled by byte-code weaving.

Indeed, i have seen that using the eclipse agent has a lot of advantages. But there are a lot of complications with java agents and the framework i don't wish to address by now.
-Tom

Regards,
Olaf

Olaf Otto wrote:
Hello eclipse users!

I have a framework that makes massive use of aspect-oriented programming and code generation. This includes a significant amount of additional fields being created in various classes (of a project using the framework, not in the framework itself) by a java agent at class loading time. These fields are primarily generated for internal framework purposes and are thus invisible to a framework user.

Most of these fields are references to non-serializable resp. custom types and must be handled in a non-standard fashion for persistence.

Now here is the question: Is there a way to hook into the meta-data processing occurring during predeployment? More precisely, i would like to access and modify the persistence meta-data of entities before processor.processORMMetadata() is invoked in the processORMetadata of the PersistenceUnitProcessor class.

Thank you and regards,
Olaf

_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



Back to the top