Le 22 avr. 2015 20:48, "Jean-Louis Monteiro" <[email protected]> a écrit : > > Why not keeping the JPA vocabulary? > It would be more obvious. >
@PersistenceUnitDefinition works for me > We have the tree for that and we can use the tree already in the > application composer (aka PersistenceUnit) > Just some thoughts > In progress but i have some issues > -- > Jean-Louis Monteiro > http://twitter.com/jlouismonteiro > http://www.tomitribe.com > > On Wed, Apr 22, 2015 at 11:42 AM, Romain Manni-Bucau < [email protected]> > wrote: > > > Hi guys, > > > > I don't know you but each time I start an app I start to do something like: > > > > $ find ~/dev/tomee-trunk/example -name persistence.xml | xargs cat | more > > > > to get a persistence.xml with ddl options + right headers. Sure IDE can do > > it as well but you need to create an xml file, int he right folder > > etc...boring (at least for me). > > > > That's why I propose with this task to allow to do it in code (it is fully > > part of the app isn't it?). > > > > Here how the code is done ATM: > > > > The API just takes the most common properties of a persistence-unit (unit > > name, properties, datasources etc...) > > Then in the deployment chain we have a ConfigurationDeployer which read > > this annotation (annotations actually since there is the plural) > > Finally it creates PersistenceModule for them > > > > In my mind we can add more @AutoXXX and update ConfigurationDeployer to get > > rid of more boring configuration. > > > > Romain Manni-Bucau > > @rmannibucau <https://twitter.com/rmannibucau> | Blog > > <http://rmannibucau.wordpress.com> | Github < > > https://github.com/rmannibucau> | > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber > > <http://www.tomitribe.com> > > > > ---------- Forwarded message ---------- > > From: Romain Manni-Bucau (JIRA) <[email protected]> > > Date: 2015-04-22 20:33 GMT+02:00 > > Subject: [jira] [Updated] (TOMEE-1555) create @AutoJPA > > To: [email protected] > > > > > > > > [ > > > > https://issues.apache.org/jira/browse/TOMEE-1555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel > > ] > > > > Romain Manni-Bucau updated TOMEE-1555: > > -------------------------------------- > > Description: > > {code} > > @AutoJPAs({ > > @AutoJPA, > > @AutoJPA(unitName = "jpa2", jta = false) > > }) > > public class MyConfig { // any class > > } > > {code} > > > > > create @AutoJPA > > > --------------- > > > > > > Key: TOMEE-1555 > > > URL: https://issues.apache.org/jira/browse/TOMEE-1555 > > > Project: TomEE > > > Issue Type: New Feature > > > Reporter: Romain Manni-Bucau > > > Assignee: Romain Manni-Bucau > > > Fix For: 2.0.0-Milestone-1 > > > > > > > > > {code} > > > @AutoJPAs({ > > > @AutoJPA, > > > @AutoJPA(unitName = "jpa2", jta = false) > > > }) > > > public class MyConfig { // any class > > > } > > > {code} > > > > > > > > -- > > This message was sent by Atlassian JIRA > > (v6.3.4#6332) > >
