svn commit: r956466 - /james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/JPAMessageMapper.java

2010-06-21 Thread norman
Author: norman
Date: Mon Jun 21 06:14:13 2010
New Revision: 956466

URL: http://svn.apache.org/viewvc?rev=956466view=rev
Log:
Need to be sorted..

Modified:

james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/JPAMessageMapper.java

Modified: 
james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/JPAMessageMapper.java
URL: 
http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/JPAMessageMapper.java?rev=956466r1=956465r2=956466view=diff
==
--- 
james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/JPAMessageMapper.java
 (original)
+++ 
james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/JPAMessageMapper.java
 Mon Jun 21 06:14:13 2010
@@ -240,7 +240,7 @@ public class JPAMessageMapper extends JP
 @SuppressWarnings(unchecked)
 public ListMailboxMembershipLong findUnseenMessagesInMailbox(Long 
mailboxId, int limit)  throws StorageException {
 try {
-Query query = 
getEntityManager().createNamedQuery(findUnseenMessagesInMailbox).setParameter(idParam,
 mailboxId);
+Query query = 
getEntityManager().createNamedQuery(findUnseenMessagesInMailboxOrderByUid).setParameter(idParam,
 mailboxId);
 if (limit  0) {
 query = query.setMaxResults(limit);
 }



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



svn commit: r956543 - in /james/server/trunk: dnsserver/ spring-common/

2010-06-21 Thread eric
Author: eric
Date: Mon Jun 21 12:28:30 2010
New Revision: 956543

URL: http://svn.apache.org/viewvc?rev=956543view=rev
Log:
Add .* to svn:ignore property.

Modified:
james/server/trunk/dnsserver/   (props changed)
james/server/trunk/spring-common/   (props changed)

Propchange: james/server/trunk/dnsserver/
--
--- svn:ignore (original)
+++ svn:ignore Mon Jun 21 12:28:30 2010
@@ -1 +1,2 @@
 target
+.*

Propchange: james/server/trunk/spring-common/
--
--- svn:ignore (original)
+++ svn:ignore Mon Jun 21 12:28:30 2010
@@ -1 +1,2 @@
 target
+.*



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[jira] Created: (JSPF-88) Split Async/Thread based implementations in seperate modules

2010-06-21 Thread Norman Maurer (JIRA)
Split Async/Thread based implementations in seperate modules


 Key: JSPF-88
 URL: https://issues.apache.org/jira/browse/JSPF-88
 Project: JAMES jSPF
  Issue Type: Task
  Components: Core
Reporter: Norman Maurer
 Fix For: 0.9.9


We should split the Async/Thread based implementations into different modules

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



svn commit: r956577 - /james/jspf/trunk/src/site/xdoc/index.xml

2010-06-21 Thread norman
Author: norman
Date: Mon Jun 21 13:25:16 2010
New Revision: 956577

URL: http://svn.apache.org/viewvc?rev=956577view=rev
Log:
Update to reflect release of jspf 0.9.8

Modified:
james/jspf/trunk/src/site/xdoc/index.xml

Modified: james/jspf/trunk/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/james/jspf/trunk/src/site/xdoc/index.xml?rev=956577r1=956576r2=956577view=diff
==
--- james/jspf/trunk/src/site/xdoc/index.xml (original)
+++ james/jspf/trunk/src/site/xdoc/index.xml Mon Jun 21 13:25:16 2010
@@ -33,7 +33,14 @@
   /p
 /section
 section name=News
-   
+  
+subsection name=2010
+ 
+  h4Jun/2010 - jSPF-0.9.8 released/h4
+  pThe JAMES Developer Team is proud to announce the a 
href=../download.cgiavailability/a release of APACHE jSPF-0.9.8. This 
release includes fixes for correct handling of TXT record escapings and pass 
the fc4408-tests-2009.10 testsuite. 
+  /p
+/subsection 
+
 subsection name=2009
  
   h4Jun/2009 - jSPF-0.9.7 released/h4



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



svn commit: r956581 - in /james/project/trunk/project/src/site/xdoc: download.xml index.xml newsarchive.xml

2010-06-21 Thread norman
Author: norman
Date: Mon Jun 21 13:37:47 2010
New Revision: 956581

URL: http://svn.apache.org/viewvc?rev=956581view=rev
Log:
Update to reflect jspf and mailet-base releases

Modified:
james/project/trunk/project/src/site/xdoc/download.xml
james/project/trunk/project/src/site/xdoc/index.xml
james/project/trunk/project/src/site/xdoc/newsarchive.xml

Modified: james/project/trunk/project/src/site/xdoc/download.xml
URL: 
http://svn.apache.org/viewvc/james/project/trunk/project/src/site/xdoc/download.xml?rev=956581r1=956580r2=956581view=diff
==
--- james/project/trunk/project/src/site/xdoc/download.xml (original)
+++ james/project/trunk/project/src/site/xdoc/download.xml Mon Jun 21 13:37:47 
2010
@@ -181,33 +181,33 @@ href=[preferred]/james/mime4j/Other F
 
 /section
 
-section name=Apache jSPF
-pApache James jSPF 0.9.7 is the latest jSPF stable version:/p
+section name=Apache 0.9.8
+pApache James jSPF 0.9.8 is the latest jSPF stable version:/p
 ul
 
 liBinary Resolver (JAR): a
-href=[preferred]/james/jspf/binaries/apache-jspf-resolver-0.9.7.jarapache-jspf-resolver-0.9.7.jar/a
 [a
-href=http://www.apache.org/dist/james/jspf/binaries/apache-jspf-resolver-0.9.7.jar.asc;PGP/a]/li
+href=[preferred]/james/jspf/binaries/apache-jspf-resolver-0.9.8.jarapache-jspf-resolver-0.9.8.jar/a
 [a
+href=http://www.apache.org/dist/james/jspf/binaries/apache-jspf-resolver-0.9.8.jar.asc;PGP/a]/li
 
 liBinary Tester (JAR): a
-href=[preferred]/james/jspf/binaries/apache-jspf-tester-0.9.7.jarapache-jspf-tester-0.9.7.jar/a
 [a
-href=http://www.apache.org/dist/james/jspf/binaries/apache-jspf-tester-0.9.7.jar.asc;PGP/a]/li
+href=[preferred]/james/jspf/binaries/apache-jspf-tester-0.9.8.jarapache-jspf-tester-0.9.8.jar/a
 [a
+href=http://www.apache.org/dist/james/jspf/binaries/apache-jspf-tester-0.9.8.jar.asc;PGP/a]/li
 
 liBinary (ZIP Format): a
-href=[preferred]/james/jspf/binaries/apache-jspf-0.9.7-bin.zipapache-jspf-0.9.7-bin.zip/a
 [a
-href=http://www.apache.org/dist/james/jspf/binaries/apache-jspf-0.9.7-bin.zip.asc;PGP/a]/li
+href=[preferred]/james/jspf/binaries/apache-jspf-0.9.8-bin.zipapache-jspf-0.9.8-bin.zip/a
 [a
+href=http://www.apache.org/dist/james/jspf/binaries/apache-jspf-0.9.8-bin.zip.asc;PGP/a]/li
 
 liBinary (Unix TAR.GZ): a
-href=[preferred]/james/jspf/binaries/apache-jspf-0.9.7-bin.tar.gzapache-jspf-0.9.7-bin.tar.gz/a
 [a
-href=http://www.apache.org/dist/james/jspf/binaries/apache-jspf-0.9.7-bin.tar.gz.asc;PGP/a]/li
+href=[preferred]/james/jspf/binaries/apache-jspf-0.9.8-bin.tar.gzapache-jspf-0.9.8-bin.tar.gz/a
 [a
+href=http://www.apache.org/dist/james/jspf/binaries/apache-jspf-0.9.8-bin.tar.gz.asc;PGP/a]/li
 
 liSource (Unix TAR.GZ): a
-href=[preferred]/james/jspf/source/apache-jspf-0.9.7-src.tar.gzapache-jspf-0.9.7-src.tar.gz/a
 [a
-href=http://www.apache.org/dist/james/jspf/source/apache-jspf-0.9.7-src.tar.gz.asc;PGP/a]/li
+href=[preferred]/james/jspf/source/apache-jspf-0.9.8-src.tar.gzapache-jspf-0.9.8-src.tar.gz/a
 [a
+href=http://www.apache.org/dist/james/jspf/source/apache-jspf-0.9.8-src.tar.gz.asc;PGP/a]/li
 
 liSource (ZIP Format): a
-href=[preferred]/james/jspf/source/apache-jspf-0.9.7-src.zipapache-jspf-0.9.7-src.zip/a
 [a
-href=http://www.apache.org/dist/james/jspf/source/apache-jspf-0.9.7-src.zip.asc;PGP/a]/li
+href=[preferred]/james/jspf/source/apache-jspf-0.9.8-src.zipapache-jspf-0.9.8-src.zip/a
 [a
+href=http://www.apache.org/dist/james/jspf/source/apache-jspf-0.9.8-src.zip.asc;PGP/a]/li
 
 lia href=[preferred]/james/jspf/binaries/Other Binaries/a/li
 

Modified: james/project/trunk/project/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/james/project/trunk/project/src/site/xdoc/index.xml?rev=956581r1=956580r2=956581view=diff
==
--- james/project/trunk/project/src/site/xdoc/index.xml (original)
+++ james/project/trunk/project/src/site/xdoc/index.xml Mon Jun 21 13:37:47 2010
@@ -9,6 +9,11 @@
  div id=newsbox
 subsection name=News
   ul
+liJun/2010 - ul
+lia href=newsarchive.html#21062010_1strongApache jSPF 
0.9.8/strong released/a/li   
+lia href=newsarchive.html#21062010strongApache Mailet Base 
1.1/strong released/a/li   
+/ul
+/li
 liMay/2010 - ul
 lia href=newsarchive.html#14052010_1strongApache jSieve 0.4 
/strong released/a/li
 lia href=newsarchive.html#14052010strongApache Mailet Standard 
1.0 /strong released/a/li

Modified: james/project/trunk/project/src/site/xdoc/newsarchive.xml
URL: 
http://svn.apache.org/viewvc/james/project/trunk/project/src/site/xdoc/newsarchive.xml?rev=956581r1=956580r2=956581view=diff
==
--- james/project/trunk/project/src/site/xdoc/newsarchive.xml (original)
+++ james/project/trunk/project/src/site/xdoc/newsarchive.xml Mon Jun 21 
13:37:47 2010
@@ 

[ANNOUNCE] Apache James jSPF 0.9.8 release

2010-06-21 Thread Norman Maurer
Hi there,

The JAMES Developer Team is proud to announce the availability release
of  jSPF-0.9.8. This release includes fixes for correct handling of
TXT record escapings and pass the fc4408-tests-2009.10 testsuite.

The jSPF library is pure Java SPF implementation. It was designed to
match the current SPF-Specs of 2006-2009 . SPF is also knows as Sender
Policy Framework. It was designed to detect email spoofing.This is the
solution if you ever was tired of getting spam from yourself. For more
informations see  openspf website.

You can get the release from http://james.apache.org/download.cgi#Apache_jSPF.

Regards,
Norman Maurer

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



[ANNOUNCE] Apache James Mailet Base 1.1 released

2010-06-21 Thread Norman Maurer
Hi there,

The Apache JAMES Project is pleased to announce a new Apache Mailet
Base release which fixes a NullPointerException when using
MatcherInverter. Beside this nothing critical was fixed.

Mailet Base is a toolkit for builders of mailets and matchers with
minimal dependencies.

You can get it from http://james.apache.org/download.cgi#Apache_Mailet_Base.

Regards,
Norman Maurer

-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



svn commit: r956648 - in /james/server/trunk: imapserver/src/main/java/org/apache/james/imapserver/ imapserver/src/main/java/org/apache/james/user/impl/file/ user-api/src/main/java/org/apache/james/ap

2010-06-21 Thread norman
Author: norman
Date: Mon Jun 21 17:29:19 2010
New Revision: 956648

URL: http://svn.apache.org/viewvc?rev=956648view=rev
Log:
Rename UserRepositoryException to UsersRepositoryException to be more inline 
with the UsersRepository interface

Added:

james/server/trunk/user-api/src/main/java/org/apache/james/api/user/UsersRepositoryException.java
  - copied, changed from r955326, 
james/server/trunk/user-api/src/main/java/org/apache/james/api/user/UserRepositoryException.java
Removed:

james/server/trunk/user-api/src/main/java/org/apache/james/api/user/UserRepositoryException.java
Modified:

james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/UserMetaDataRepositorySubscripter.java

james/server/trunk/imapserver/src/main/java/org/apache/james/user/impl/file/FileUserMetaDataRepository.java

james/server/trunk/user-api/src/main/java/org/apache/james/api/user/UserMetaDataRespository.java

james/server/trunk/user-function/src/main/java/org/apache/james/userrepository/ListUsersJdbcRepository.java

Modified: 
james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/UserMetaDataRepositorySubscripter.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/UserMetaDataRepositorySubscripter.java?rev=956648r1=956647r2=956648view=diff
==
--- 
james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/UserMetaDataRepositorySubscripter.java
 (original)
+++ 
james/server/trunk/imapserver/src/main/java/org/apache/james/imapserver/UserMetaDataRepositorySubscripter.java
 Mon Jun 21 17:29:19 2010
@@ -29,7 +29,7 @@ import javax.annotation.Resource;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.james.api.user.UserMetaDataRespository;
-import org.apache.james.api.user.UserRepositoryException;
+import org.apache.james.api.user.UsersRepositoryException;
 import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.mailbox.MailboxSession;
 import org.apache.james.imap.mailbox.SubscriptionException;
@@ -65,7 +65,7 @@ public class UserMetaDataRepositorySubsc
 try {
 final UserSubscription subscription = 
getUserSubscription(session.getUser().getUserName());
 subscription.subscribe(mailbox);
-} catch (UserRepositoryException e) {
+} catch (UsersRepositoryException e) {
 throw new 
SubscriptionException(HumanReadableText.GENERIC_SUBSCRIPTION_FAILURE, e);
 }
 }
@@ -82,7 +82,7 @@ public class UserMetaDataRepositorySubsc
 final UserSubscription subscription = 
getUserSubscription(session.getUser().getUserName());
 final CollectionString results = (Collection) 
subscription.subscriptions().clone();
 return results;
-} catch (UserRepositoryException e) {
+} catch (UsersRepositoryException e) {
 throw new 
SubscriptionException(HumanReadableText.GENERIC_SUBSCRIPTION_FAILURE, e);
 }
 }
@@ -95,7 +95,7 @@ public class UserMetaDataRepositorySubsc
 try {
 final UserSubscription subscription = 
getUserSubscription(session.getUser().getUserName());
 subscription.unsubscribe(mailbox);
-} catch (UserRepositoryException e) {
+} catch (UsersRepositoryException e) {
 throw new 
SubscriptionException(HumanReadableText.GENERIC_UNSUBSCRIPTION_FAILURE, e);
 }
 }
@@ -124,7 +124,7 @@ public class UserMetaDataRepositorySubsc
 this.repository = repository;
 }
 
-public synchronized void subscribe(String mailbox) throws 
UserRepositoryException {
+public synchronized void subscribe(String mailbox) throws 
UsersRepositoryException {
 final HashSetString existingSubscriptions = subscriptions();
 if (!existingSubscriptions.contains(mailbox)) {
 final HashSetString newSubscriptions;
@@ -138,7 +138,7 @@ public class UserMetaDataRepositorySubsc
 }
 }
 
-public synchronized void unsubscribe(String mailbox) throws 
UserRepositoryException {
+public synchronized void unsubscribe(String mailbox) throws 
UsersRepositoryException {
 final HashSetString subscriptions = subscriptions();
 if (subscriptions.remove(mailbox)) {
 repository.setAttribute(user, subscriptions, META_DATA_KEY);
@@ -146,7 +146,7 @@ public class UserMetaDataRepositorySubsc
 }
 
 @SuppressWarnings(unchecked)
-public HashSetString subscriptions() throws UserRepositoryException {
+public HashSetString subscriptions() throws UsersRepositoryException 
{
 try {
 final HashSetString storedSubscriptions = (HashSetString) 
repository.getAttribute(user, META_DATA_KEY);
 final 

svn commit: r956649 - /james/server/trunk/core-function/src/main/java/org/apache/james/mailrepository/AbstractMailRepository.java

2010-06-21 Thread norman
Author: norman
Date: Mon Jun 21 17:36:17 2010
New Revision: 956649

URL: http://svn.apache.org/viewvc?rev=956649view=rev
Log:
cleanup

Modified:

james/server/trunk/core-function/src/main/java/org/apache/james/mailrepository/AbstractMailRepository.java

Modified: 
james/server/trunk/core-function/src/main/java/org/apache/james/mailrepository/AbstractMailRepository.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/core-function/src/main/java/org/apache/james/mailrepository/AbstractMailRepository.java?rev=956649r1=956648r2=956649view=diff
==
--- 
james/server/trunk/core-function/src/main/java/org/apache/james/mailrepository/AbstractMailRepository.java
 (original)
+++ 
james/server/trunk/core-function/src/main/java/org/apache/james/mailrepository/AbstractMailRepository.java
 Mon Jun 21 17:36:17 2010
@@ -31,7 +31,6 @@ import org.apache.james.services.store.S
 import org.apache.james.util.Lock;
 import org.apache.mailet.Mail;
 
-import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 import javax.mail.MessagingException;
 



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org



Re: [IMAP] Cut a milestone ?

2010-06-21 Thread Eric Charles

Hi, that's me again,

I just posted some questions on openjpa ml.

If we want to keep JPAStreamingMessage without intermediary tables, we 
may use the proprietary @ElementJoinColumn annotation.
For other features, such as index creation, we also probably need 
proprietary annotations.


For example, the current findUnseenMessagesInMailboxOrderByUid
SELECT membership FROM Membership membership WHERE membership.mailboxId 
= :idParam AND membership.seen = FALSE ORDER BY membership.uid ASC

could benefit from
@Index @Id private long uid;
@Index @Id private long mailboxId;

So the questions is Should we use those openjpa annotations?.
I personally don't see why we couldn't.
What do you think of?

Btw, I think the original question was Cut a milestone ?... :)

Tks,

Eric

PS: Better use the apache-james-imap-jpa-0.1-M2-SNAPSHOT.jar enhanced 
via maven in eclipse. If you use the project class folder, the 
enhancement is not always as it should. Many problems during dev comes 
from eclipse (or whatever) does not  enhance, or take the previous 
enhancement... F5 is also your friend.



On 06/17/2010 11:33 PM, Eric Charles wrote:

Hi Tim,

Sorry, message_id was indeed needed in the patch, otherwise you've 
got a id column which is pk and fk.
I still made some additional tests, and omitting the @JoinColumn also 
works.
DB is created and mail delivery is correctly working when you apply on 
JPAProperty.

As soon as you apply on JPAProperty and JPAHeader, it hangs.

Still looking for.
Bye,

Eric


On 06/17/2010 08:26 AM, Eric Charles wrote:

Hi Tim,
Comments inside.
Tks,
Eric

On 06/17/2010 12:58 AM, Tim-Christian Mundt wrote:

Hey Eric,


For example, with Derby, the schema is create with
GENERATED ALWAYS columns and not GENERATED BY DEFAULT.
Why's that? Wouldn't GENERATED BY DEFAULT solve this problem so we 
could

happily use autoincrements?

GENERATED BY DEFAULT would help, but openjpa create with GENERATED 
ALWAYS.
Moreover, when you recreate your database, you need to define a START 
value depending on your last generated key.



We could also define a key-generation-table per table, but I find this
overkill.

I agree, that's too much.


OK

I would tend to think to leave it like it is.

If you consider the issue above really serious, than lets keep it. On
the other hand: nobody would use derby in production, right? Do similar
problems exist with other databases?


I sometimes use derby in production with low-end PCs as servers.
Each database has it own way and syntax for managing pk generation, 
with its goodness and pitfalls.
For the direct @OneToMany, we have issues when implemented in James 
even

if this samples show that it should be correct. Strange...

On my side something in my dummy project is just odd. Can't get this
running at all. JPA seems to be a bit delicate?


OK

You said JPA 2.0 defines a way to define the association only in the
parent (*Message): Can you send me a working sample?

As said: I can't really get it working here. I've seen it on this site:
http://en.wikibooks.org/wiki/Java_Persistence/OneToMany#Example_of_a_JPA_2.0_unidirectional_OneToMany_relationship_database 


The @JoinColumn is put on the other side using referencedColumnName.


this sample may be a non working one.

One more point is the sql generated. The logs show jpql, and not sql.
Do you know if it's possible to view the sql in the logs (I didn't 
find

a way).

No, idea, sorry. I'm happy with jpql :)


OK.
Was just curious to see the generated sql that can show if the 
database queries are efficient or not.

If not possible, can you log on the database (mysql I think you use)?

MySQL provides logs for all operations, yes.


Will try to get these from derby.

I noticed a small issue with your patch: You have to use message_id
instead of id for the name of the @JoinColumn.


Patch was working on my side with tables and fk created
Strange, but I think to remember it was working with both (id and 
message_id)

Lets ask on the OpenJPA ML how to make OpenJPA use the relationship.
Maybe they can even have a look at our concrete issue with James. Will
you ask? Should I?


I will post something in the coming days.
But it is working as designed with the samples. They may say it is in 
the way we are using it. Maybe someone will take time to help us 
solve it.
On the other hand, I'm not sure it is an issue to leave those 
intermediary table and I don't think it should be a blocker for the 
release.

Best,
Tim


-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org






-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org




-
To unsubscribe, e-mail: 

OpenJPA usage at Apache James

2010-06-21 Thread Eric Charles

Hi,

Apache James project uses OpenJPA 2.0.

We've got @OneToMany relations on AbstractJPAMessage [1] to JPAHeader 
[2] (headers attribute) and JPAProperty [3] (properties attribute).
With current config, intermediary tables are created (MESSAGE_HEADER and 
MESSAGE_PROPERTY) but we would like to get rid of these.


a) We tried to use the @OneToMany 'mappedBy' attribute, adding a 
JPAMessage attribute on the JPAHeader and JPAProperty.
The tables are correctly created if we redefine the annotated headers 
and properties attributes on the concrete JPAMessage [4] class.
We had however to define openjpa.InverseManager=true to make it work at 
runtime.


b) When we set the @OneToMany with 'mappedBy' attribute on the 
AbstractJPAMessage (and the JPAMessage on the JPAHeader and 
JPAProperty), the tables are created, but not the FK. At runtime, the 
application generates SQL, but no response seems to come back (no 
exception in the log). It simply hangs.


c) In a) and b) scenario, we need to define an additional JPAMessage 
concrete attribute on JPAHeader and JPAProperty.
This does not allow to define FK to other types, such as the 
JPAStreamingMessage [5].

In this case, the class structure we built does not make much sense.
Would a Custom Mapping help? 
(http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_mapping_custom)


d) If we set @ElementJoinColumn(name=MESSAGE_ID, 
referencedColumnName=ID) on the headers and properties in the 
AbstractJPAMessage, everything works fine.
This also solve problem mentioned in c) because we don't need any 
JPAMessage attributed on JPAHeader and JPAProperty.
However, we try to stick to the standard JPA API without using OpenJPA 
extensions if not necessary.


e) Apart from the above points, are there any standard way to define 
indexes other than org.apache.openjpa.persistence.jdbc.Index ?


We would like to hear your comments on the above.
What do you think we should consider/investigate? Are our 
interpretations correct?


Tks,

Eric

PS: Please reply-to-all so we can follow the thread on James ml.

[1] AbstractJPAMessage 
http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/AbstractJPAMessage.java?view=log
[2] JPAHeader 
http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAHeader.java?view=log
[3] JPAProperty 
http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAProperty.java?view=log
[4] JPAMessage 
http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/JPAMessage.java?view=log
[5] JPAStreamingMessage 
http://svn.apache.org/viewvc/james/imap/trunk/jpa/src/main/java/org/apache/james/imap/jpa/mail/model/openjpa/JPAStreamingMessage.java?view=log



-
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org