problem with NChar in Oracle 10g

2009-12-29 Thread is_maximum
Hello When a field of type nchar is read by OpenJPA the lenght of read value is constant and equals to the lenght of the field but if the lenght of value is less than the lenght of field the remained are filled with space or strange characters and we can't even trim that string value to remove the

Re: EntityManager dosn't release connection in XA transactions

2009-12-24 Thread is_maximum
> value="jndi(TransactionManagerName=java:appserver/TransactionManager)"/> > > Also check the value of configuration.getConnectionRetainMode() that > controls whether the database connection will be released after completion > or not. > > > > is_maximu

Re: EntityManager dosn't release connection in XA transactions

2009-12-23 Thread is_maximum
Hi Pinaki, I did the code you sent and the returned value is an instance of following class: org.apache.openjpa.ee.RegistryManagedRuntime$TransactionManagerRegistryFacade in which a property of type: _registry = com.sun.enterprise.distributedtx.TransactionSynchronizationRegistryImpl is existed.

Re: EntityManager dosn't release connection in XA transactions

2009-12-23 Thread is_maximum
Hi I'm not sure but I think the SunOne the same GlassFish, Am I right? if yes so there is no problem with that class and if no, How can I implement that? As I can see in the source of AutomaticManagedRuntime there is a SunOneManagedRuntime but I don't know how to detect if the GlassFish is the app

Re: EntityManager dosn't release connection in XA transactions

2009-12-22 Thread is_maximum
I attached our sample project to the last post. And... we don't use native sql. we always use EntityManager and the DataSource in above example is only to test if this is the EM issue. Pinaki Poddar wrote: > > The code does not show when/where the connections are released ... neither > the me

Re: EntityManager dosn't release connection in XA transactions

2009-12-22 Thread is_maximum
re released ... neither > the method that uses native SQL nor the method that uses EntityManager > (for which the app server should manage connection reuse/pooling). > Are you sure it is not the native SQL method that is leaking the > connections? > > > > is_maximum wrote

Re: EntityManager dosn't release connection in XA transactions

2009-12-22 Thread is_maximum
FYI, we have monitored our connection pool, when using DataSource the NumConnDestroyed is increased after each statement execution but using EntityManager the NumConnDestroyed is always 0 here is the snippet code and more details: Datasource Classname: oracle.jdbc.xa.client.OracleXADataSource

EntityManager dosn't release connection in XA transactions

2009-12-22 Thread is_maximum
Hello We have configured a distributed transaction in our application server in order to support transaction between Java and .NET clients. The .NET clients are served by webservices and we are using EJB3 webservices and OpenJPA. The problem is that after a bunch of service calls the app. server c

help on dynamic properties

2009-08-27 Thread is_maximum
Hi To give you a big picture on my problem let me explain this example: we have a table for keeping address parts and a corresponding entity: Address: street_line1, street_line2, city, country, number, phone_number now we want that if the user needs an extra field she simply add that field, for

Re: Can we have an entity with no @Id?

2009-05-20 Thread is_maximum
will end up with a select statement and an update following that) or create that id manually (that it is almost impossible) Kevin Sutter wrote: > > Hi is_maximum, > I'm still a little confused by your scenario. Following your described > scenario... Your master table would

Re: Date Problem

2009-05-20 Thread is_maximum
Have you tried java.util.Date instead of java.sql.Date ? Russell Collins wrote: > > Hello, I am new to OpenJPA and the entire persistence objects so bear with > me a little. First of all, I am using Apache Geronimo which has OpenJPA > version1.2.1 and I am moving from Hibernate (which is a pai

Can we have an entity with no @Id?

2009-05-20 Thread is_maximum
Hi We have some tables in which id is not important and actually it is useless. For example we have two logging tables, one is master and the other is keeping details. The only foreign key from the master table is enough and the second table has no relationship with other tables so if we remove it

Re: id and @GeneratedValue

2009-05-20 Thread is_maximum
Ok guys This is a big application for a banking systems and as you know the Oracle's sequences have some problem. The sequences take up cache and this ends up with lacking of cache places and finally the whole performance will be downgraded. There are lots of tables and each has its own sequence s

Re: @MappedSuperClass Cause Null Pointer Exception in Class With IdClass

2009-05-19 Thread is_maximum
Hello I am using OpenJPA 2.0 SNAPSHOT but it seems that the problem still exists Here is the stack trace of exception thrown. The test case succeeded without IdClass and using Embedded id but IdClass has problem. javax.ejb.EJBException: The bean encountered a non-application exception.; nested e

Re: @MappedSuperClass Cause Null Pointer Exception in Class With IdClass

2009-05-19 Thread is_maximum
Hello I am using OpenJPA 2.0 SNAPSHOT but it seems that the problem still exists Here is the stack trace of exception thrown. The test case succeeded without IdClass and using Embedded id but IdClass has problem. javax.ejb.EJBException: The bean encountered a non-application exception.; nested e

Re: id and @GeneratedValue

2009-05-17 Thread is_maximum
> > -Wes > > On 5/17/09, is_maximum wrote: >> >> Hello >> >> Can we tell the OpenJPA to automaticall select maximum id from the table >> to >> set the next id rather than using the OPENJPA_SEQUENCE_TABLE or any other >> database object? &

id and @GeneratedValue

2009-05-17 Thread is_maximum
Hello Can we tell the OpenJPA to automaticall select maximum id from the table to set the next id rather than using the OPENJPA_SEQUENCE_TABLE or any other database object? thanks -- View this message in context: http://n2.nabble.com/id-and-%40GeneratedValue-tp2916124p2916124.html Sent from th

slect for update question

2009-05-17 Thread is_maximum
Hello We use optimistic locking strategy in our application but in one or two cases we need to lock the whole table using "select for update" how to do this? Do we need to create native query? -- View this message in context: http://n2.nabble.com/slect-for-update-question-tp2916053p2916053.ht

Re: persistence problem in distributed environment

2009-05-17 Thread is_maximum
Hi According to OpenJPA manual: Certain application servers automatically enlist their DataSource s in global transactions. When this is the case, OpenJPA should not attempt to commit the underlying connection, leaving JDBC transaction completion to the application server. To notify OpenJPA that

What does this warning say?

2009-04-18 Thread is_maximum
Hello During running a test case and also deployment we have near 30 warnings that says this: [main] openjpa.Runtime - No cache marshaller found for id org.apache.openjpa.conf.MetaDataCacheMaintenance. Can anyone tell me what is this and how to satisfy OpenJPA on this? -- View this message in

Persisting interface

2009-04-05 Thread is_maximum
Hi all My question is if we can persist interfaces instead of pure classes as entities without using OpenJPA features. Currently with a test case I encountered the persistence exception however the OpenJPA logs shows that it is going to insert data but with wrong value !!! 9233 pu-cm TRACE

Re: What is ManagedInterface

2009-03-10 Thread is_maximum
at supply a Persistence capable instance > for the interface (see @Type annotation in the doc). > > Effectively you can define a class say Graph with generic type T and > persist with Person or City at runtime as the node of the real graph. > > > > is_maximum w

Re: What is ManagedInterface

2009-03-09 Thread is_maximum
Thanks Craig, Yes it reduces the redundant code. But I was thinking of a great idea behind that which may leads me to a revolution in my application :) Craig L Russell wrote: > > Hi is_, > > On Mar 9, 2009, at 6:45 AM, is_maximum wrote: > >> >> Hi >>

What is ManagedInterface

2009-03-09 Thread is_maximum
Hi Can anyone explain what is the ManagedInterface good for? What benefit would achieve if we define all of our entities as interfaces? thanks -- View this message in context: http://n2.nabble.com/What-is-ManagedInterface-tp2449023p2449023.html Sent from the OpenJPA Users mailing list archive

[OpenEJB issue] default interceptors

2009-03-08 Thread is_maximum
Hello I know this forum is related to OpenJPA but could not find an OpenEJB forum to ask my question. I have defined a default interceptor as follows but there is a warning that says : WARN - InterceptorBinding references non-existent (undeclared) interceptor: com.foo.interceptor.RequestDataInt

Re: regarding StoreListener

2009-03-04 Thread is_maximum
Well so we can define a listener for all the entities. that's pretty good but one more question is that if we use these entity listeners, can we still find out those fields that has been changed (dirty fields) for example in pre-update and persist the result in DB. As far as I know, inside the ca

Re: problem in looking up local interfaces and reflection

2009-03-04 Thread is_maximum
for the EJB container, rather than the JPA > provider, unless I've misunderstood what you're asking. Which application > server are you using? > > -mike > > On Wed, Mar 4, 2009 at 1:45 AM, is_maximum wrote: > >> >> Hello >> >> I have a p

Re: regarding StoreListener

2009-03-04 Thread is_maximum
• PreUpdate > • PostUpdate > • PostLoad > > Section 3.5 of the JPA 1.0 specification covers how these listeners are > used > in more detail. > > Do you need a listener for any other lifecycle event for your entity, or > does this cover everything you need? > > -m

regarding StoreListener

2009-03-04 Thread is_maximum
Hi First I don't know why there is no useful document on these sort of listeners and how to use it. Second after toiling I was able to find dirty fields and fire the pre-update event. This is for a logging service we have to implement for our application but now the problem is that if you want

problem in looking up local interfaces and reflection

2009-03-03 Thread is_maximum
Hello I have a problem when I want to lookup my session beans. I have declared @EJB on the session bean in which a POJO class will be created using reflection and will be executed in a separate thread. I did this before without reflection and it works fine but if my class is instantiated at runt

Re: 'Standalone' Sequence Generator

2009-02-12 Thread is_maximum
tion and I convinced this exception has raised for something quite different. thanks again for your reply Kevin Sutter wrote: > > Hi, > Some comments below, but I don't have a complete answer to your > enhancement > questions yet... > > On Thu, Feb 12, 2009 at 6:38 AM, is_

Re: 'Standalone' Sequence Generator

2009-02-12 Thread is_maximum
Hi We were able to improve the performance a bit but still far way to go. Some changes in code and creating index in database help us more. But still we have problem in batch limit. At first, I had set it to -1 that ends up in a weird OptimisticLockException in all persist methods and then I se

Re: Join Tables by value

2009-02-03 Thread is_maximum
I am eager to know if it is possible. I had such problem and eventually ended up that it's impossible because there is no such relationship defined in Sun's spec but hope if it's possible in OpenJPA. Nuno Furtado wrote: > > Good day to all, > > i have the following tables : > > SATAFIL0: >

Re: [URGENT] performance issues

2009-02-02 Thread is_maximum
Wang wrote: > > Hi, > > Sometimes the OptimisticLockException is thrown because of the > SQLException during insert. Could you turn on the trace and send us the > log file? > > value="File=c:\\trace.log,DefaultLevel=TRACE"/> > > Regards, > Fay

Re: [URGENT] performance issues

2009-02-01 Thread is_maximum
ter wrote: > > On Thu, Jan 29, 2009 at 2:20 PM, is_maximum wrote: > >> >> I really don't know why after about 6 months working with OpenJPA and >> inserting near a million records we should face this problem? what have >> changed that cause optimistic locking t

Re: [URGENT] performance issues

2009-01-29 Thread is_maximum
Thanks Pinaki, I was really stuck and abandoned any hope but your useful hints on classpath issues saved me. but today we had another weird day!!! First I create version field for some tables and put @Version on them and awfully everything got worst. even a simple insert with different account (

Re: [URGENT] performance issues

2009-01-29 Thread is_maximum
. > > Both commit will succeed and database will have 'Harry Smith'. > > 2. Build-time enhancement i.e. to execute one command after compilation > performs best and minimizes complexity of load-time-weaving. I have never > understood what really makes people to avo

Re: [URGENT] performance issues

2009-01-28 Thread is_maximum
locking is not a good option for the entities with very frequent update actions. At the time we call the merge() method I can see the oracle Kevin Sutter wrote: > > More comments inline... > > On Wed, Jan 28, 2009 at 12:13 PM, is_maximum wrote: > >> >> Hi Kevin >

Re: [URGENT] performance issues

2009-01-28 Thread is_maximum
equent update we make into the tables. finally I appreciate your reply and trying to help me. thanks Kevin Sutter wrote: > > Hi is_maximum, > The results you are experiencing are atypical. Normally, when the Entity > classes are enhanced, OpenJPA's performance is one of or the be

[URGENT] performance issues

2009-01-28 Thread is_maximum
Hi We have a big problem in performance. We are using JProbe to inspect what happens in our code and there is a critical business method which is required to have a high TPS but unfortunately this method is doing its job really slow. Using JProbe, we found out that in a simple query or persist m

Re: need advice

2009-01-23 Thread is_maximum
lem. > > It seems that without flush() OpenJPA will store all the queued queries > on the heap (as expected). Regular flush() will free space on heap and > reduce the need for garbage collection. > > So, my opinion would be to go for it. > > -Ognjen > > is_maximum w

Re: using UserTransaction problem

2009-01-22 Thread is_maximum
d more > details about your app - and if possible, test code. > > -Jeremy > > On Wed, Jan 21, 2009 at 2:33 AM, is_maximum wrote: > >> >> Hi >> I am using UserTransaction in my stateless session bean and got this >> error >> and all the process wi

Re: Entity that referring to it self

2009-01-21 Thread is_maximum
We've got a tree structure like yours and we use @OneToMany and @ManyToOne consider this: class Project { //properties.,.. @OneToMany(mappedBy = "parent") private List relatedProjects; @ManyToOne private Project parent; } but in my point of view if your structure has not more th

using UserTransaction problem

2009-01-21 Thread is_maximum
Hi I am using UserTransaction in my stateless session bean and got this error and all the process will stop ERROR - The stateless session bean started a transaction but did not complete it. there is a method in which some other private methods is being called. can anyone help me out -- View th

Re: how do you manage db exceptions?

2009-01-18 Thread is_maximum
Hi It is a long time since my last post and I was really busy. Now after things getting back to its normal way we face the same problem. Unfortunately I was unable to find a way to catch the SQLException, because OpenJPA throws a PersistenceException which is not an EJB exeption (javax.persistence

need advice

2008-12-21 Thread is_maximum
Hi we have a DAO class includes save() update() delete() etc. each business methods in our stateless classes may have a number of CRUD operations and all occur through that DAO class. Currently we don't use flush() method for each save() or update() so at the end of the transaction (business me

Re: concurrent transactions...

2008-12-21 Thread is_maximum
thanks for your reply I was able to solve the problem. because I had created a new list from a list of attached entities this new list was detached and that was the source of error. Thanks anyway Pinaki Poddar wrote: > > Hi, > 1. did you configure > openjpa.Multithreaded=true > >

concurrent transactions...

2008-12-16 Thread is_maximum
Hello I have a business method in which a list will be processed and a number of records will be persisted for each element in the list, now for performance issues we need to split the list into a a few sublist and then create a thread for each. in normal proccessing the method works fine but

Re: how do you manage db exceptions?

2008-11-29 Thread is_maximum
Judes, The first approach seems to be very nice. I like it :) but can you tell me how can I write an simple observer to notify an object that say, SQLException has been thrown? I know the observer pattern but what I can't understand is that because SQLException is not my object so I can't handle

Re: how do you manage db exceptions?

2008-11-29 Thread is_maximum
Actually this question is related to EJB 3 but I since I am using OpenJPA I thought it was better to put my question here. when you are using merge() or persist() methods of EntityManager, these methods may throw SQLException wrapped in PersistenceException and finally at the end of my business

how do you manage db exceptions?

2008-11-28 Thread is_maximum
Hi I am eager to know haow do you deal with Sql exceptions which are unchecked and cannot be determined at runtime. for example, unique constraint exception, integrity exception etc. What I know is that all these sort of exceptions are wrapped in SQLException but is there any way to distinguish t

Re: query question

2008-11-27 Thread is_maximum
No one to answer me? -- View this message in context: http://n2.nabble.com/query-question-tp1580062p1585139.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

query question

2008-11-26 Thread is_maximum
Hello I have problem with following query: select e from GeneralEntry as e where ?1 like CONCAT(e.position,'%') and CONCAT(?1,'%') not like e.position and ( (?2 = true) or (?2 = false and e.position <> '1') ) openJPA doesn't accept ?1 as a left side operand !!! and if replace them my query

prblem with using stateless bean in StoreListener

2008-11-25 Thread is_maximum
Hello in order to track changes and persist them in database I have implemented a StoreListener say StoreListenerImpl and in afterStore() method I lookup an SLSB to persist the changes but at the point of calling its business method for my SB the following exception is thrown. Can anyone help m

[URGENT] OpenJPA and problem with constraints

2008-11-17 Thread is_maximum
Hello we have a problem when we create constraints in our database. first scenario is delete action in order to delete a record in a table we have to delete its child records in another table first so when a business method has been called in the same transaction, I remove all the child records a

Re: two object of the same record!!!

2008-11-16 Thread is_maximum
BTW, I am using OpenJPA 1.2.0 and OpenEJB -- View this message in context: http://n2.nabble.com/two-object-of-the-same-record%21%21%21-tp1508313p1508314.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

two object of the same record!!!

2008-11-16 Thread is_maximum
Hello We have faced a problem and I think this is likely a bug in openJpa to understand the problem I describe it as below: - we have a simple named query in which we used "left join fetch" select voucher from Voucher voucher left join fetch voucher.entries where voucher.voucherNoSuspense = ?1

Re: [URGENT]ConcurrentModificationException in a tree structure

2008-10-18 Thread is_maximum
g? This may be an instance of > OPENJPA-732 > <http://issues.apache.org/jira/browse/OPENJPA-732?page=com.atlassian.jira.ext.fisheye:fisheye-issuepanel>if > you're cascading a persist back to yourself. > > -mike > > On Sat, Oct 18, 2008 at 9:13 AM, is_maximum <[EMAIL P

[URGENT]ConcurrentModificationException in a tree structure

2008-10-18 Thread is_maximum
Hello I have a self-refferring entity. I can't persist more than 2 level into the table. OpenJPA throws a ConcurrentModificationException is this a bug? I am running my app in J2SE platform. thanks -- View this message in context: http://n2.nabble.com/-URGENT-ConcurrentModificationException-i

how to determine dirty fields

2008-10-16 Thread is_maximum
Hi all, We are planning to implement a tracking system in which we are using LifecycleListeners of OpenJpa. The problem is that the state manager of OpenJpa doesn't return only dirty fields but all the fields. Here is the snippet code to retrieve the required fields: public static String

Re: how to get dirty fields

2008-10-15 Thread is_maximum
This is urgent please help -- View this message in context: http://n2.nabble.com/how-to-get-dirty-fields-tp1332610p1337898.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

OpenJPA warnings

2008-10-15 Thread is_maximum
Hello when I run my program, OpenJPA warn me following messages: OpenJPA cannot map field "com.foo.core.gl.entity.GeneralEntry.authorizedThirdParties" efficiently. It is of an unsupported type. The field value will be serialized to a BLOB by default. and openjpa.Enhance - The field generalE