Craig,
I have tested it. It's cool!
The db connection will be returned into pool and I can reuse the
JPAEntityManager!
Thanks again.
Regards,
Yu Wang
On Fri, Jan 22, 2010 at 9:57 AM, wang yu wrote:
> Craig:
> Thank you for your quick response.
> If I close it, the connection wi
conn.close();
>
> Regards,
>
> Craig
> On Jan 21, 2010, at 1:26 AM, wang yu wrote:
>
>> Gurus:
>> I use OpenJPA 1.2.1 and dbcp:
>> >
>> value="org.apache.commons.dbcp.BasicDataSource" />
>>
Gurus:
I use OpenJPA 1.2.1 and dbcp:
And I found the connection pool worked perfect for JPA query. But if I
use JDBC query like following:
OpenJPAEntityManager open_manager = OpenJPAPersistence
e next major (2.0.0) and minor (1.3.0) versions of
> OpenJPA.
>
> In the mean time you can grab a nightly build from the builds
> page<http://openjpa.apache.org/downloads.html> (look
> for 2.0.0-SNAPSHOT). I'll try to get the fix ported to 1.3.0 this weekend
> too.
point for other tools.
>
> It sounds like you have written the encryption code in your extension for
> DBCP so it should be fairly easy to wrap in an encryption provider.
>
> Hope this helps,
> -mike
>
> On Fri, Aug 7, 2009 at 1:25 AM, wang yu wrote:
>
>> Rick,
&
Rick,
Thank you for your information. I have resolved this issue by
modifying dbcp source code.
The bad part is dbcp can be built with jdk 1.4 only which made build
system little bit complicated:-)
If you can deliver encryption feature in next release, I'll be very
pleased to use it.
Regards,
Yu
Pinaki,
Yes ,you're right.
Thanks!
Yu Wang
On Mon, Jul 27, 2009 at 8:32 PM, Pinaki Poddar wrote:
>
> Hi,
> Can you please change the parameter name "from" to something else?
> The error is during parse and may have be related to the fact that "from" is
> a reserved word in JPQL.
>
>
>
> -
>
And I used OpenJPA 1.2.1.
-Yu Wang
On Mon, Jul 27, 2009 at 2:20 PM, wang yu wrote:
> Hello,
> I met an OpenJPA Timestamp filed in JPQL where clause issue.
> I used it as:
> EntityManagerFactory factory =
> Persistence.createEntit
Hello,
I met an OpenJPA Timestamp filed in JPQL where clause issue.
I used it as:
EntityManagerFactory factory =
Persistence.createEntityManagerFactory(
"test", System.getProperties());
String sql= "SELECT callpath FRO
loaded (ie not set after detaching). Did you serialize the entity after
> closing the original context (if so there are other properties that you may
> need to set).
>
> -mike
>
> On Tue, Jul 14, 2009 at 3:21 AM, wang yu wrote:
>
>> Hello,
>> I uses OpenJPA 1.2.1.
>
ntext?
Regards,
Yu Wang
On Mon, Jul 13, 2009 at 5:44 PM, wang yu wrote:
> Hello,
> My case is:
> 1. Find an entity and close the context.
> 2. Update it with user input.
> 3. Create a new EntityManager and try to merge it into new context.
>
> Then the foll
Hello,
My case is:
1. Find an entity and close the context.
2. Update it with user input.
3. Create a new EntityManager and try to merge it into new context.
Then the following exception was thrown:
org.apache.openjpa.persistence.InvalidStateException: The generated
value processing detected an
it should work on the
> EMFactory but not with the EM.
>
> -mike
>
> On Wed, Jun 17, 2009 at 4:21 AM, wang yu wrote:
>
>> Hi,
>> Anybody else has tried this?
>>
>> Regards,
>> Yu Wang
>>
>> On Thu, Jun 11, 2009 at 4:54 PM, wang yu wrote:
&g
but it
>> should help for your scenario.
>>
>> [1] http://issues.apache.org/jira/browse/OPENJPA-817
>>
>> -mike
>>
>> On Mon, Jun 22, 2009 at 6:03 AM, wang yu wrote:
>>
>> > Hello,
>> > If I use GenerationType.AUTO or Genera
Hello,
If I use GenerationType.AUTO or GenerationType.TABLE for PK field and
let OpenJPA persist some entities cascade , in some cases, OpenJPA
will try to persist child entity before the father entity.
How to resolve this issue?
I must use GenerationType.AUTO for oracle because it doesn't support
Hi Milosz,
Yes, you're right. And I have checked the source code, the AUTO is
total identical with TABLE in OpenJPA.
Thank you for your patient help!
Regards,
Yu Wang
On Wed, Jun 17, 2009 at 6:02 PM, Miłosz Tylenda wrote:
> Hi Yu Wang,
>
> The error message seems to say "Attempt to modify an id
Hi,
Anybody else has tried this?
Regards,
Yu Wang
On Thu, Jun 11, 2009 at 4:54 PM, wang yu wrote:
> Hi,
> I guess it's a bug of OpenJPA 1.2.1.
> I used ojdbc6.jar to connect oracle11g.
>
> If I pass username and password in persistence.xml, everything will be OK.
> But i
Hello Milosz,
I found OpenJpa created table OPENJPA_SEQUENCE_TABLE automatically in
the runtime, following is a fragment of my log file:
44048 xxx TRACE [Persistence-thread-0] openjpa.jdbc.SQL - executing prepstmnt 25906379 SELECT
SEQUENCE_VALUE FROM xxx.OPENJPA_SEQUENCE_TABLE WHERE ID = ? FOR
Milosz,
I have tried "@GeneratedValue(strategy=GenerationType.AUTO)", it works
fine for oracle but doesn't work for Derby.
Regards,
Yu Wang
On Sat, Jun 13, 2009 at 7:19 PM, Miłosz Tylenda wrote:
> Yu Wang,
>
> Try using "@GeneratedValue(strategy=GenerationType.AUTO)". This should
> automaticall
Hello,
I found If I user derby, I need to use
"@GeneratedValue(strategy=GenerationType.IDENTITY)" for ID field.
And for oracle database, I need to use
"@GeneratedValue(strategy=GenerationType.SEQUENCE)".
The question is if I want to use same entity classes to support both
derby and oracle, how sho
Hi,
I guess it's a bug of OpenJPA 1.2.1.
I used ojdbc6.jar to connect oracle11g.
If I pass username and password in persistence.xml, everything will be OK.
But if I pass them from java code like below, the connecting will fail:
map.put("openjpa.ConnectionUserName","tsam");
g/builds/latest/docs/manual/manual.html#ref_guide_dbsetup_retain
>
> Hope this helps,
> -mike
>
>
>
> On Mon, Jun 8, 2009 at 12:22 AM, wang yu wrote:
>
>> Hi Mike,
>> Following is how I close cache:
>>
>>
>>
you close the cache of OpenJPA EntityManagers? I have very little
> experience with Spring, but the stack makes it look like it's handing out
> the EntityManager that is being used.
>
> -mike
>
> On Fri, Jun 5, 2009 at 2:44 AM, wang yu wrote:
>
>> Hello,
>> My
Hello,
My application uses Tomcat6,derby,spring and OpenJPA 1.20.
My case is stopping derby database and restarting it. And I found even
if I catch the database connection broken exception and create an new
EntityManager successfully after derby restarts, the following
exception stack will be print
hanks.
>
> Kevin
>
> [1] http://commons.apache.org/dbcp/
>
> On Mon, May 18, 2009 at 2:47 AM, wang yu wrote:
>
>> Hi Kevin,
>> Thanks.
>> The link you gave indicate how to extend BasicDataSourceFactory. But I
>> guess this approach isn't feasibl
> http://stackoverflow.com/questions/129160/how-to-avoid-storing-passwords-in-the-clear-for-tomcats-server-xml-resource-defi
>
>
>
> On Fri, May 15, 2009 at 2:33 AM, wang yu wrote:
>
>> Hi Kevin,
>> Thank you. You had real good solutions but unfortunately neither of
>
, you should use a jndi lookup of a
> datasource. This would be the most secure.
>
> Kevin
>
> On Tue, May 12, 2009 at 4:31 AM, wang yu wrote:
>
>> As title.
>>
>> Regards,
>> Yu Wang
>>
>
As title.
Regards,
Yu Wang
your ant file like below:
On Fri, Mar 14, 2008 at 11:03 AM, wang yu <[EMAIL PROTECTED]> wrote:
> Hello,
> I met one performance issue with apache-openjpa-1.0.2.
the problem is resolved.
On Fri, Mar 14, 2008 at 11:03 AM, wang yu <[EMAIL PROTECTED]> wrote:
> Hello,
> I met one performance issue with apache-openjpa-1.0.2.
> My environment includes apache-openjpa-1.0.2,db-derby-10.3.2.1-bin,and
> apache-tomcat-5.5.26.
>
> Belo
Hello,
I met one performance issue with apache-openjpa-1.0.2.
My environment includes apache-openjpa-1.0.2,db-derby-10.3.2.1-bin,and
apache-tomcat-5.5.26.
Below is the openjpa-related properties defined in the persistnce.xml:
And there is my
31 matches
Mail list logo