User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.23) Gecko/20110920 Lightning/1.0b2 OracleBeehiveExtension/1.0.0.2-OracleInternal ObetStats/LAFCAT_1291391846088-755290907 Thunderbird/3.1.15
Hi András,
The EMFB is a registered service just like the EMF is, so if you are
using DS you should be able to just reference the EMFB service
instead of the EMF one. Make sense? Let me know if you have any
trouble with it.
Regards,
-Mike
On 10/6/2011 12:06 PM, András Liter wrote:
Hello Mike,
thanks for your answer! I would have one more question: how can I
use Gemini JPA to be able to affect EMFB by passing my property
map from code?
Because In my case, when I start my bundles (Eclipse Run
Configuration), I just get an EMF (not a factory builder) via
Declarative Services~~Referenced Service from Equinox & Gemini
JPA bundles.
Yes, that is precisely what the EntityManagerFactoryBuilder
is for. You can leave out the properties from the
persistence.xml file, and then when you call
createEntityManagerFactory() on the builder you can pass
them in as properties.
-Mike
P.S. There is a forum that you can post questions to that we
encourage people to use. That way others who may have the
same questions can see the replies. See http://www.eclipse.org/forums/index.php/f/153
On 9/29/2011 6:00 AM, András Liter wrote:
Dear Gemini developers,
I know its a developer ml, but I just didnt find any
user mail list for Gemini JPA, so I put my question
here.
Is it possible to configure an EntityManager with the
database URL from code, via EntityManager's
EntityManager(Map m) constructor?
So far I made it work from persistence.xml, but I
tried to have a Map in the constructor of EM (with
only one URL property, other props stayed in
persistence.xml), and get the following error during
EM instantiantion:
Caused by: Exception [EclipseLink-4002] (Eclipse
Persistence Services - 2.3.0.v20110604-r9504):
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: URL was not
specified
Do you have any ideas, how to make this "programmable"
configuration work?