Need help

2007-05-14 Thread subrahmanyam.sanku
Hi JPA Team, I am trying to learn JPA and thanks for your efforts to develop the JPA. I am trying to execute the sample program given in 5 minute quick start guide to OpenJPA http://incubator.apache.org/openjpa/quick-start.html . I am able to execute and see the result in console. But how

Re: Proposed Board Resolution: Graduate OpenJPA as a Top Level Project

2007-05-14 Thread Eddie O'Neil
Thanks for taking care of this, Craig. I'll attend the Board meeting Wednesday in case any questions about this come up. Eddie On 5/13/07, Craig L Russell [EMAIL PROTECTED] wrote: FYI, this is the board resolution message as approved by the incubator. The board meeting is coming up next

Re: Need help

2007-05-14 Thread Marc Prud'hommeaux
Sanku- If you look in Main.java, you can see we are passing the System properties to the EntityManager creation process: EntityManagerFactory factory = Persistence. createEntityManagerFactory(hellojpa, System.getProperties()); In the parent directory's build.xml file,

Entity creation at Runtime

2007-05-14 Thread James Hang
Hi, I'm curious if it's possible to create and map new entities at Runtime? We have an application which allows users to design new data models at runtime. When new tables are being created in the database, we would like to make OpenJPA aware of them. We are currently doing this in Hibernate by

Re: Entity creation at Runtime

2007-05-14 Thread Marc Prud'hommeaux
James- It should be possible. The easiest way (and the most implementation- agnostic) would be to simply generate the classes with the appropriate mapping annotations, and then just load them at runtime. The somewhat tricky part would be to ensure they get enhanced by the system when they

[jira] Updated: (OPENJPA-238) Error in XMLFileHandler, failed to load field element with type org.apace.openjpa.util.StringId.

2007-05-14 Thread Catalina Wei (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Catalina Wei updated OPENJPA-238: - Attachment: XMLFileHandler.patch New patch for OPENJPA-238. The previous patch won't compile

[jira] Updated: (OPENJPA-238) Error in XMLFileHandler, failed to load field element with type org.apace.openjpa.util.StringId.

2007-05-14 Thread David Wisneski (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Wisneski updated OPENJPA-238: --- Attachment: XMLFileHandler.java.patch Re-attach patch for OPENJPA-238 Error in

[jira] Updated: (OPENJPA-238) Error in XMLFileHandler, failed to load field element with type org.apace.openjpa.util.StringId.

2007-05-14 Thread David Wisneski (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Wisneski updated OPENJPA-238: --- Attachment: (was: XMLFileHandler.patch) Error in XMLFileHandler, failed to load field

RE: Entity creation at Runtime

2007-05-14 Thread James Hang
Thanks for the reply Marc. Is there a third party tool that can generate classes with annotations? Or is there something in OpenJPA that can do that? I noticed a CodeGenerator class that can generate classes from metadata. Can I use that? I'll take a look at the PCClassFileTransformer class

Re: Entity creation at Runtime

2007-05-14 Thread Marc Prud'hommeaux
James- The CodeGenerator just generates .java file, so I don't think it will be useful for your purposes. Well, I suspect that if if you are currently generating classes using CGLIB, then the easiest thing would be to just use CGLIB to add the annotations as well. Alternately, you

Re: Entity creation at Runtime

2007-05-14 Thread Patrick Linskey
Also, depending on how you have things configured, OpenJPA can lazily discover classes for a given EntityManager. So, you shouldn't necessarily need to re-initialize / reload anything in particular. -Patrick On 5/14/07, Marc Prud'hommeaux [EMAIL PROTECTED] wrote: James- The CodeGenerator just

Embedding OpenJPA

2007-05-14 Thread Dennis Thrysøe
Hello, I'm planning on embedding OpenJPA in a server (which is running in a J2EE environment). OpenJPA will run entirely within this server, and together with added functionality implement a content container in which entities can be depolyed, just as servlets can in a servlet container.

[jira] Updated: (OPENJPA-51) bad sql pushdown, sub select is missing from clause

2007-05-14 Thread Catalina Wei (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-51?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Catalina Wei updated OPENJPA-51: Attachment: SelectImpl.java.patch Abe, Could you please verify if this patch regress your tests ?

Re: Embedding OpenJPA

2007-05-14 Thread Patrick Linskey
Hi Dennis, If you don't want to use your Java EE's JPA integration features, you might want to look at setting things up so that your content container is generally a persistence container in the parlance of the JPA spec. This means that your container would be responsible for EntityManager

RE: Entity creation at Runtime

2007-05-14 Thread Pinaki Poddar
You can use Serp -- a bytecode manipulation library -- (http://serp.sourceforge.net/). OpenJPA itself uses it to enhance class files. To enhance the dynamically defined class and register it to OpenJPA persistence unit requires few considerations. The attached example demonstrates these steps

Re: [jira] Commented: (OPENJPA-231) Incorrect handling of cascading bidirectional collections during merge/attach

2007-05-14 Thread Gokhan Ergul
Philippe Alexis wrote: Hi Gokhan, I'd been busy with work but kept this particular issue at the back of my mind for coming back to. How far did you get investigating it? Not far I'm afraid --I'm still running with the patch I've posted on jira that fixes the detached case. Since the

What is the use of _impl and _fieldImpl in PCDataImpl class?

2007-05-14 Thread Daniel Lee
Hi, I'm trying to understand OpenJPA open source code but having difficulties in figuring out the use of _impl and _fieldImpl fields in PCDataImpl. Could someone help describe these 2 fields? Many thanks in advance. Tsunfang

Re: What is the use of _impl and _fieldImpl in PCDataImpl class?

2007-05-14 Thread Patrick Linskey
They're used to store the data from OpenJPAStateManager.getImplData() and getImplData(int field). Those impl data slots, in turn, are available for use by StoreManager implementations for random bits of per-field or per-instance state that doesn't fit elsewhere but is useful for the

JNDI lookup in OpenJPA.

2007-05-14 Thread Murali
Hi, I am new to OpenJPA technology. I am having problems while performing JNDI lookup for the bean resources to get the EntityManagerFactory instance. I am trying to perform JNDI lookup operation to fetch the DataSource EntityManagerFactory instances to connect to the DataBase.