It's just to have more control on start/stop and also to avoid running all web and mail threads in the same JVM (if you run all in same JVM, it will be less performant in case of high load).

You will also be able to scale the web if needed (load balancing) while remaining for example with a unique James server.

Thx, Eric


On 06/17/2012 04:14 PM, Aladin Dajani wrote:
Hi Eric,
I am interested to know more about "but in production env, it's best to have web 
container and James server separated."
First, why?
Second, separated as in different containers on the same machine or separated 
on different machines?
Regards,
Aladin

On Jun 17, 2012, at 3:01 AM, Eric Charles<[email protected]>  wrote:

Hi,

If you build James (svn co [1], mvn package), you already have a war (in target 
folder) with needed web.xml that starts james on webapp startup (see [2]).

This is good for a quick start, but in production env, it's best to have web 
container and James server separated.

Whether James is embedded or not, you can access the management functionalities 
(user/domain/... crud,...) via JMX, with the james-server-cli jar (see [3] for 
how to use ServerProbe).

Thx, Eric

[1] https://svn.apache.org/repos/asf/james/app/trunk

[2]
<web-app>
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
      /WEB-INF/conf/META-INF/org/apache/james/spring-server.xml
    </param-value>
  </context-param>
  <context-param>
     <param-name>contextClass</param-name>
<param-value>org.apache.james.container.spring.context.web.JamesServerWebApplicationContext</param-value>
   </context-param>
   <listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>
</web-app>


[3] 
https://svn.apache.org/repos/asf/james/server/trunk/cli/src/main/java/org/apache/james/cli/ServerCmd.java



On 06/17/2012 06:57 AM, Anthony Fryer wrote:

Hi,

I'm new to James and think it can do what I want but would like to be sure.  I 
have a java web application that a user can create an account.  I would like 
that account creation process to also crease an email inbox for them (ie. a 
james email account).   I would like the james server to be embedded in my java 
web application as possible.

When my web application starts up, i would need to start james listening on a 
port to receive emails.  How is this done programattically?

How can i create a new user account programatically?

Is there any good tutorials or samples or documentation about doing the above 
tasks?

Regards,

Anthony


--
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
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]


--
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to