You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by ml...@logemann.org on 2006/08/28 18:08:58 UTC

bootstrapping OpenJPA with Spring

Hi,

i wonder why there is no OpenJPA-JpaVendorAdapter in the Spring 2.0  
distro. As you can see at  
http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/orm/jpa/vendor/package-summary.html
at least hibernate and toplink provide these.

With this you could easily bootstrap OpenJPA while providing _your  
own_ Spring managed DataSource like this:

<bean id="entityManagerFactory"  
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
       <property name="persistenceUnitName">
         <value>springJpaPU</value>
       </property>
       <property name="dataSource" ref="dataSource"/>
       <property name="jpaVendorAdapter">
          <bean  
class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
             <property name="showSql" value="true"/>
             <property name="generateDdl" value="true"/>
             <property name="databasePlatform"  
value="oracle.toplink.essentials.platform.database.oracle.OraclePlatform.OraclePlatform"/>
          </bean>
       </property>
    </bean>

Of course with OpenJPA it would be OpenJPAJpaVendorAdapter instead of  
the  Toplink one. I am also missing this for JDO bootstrapping with  
Kodo4 but thats a different story and not for this list.

Is there something planned? IMO with the default Spring way of  
bootstrapping via LocalEntityManagerFactoryBean (which results in  
JavaEE SPI discovery), you cant provide your own DataSource to OpenJPA.

Should i take the time to look into that, or are you guys planning a  
different bootstrapping story for Spring?

Marc Logemann
http://www.logemann.org


Re: bootstrapping OpenJPA with Spring

Posted by Marc Logemann <ml...@logemann.org>.
Will take a look as soon there is time, things are going crazy again  
these days... Wish i would work for a big company like BEA where  
there is more time to relax <g>.

Can you email me the sandbox url? Dont want to crawl through  
springframework.org to find it. Thanks Thomas.


--
regards
Marc Logemann
[blog] http://www.logemann.org
[busn] http://www.logentis.de


Am 31.08.2006 um 20:53 schrieb Thomas Risberg:

> Marc,
>
> The integration code is now in the sandbox.  Haven't tried this  
> yet, but
> Costin indicated that he ran into a few issues -
> http://forum.springframework.org/showpost.php?p=75333&postcount=7
>
> Thomas
>
>
> Marc Logemann wrote:
>> Hi,
>>
>> sounds good. At least its no problem to get a jar as far as i can  
>> see.
>> Compiling/Building works with some expected maven hiccups.
>>
>> -- 
>> regards
>> Marc Logemann
>> [blog] http://www.logemann.org
>> [busn] http://www.logentis.de
>>
>>
>> Am 28.08.2006 um 19:15 schrieb Thomas Risberg:
>>
>>> Marc,
>>>
>>> It's coming - see this forum post
>>> http://forum.springframework.org/showthread.php?p=74659#post74659
>>>
>>> Thomas Risberg
>>>
>>>
>>> ml@logemann.org wrote:
>>>> Hi,
>>>>
>>>> i wonder why there is no OpenJPA-JpaVendorAdapter in the Spring 2.0
>>>> distro. As you can see at
>>>> http://static.springframework.org/spring/docs/2.0.x/api/org/ 
>>>> springframework/orm/jpa/vendor/package-summary.html
>>>>
>>>>
>>
>>
>


Re: bootstrapping OpenJPA with Spring

Posted by Thomas Risberg <th...@tridb.com>.
Marc,

The integration code is now in the sandbox.  Haven't tried this yet, but
Costin indicated that he ran into a few issues -
http://forum.springframework.org/showpost.php?p=75333&postcount=7

Thomas


Marc Logemann wrote:
> Hi,
>
> sounds good. At least its no problem to get a jar as far as i can see.
> Compiling/Building works with some expected maven hiccups.
>
> -- 
> regards
> Marc Logemann
> [blog] http://www.logemann.org
> [busn] http://www.logentis.de
>
>
> Am 28.08.2006 um 19:15 schrieb Thomas Risberg:
>
>> Marc,
>>
>> It's coming - see this forum post
>> http://forum.springframework.org/showthread.php?p=74659#post74659
>>
>> Thomas Risberg
>>
>>
>> ml@logemann.org wrote:
>>> Hi,
>>>
>>> i wonder why there is no OpenJPA-JpaVendorAdapter in the Spring 2.0
>>> distro. As you can see at
>>> http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/orm/jpa/vendor/package-summary.html
>>>
>>>
>
>


Re: bootstrapping OpenJPA with Spring

Posted by Marc Logemann <ml...@logemann.org>.
Hi,

sounds good. At least its no problem to get a jar as far as i can  
see. Compiling/Building works with some expected maven hiccups.

--
regards
Marc Logemann
[blog] http://www.logemann.org
[busn] http://www.logentis.de


Am 28.08.2006 um 19:15 schrieb Thomas Risberg:

> Marc,
>
> It's coming - see this forum post
> http://forum.springframework.org/showthread.php?p=74659#post74659
>
> Thomas Risberg
>
>
> ml@logemann.org wrote:
>> Hi,
>>
>> i wonder why there is no OpenJPA-JpaVendorAdapter in the Spring 2.0
>> distro. As you can see at
>> http://static.springframework.org/spring/docs/2.0.x/api/org/ 
>> springframework/orm/jpa/vendor/package-summary.html
>>


Re: bootstrapping OpenJPA with Spring

Posted by Thomas Risberg <th...@tridb.com>.
Marc,

It's coming - see this forum post
http://forum.springframework.org/showthread.php?p=74659#post74659

Thomas Risberg


ml@logemann.org wrote:
> Hi,
>
> i wonder why there is no OpenJPA-JpaVendorAdapter in the Spring 2.0
> distro. As you can see at
> http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/orm/jpa/vendor/package-summary.html
>
> at least hibernate and toplink provide these.
>
> With this you could easily bootstrap OpenJPA while providing _your
> own_ Spring managed DataSource like this:
>
> <bean id="entityManagerFactory"
> class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
>
>       <property name="persistenceUnitName">
>         <value>springJpaPU</value>
>       </property>
>       <property name="dataSource" ref="dataSource"/>
>       <property name="jpaVendorAdapter">
>          <bean
> class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
>             <property name="showSql" value="true"/>
>             <property name="generateDdl" value="true"/>
>             <property name="databasePlatform"
> value="oracle.toplink.essentials.platform.database.oracle.OraclePlatform.OraclePlatform"/>
>
>          </bean>
>       </property>
>    </bean>
>
> Of course with OpenJPA it would be OpenJPAJpaVendorAdapter instead of
> the  Toplink one. I am also missing this for JDO bootstrapping with
> Kodo4 but thats a different story and not for this list.
>
> Is there something planned? IMO with the default Spring way of
> bootstrapping via LocalEntityManagerFactoryBean (which results in
> JavaEE SPI discovery), you cant provide your own DataSource to OpenJPA.
>
> Should i take the time to look into that, or are you guys planning a
> different bootstrapping story for Spring?
>
> Marc Logemann
> http://www.logemann.org
>
>
>
>