Joshua,
If you deploy an application into an appserver, and your persistence.xml
contains the openjpa.jdbc.SynchronizeMappings property, the tables will be
created on the 1st emf.createEntityManager() call (or injection of EM that does
the same in the background), i.e. on every redeploy or
at a later time.
-Patrick
On 5/22/07, Marina Vatkina [EMAIL PROTECTED] wrote:
Joshua,
If you deploy an application into an appserver, and your persistence.xml
contains the openjpa.jdbc.SynchronizeMappings property, the tables
will be
created on the 1st emf.createEntityManager() call (or injection
Just one note (this problem caused us a lot of headaches in GlassFish): I'm not
sure if url.getFile() handles spaces in the url correctly. If it doesn't, our
solution was to use 'new File(url.toURI())'.
-marina
David Jencks (JIRA) wrote:
[
tbee wrote:
Patrick Linskey wrote:
I think that if you do 1, 2, 3, 5, and 6, you should be in good shape.
This indeed seems to work!
BTW, Toplink just now also had its lazy loading issue solved: turns out
@MappedSuperclass classes must be listed in the persistence.xml.
Can you pass a connection from em to the other side instead?
tbee wrote:
djencks wrote:
You can supply the datasource instance in a PersistenceUnitInfo, but
I certainly hope you can't provide a connection.
Are you running inside a javaee app server? (not standalone tomcat)
If so
There is nothing special that you need to do. Java EE 5 Tutorial has an example
that uses TableGenerator, but it shouldn't matter much - see
http://java.sun.com/javaee/5/docs/tutorial/doc/PersistenceEJB2.html#wp82561
-marina
saidulu chitipolu wrote:
Hi,
We are using
that extend an
abstract entity, it's most probably something in your configuration that causes
the problem.
BTW, what kind of error do you get with Toplink?
thanks,
-marina
tbee wrote:
Marina Vatkina wrote:
This is close to impossible as there are probably CTS tests that use an
@Entity
Phill,
This is what the spec says:
3.2.3 Synchronization to the Database
For any entity Y referenced by a relationship from X, where the relationship
to Y has not been annotated with the cascade element value cascade=PERSIST or
cascade= ALL:
...
If Y is detached, the semantics depend
tbee wrote:
Marina Vatkina wrote:
The spec defines the following limitations of a MappedSuperclass:
2.1.9.2 Mapped Superclasses
...
A mapped superclass, unlike an entity, is not queryable and cannot be
passed as
an argument to EntityManager or Query operations. A mapped superclass
cannot
Armad,
Are you using GlassFish with OpenJPA? If yes, there is a special integration
with the Toplink code to be able to drop and create tables at deployment time.
No other JPA provider has this support. I was looking at adding the same level
of support for OpenJPA but the existing options
Are we looking at different classes? I can't find the code in
javax.persistence.Persistence under GlassFish that looks up persistence units.
It's all delegated to the providers.
thanks,
-marina
Patrick Linskey wrote:
If a provider does not qualify as the provider for the named
persistence
Isn't it called an entity name in the JPA spec?
thanks,
-marina
Pinaki Poddar wrote:
Persistent Java classes when used in Query use an alias (which is, be
deafult, the unqualified name of the Java class). However, the alias is
known to the runtime once the Java class is loaded in to JVM. When
One note of caution about using enums - there can be a problem in passing enums
from a client to a server using RMI-IIOP serialiazation - see GlassFish issue
https://glassfish.dev.java.net/issues/show_bug.cgi?id=193 for some details.
regards,
-marina
Abe White wrote:
I think that
It should be ok anyway in the same VM. Unfortunately I had conflicting messages
on weather it's the name or the ordinal that is guaranteed to work across the
VMs :(.
-marina
Patrick Linskey wrote:
Fascinating. Happily, as it turns out, we never compare these things
directly; instead, we
It's pretty much defined by the spec that Persistence class just delegates to
the providers to do the work and has no way to report the errors:
7.2 Bootstrapping in Java SE Environments
The Persistence bootstrap class will locate all of the persistence providers
... and call
surprising ;).
thanks,
-marina
Marc Prud'hommeaux wrote:
On Mar 30, 2007, at 4:17 PM, Marina Vatkina wrote:
Marc,
I'd rather have provider-neutral code in GlassFish ;(.
Well, until the JPA spec (or some other spec) provides details on how
schema creation and/or migration should work, I
the SynchronizeMappings. Note that there is nothing
preventing you from manually invoking the MappingTool class from any
startup to glue code that you want.
On Mar 29, 2007, at 4:18 PM, Marina Vatkina wrote:
Marc, Patrick,
I didn't look into the file story yet, but what I've seen as the
result of using
class from any
startup to glue code that you want.
On Mar 29, 2007, at 4:18 PM, Marina Vatkina wrote:
Marc, Patrick,
I didn't look into the file story yet, but what I've seen as the
result of using
property name=openjpa.jdbc.SynchronizeMappings
value=buildSchema
Marc,
Does OpenJPA figures out by itself that it is running in a multithreaded
environment when used in an app- or web-server? Or do you expect users to always
specify this setting when they decide to deploy it to a multi-threaded container?
thanks,
-marina
Marc Prud'hommeaux wrote:
Hans-
, the same EntityManager will never be used
concurrently from multiple threads. That might also be the case in your
environment, but it would be interesting to see if the problem ever
crops up after you enable this property.
On Mar 23, 2007, at 2:36 PM, Marina Vatkina wrote:
Marc,
Does
It's Java EE, i,e, run under the appserver. I'll let you know what is does the
tracing shows.
-marina
Patrick Linskey wrote:
Did you run the OpenJPA enhancer on your classes before running the
test, or, are you running in an environment that should be doing
automatic class processing (such as
Interesting... but after switching back to Derby, it all worked. Let me try and
see if it's the 1st run after 1st deploy that causes any problems.
-marina
Patrick Linskey wrote:
Did you run the OpenJPA enhancer on your classes before running the
test, or, are you running in an environment
Marc,
Marc Prud'hommeaux wrote:
Marina-
On Mar 20, 2007, at 4:02 PM, Marina Vatkina wrote:
Marc,
Thanks for the pointers. Can you please answer the following set of
questions?
1. The doc requires that In order to enable automatic runtime
mapping, you must first list all your
it with some path?
thanks.
On Mar 20, 2007, at 4:19 PM, Marina Vatkina wrote:
Marc,
Marc Prud'hommeaux wrote:
Marina-
On Mar 20, 2007, at 4:02 PM, Marina Vatkina wrote:
Marc,
Thanks for the pointers. Can you please answer the following set
of questions?
1. The doc requires that In order
started, and let us know if you have any
questions about proceeding.
On Mar 20, 2007, at 4:59 PM, Marina Vatkina wrote:
Marc,
Marc Prud'hommeaux wrote:
Marina-
They do in SE, but as there is no requirement to do it in EE,
people try to reduce the amount of typing ;).
Hmm ... we might
Hi,
I am part of the GlassFish persistence team and was wondering how does OpenJPA
support JPA auto DDL generation (we call it java2db) in a Java EE application
server.
Our application server supports java2db via creating two sets of files for each
PU: a ...dropDDL.jdbc and a
26 matches
Mail list logo