Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gemini » Gemini Jpa: Howto specify a jpa vendor adapter?
Gemini Jpa: Howto specify a jpa vendor adapter? [message #1052844] Tue, 30 April 2013 16:53 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
I would like to migrate to gemini jpa for one of our applications.

I'm tracking the EntityManagerFactoryBuilder Service and call createEntityManager with some properties:
- javax.persistence.jdbc.url
- javax.persistence.jdbc.driver
- javax.persistence.jdbc.user
- javax.persistence.jdbc.password

This is working well.

When I was creating the EMF myself (before gemini jpa) I was specifying a jpaVendorAdapter like that:

	<bean id="entityManagerFactory"
		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="jpaVendorAdapter" ref="eclipseLinkJpaVendorAdapter" />
		<property name="jpaPropertyMap">
			<map>
				<entry key="eclipselink.weaving" value="true" />
				<entry key="eclipselink.ddl-generation" value="${eclipselink.ddl-generation}" />
			</map>
		</property>
		<property name="loadTimeWeaver">
			<ref bean="domain-weaver" />
		</property>
	</bean>


Is it possible to specify a jpaVendorAdapter as a property to EMFBuilder.createEntityManager? Do I need one?


Thanks,
Peter
Re: Gemini Jpa: Howto specify a jpa vendor adapter? [message #1052966 is a reply to message #1052844] Wed, 01 May 2013 15:44 Go to previous messageGo to next message
Michael Keith is currently offline Michael KeithFriend
Messages: 243
Registered: July 2009
Senior Member
Hi Peter,

Once you move to Gemini JPA then you are in the world of dynamic OSGi services. This means that a vanilla Spring component could find itself without a dependency because the service is not yet registered and ready. You might instead want to use Blueprint or similar OSGi component model to allow the service to be injected.

-Mike
Re: Gemini Jpa: Howto specify a jpa vendor adapter? [message #1053028 is a reply to message #1052966] Thu, 02 May 2013 06:33 Go to previous messageGo to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
Hi Mike,
I'm already using blueprint. Can you elaborate about a jpa vendor adapter? Do I have to create one and publish it as an OSGi service? Do I have to specify properties so that it will be wired to the EMF?

Regards,
Peter
Re: Gemini Jpa: Howto specify a jpa vendor adapter? [message #1053176 is a reply to message #1053028] Thu, 02 May 2013 20:43 Go to previous message
Michael Keith is currently offline Michael KeithFriend
Messages: 243
Registered: July 2009
Senior Member
Hi Peter,

No, you should not need the vendor adapter or any of the traditional Spring properties. You just inject the EMF service that Gemini JPA makes available.

-Mike
Previous Topic:Gemini JPA messes around with OSGI startup sequence
Next Topic:Gemini Naming 1.0.2.RELEASE is now available
Goto Forum:
  


Current Time: Fri Apr 19 00:53:34 GMT 2024

Powered by FUDForum. Page generated in 0.04710 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top