persistence@glassfish.java.net

Re: [Fwd: java2db and Derby support]

From: Craig L Russell <Craig.Russell_at_Sun.COM>
Date: Thu, 01 Dec 2005 20:49:50 -0800

Hi,

I think if there are some properties that we know that many or most
of persistence providers are likely to need, then we should try to
name them in some consistent way. Like what DataSource does. For
example, what about

javax.persistence.connection.User
javax.persistence.connection.Password
javax.persistence.connection.Port
javax.persistence.connection.Host
javax.persistence.connection.URL

or whatever seems to be common connection properties. Similarly,

javax.persistence.mapping.GenerateDDL

Wouldn't a small number of really common properties significantly
improve portability?

Craig

On Dec 1, 2005, at 6:55 PM, Marina Vatkina wrote:

> Moving this discussion to the persistence alias.
> Peter, Tom, Gordon,
>
> We have other properties which names may cause conflicts:
> I know of the database-related names, like "jdbc.driver", etc.
> Are there any others?
>
> Do you see any problem, if they are changed?
>
> thanks,
> -marina
>
> Ludovic Champenois wrote:
>> Marina Vatkina wrote:
>>> Mitesh Meswani wrote:
>>>> Please note that you can enable java2db through command line
>>>> using "asadmin deploy --dropandcreatetables=true ......" or
>>>> having a property in your persistence.xml as follows
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <persistence ..... >
>>>> <persistence-unit name ="em" >
>>>> <properties>
>>>> <!-- for generating derby specific sql -->
>>>> <property name="toplink.platform.class.name"
>>>> value="oracle.toplink.essentials.platform.database.DerbyPlatform"/>
>>>>
>>>> <!-- To enable java2db Please note that this property
>>>> name may change in future -->
>>>> <property name="ddl-generation" value="dropandcreate"/>
>>>
>>> I think that we need to change the name to be something
>>> that guaranteed to be unique. Even toplink.essentials.ddl-generation
>>> is more definite.
>>>
>>> My $.02.
>>>
>>> -marina
>> Yes, property names should try to be unique across vendors,
>> otherwise developers using tools like Eclipse or NetBeans will not
>> be able to switch back and forth quickly between server targets
>> for the same Java EE5 project.
>> The best way to achieve this is to use consistently some product
>> specific prefix.
>> Ludo

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