Re: How do we know the entity is successfully deployed on appserver

2007-05-22 Thread Marina Vatkina
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

Re: How do we know the entity is successfully deployed on appserver

2007-05-22 Thread Marina Vatkina
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

Re: [jira] Commented: (OPENJPA-148) Parsing exception while using an exploded archive

2007-05-04 Thread Marina Vatkina
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: [

Re: Open JPA error-Could not locate metadata for the class using alias

2007-04-26 Thread Marina Vatkina
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.

Re: provide an actual JDBC connection?

2007-04-26 Thread Marina Vatkina
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

Re: OpenJPA problem wtih Sequence generator many to one mapping samples required

2007-04-24 Thread Marina Vatkina
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

Re: Open JPA error-Could not locate metadata for the class using alias

2007-04-24 Thread Marina Vatkina
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

Re: Cascade question (ver 0.96)

2007-04-24 Thread Marina Vatkina
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

Re: Open JPA error-Could not locate metadata for the class using alias

2007-04-20 Thread Marina Vatkina
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

Re: (No)existing table in SQL server

2007-04-16 Thread Marina Vatkina
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

Re: Testing an OpenJPA module

2007-04-11 Thread Marina Vatkina
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

Re: Open JPA error-Could not locate metadata for the class using alias

2007-04-11 Thread Marina Vatkina
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

Re: OPENJPA-182: reuse Connection constants or create our own?

2007-04-10 Thread Marina Vatkina
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

Re: OPENJPA-182: reuse Connection constants or create our own?

2007-04-10 Thread Marina Vatkina
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

Re: Testing an OpenJPA module

2007-04-10 Thread Marina Vatkina
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

Re: Using DDL generation in a Java EE environment?

2007-04-02 Thread Marina Vatkina
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

Re: Using DDL generation in a Java EE environment?

2007-03-30 Thread Marina Vatkina
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

Re: Using DDL generation in a Java EE environment?

2007-03-30 Thread Marina Vatkina
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

Re: AW: Forgot subject: Strange Could not locate metadata for the classError?

2007-03-23 Thread Marina Vatkina
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-

Re: AW: Forgot subject: Strange Could not locate metadata for the classError?

2007-03-23 Thread Marina Vatkina
, 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

Re: Problem running JPA example from GlassFish page on GF+OpenJPA+Derby

2007-03-22 Thread Marina Vatkina
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

Re: Problem running JPA example from GlassFish page on GF+OpenJPA+Derby

2007-03-22 Thread Marina Vatkina
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

Re: Using DDL generation in a Java EE environment?

2007-03-20 Thread Marina Vatkina
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

Re: Using DDL generation in a Java EE environment?

2007-03-20 Thread Marina Vatkina
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

Re: Using DDL generation in a Java EE environment?

2007-03-20 Thread Marina Vatkina
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

Using DDL generation in a Java EE environment?

2007-03-15 Thread Marina Vatkina
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