Oops, Deprecated. This class should not be used because it is not
database vendor specific. Each DatabaseFileSystem now supports getting
the connection via JNDI by setting the driver to
javax.naming.InitialContext and the URL to the JNDI name.
So, yes you were on the right track, simply don't forget to change
mailbox.xml (hoping you have it in your 3.0 version, otherwise you can
download a fresh snapshot from
http://people.apache.org/builds/james/nightly/
Tks,
- Eric
On 12/04/2011 16:45, Eric Charles wrote:
Hi,
mailstore.xml (in james-3.0-M2) is mailpersistencestore (in upcoming
james-3.0-M3) is not the place where to define the users's mail.
Read more on http://james.apache.org/server/3/feature-persistence.html
You have to edit mailstore.xml to store spam,... mails (don't do that to
start and concentrate more on mailbox.xml, see here after).
For enduser mails, you have to edit mailbox.xml and define there "jcr"
instead of jpa.
I never used jackrabbit via jndi, but a quick look on the api makes me
think <FileSystem
class="org.apache.jackrabbit.core.fs.db.JNDIDatabaseFileSystem"> could
help (see [1]).
Tks,
- Eric
[1]
http://jackrabbit.apache.org/api/2.0/org/apache/jackrabbit/core/fs/db/JNDIDatabaseFileSystem.html
On 12/04/2011 14:37, Jürgen Baier wrote:
Hi,
I changed the mailstore.xml so far:
<?xml version="1.0"?>
<mailstore>
<repositories>
<repository class="org.apache.james.mailrepository.JCRMailRepository">
<protocols>
<protocol>jcr</protocol>
</protocols>
<types>
<type>MAIL</type>
</types>
<config>
<repository>jcr/shared</repository>
<username>admin</username>
<password>admin</password>
<workspace>default</workspace>
</config>
</repository>
<repository
class="org.apache.james.filepair.FilePersistentObjectRepository">
<protocols>
<protocol>file</protocol>
</protocols>
<types>
<type>OBJECT</type>
</types>
<models>
<model>SYNCHRONOUS</model>
<model>ASYNCHRONOUS</model>
<model>CACHE</model>
</models>
</repository>
<repository
class="org.apache.james.filepair.FilePersistentStreamRepository">
<protocols>
<protocol>file</protocol>
</protocols>
<types>
<type>STREAM</type>
</types>
<models>
<model>SYNCHRONOUS</model>
<model>ASYNCHRONOUS</model>
<model>CACHE</model>
</models>
</repository>
</repositories>
</mailstore>
The jndi-name of my repo is "jcr/shared", I am able to connect to it
from servlets through that name. Now, how do I make this known to the
jcr-repository.xml? What I tried there:
<Repository>
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="javax.naming.InitialContext"/>
<param name="url" value="jcr/shared"/>
</FileSystem>
...
Am I on the right track with the InitialContext?
Regards,
Jürgen
2011/4/12 Eric Charles<[email protected]>:
Hi,
If you use james 3, you can configure mailbox.xml with value jcr, and
set
the attributes/credentials of your share jcr-repo in
jcr-repository.xml (all
xml in conf folder).
The default jcr config is http://s.apache.org/nn, and james access
the jcr
further to the definition it finds there.
Keep us informed for any question, and even if you succeed to make it
work
:)
Tks,
- Eric
On 12/04/2011 10:46, Jürgen Baier wrote:
Hello all,
has anybody already experience in making james store mails in a shared
jcr-repo (deployment-model 2 on jackrabbit.apache.org)? I have
jackrabbit running on glassfish and can nicely access it via jndi from
my EJBs and servlets. Can I simply use this jndi-name to make james
store its mails in the same repo?
Thanks,
Jürgen
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]