syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Syncope > Run Syncope in real environments
Date Fri, 11 Jan 2013 09:14:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/3/_/styles/combined.css?spaceKey=SYNCOPE&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments">Run
Syncope in real environments</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~jbernhardt">Jan
Bernhardt</a>
    </h4>
        <div id="versionComment">
        <b>Comment:</b>
        setenv for tomcat differes on linux and windows<br />
    </div>
        <br/>
                         <h4>Changes (5)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >h2. Apache Tomcat 7 <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >This assumes that you have got
Apache Tomcat 7 installed in directory <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{code}$CATALINA_HOME{code}.</span>
<span class="diff-added-words"style="background-color: #dfd;">{{$CATALINA_HOME}}.</span>
<br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3.
{{setenv.sh}} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3.
Set Environment <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h4.
Linux <br> <br></td></tr>
            <tr><td class="diff-unchanged" >Create {code}$CATALINA_HOME/bin/setenv.sh{code}
with content (keep everything on a single line). <br>{code}JAVA_OPTS=&quot;-Djava.awt.headless=true
-Dfile.encoding=UTF-8 -server \ <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >-XX:MaxPermSize=256m -XX:+DisableExplicitGC&quot;{code}
<br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h4.
Windows <br> <br>Create {code}$CATALINA_HOME/bin/setenv.bin{code} with content
(keep everything on a single line). <br>{code}set JAVA_OPTS=-Djava.awt.headless=true
-Dfile.encoding=UTF-8 -server \ <br>-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m
-XX:PermSize=256m \ <br>-XX:MaxPermSize=256m -XX:+DisableExplicitGC{code} <br>
<br></td></tr>
            <tr><td class="diff-unchanged" >h3. {{context.xml}} <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
div.rbtoc1357895590690 {margin-left: 1.5em;padding: 0px;}
div.rbtoc1357895590690 ul {list-style: decimal;margin-left: 0px;}
div.rbtoc1357895590690 li {margin-left: 0px;padding-left: 0px;}

/*]]>*/</style><div class='rbtoc1357895590690'>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-Introduction'>Introduction</a></li>
    <li><a href='#RunSyncopeinrealenvironments-Deploymentdirectory'>Deployment
directory</a></li>
    <li><a href='#RunSyncopeinrealenvironments-Internalstorage'>Internal storage</a></li>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-PostgreSQL'>PostgreSQL</a></li>
    <li><a href='#RunSyncopeinrealenvironments-MySQL'>MySQL</a></li>
    <li><a href='#RunSyncopeinrealenvironments-Oracle'>Oracle</a></li>
    <li><a href='#RunSyncopeinrealenvironments-MicrosoftSQLServer'>Microsoft SQL
Server</a></li>
</ul>
    <li><a href='#RunSyncopeinrealenvironments-JEEcontainer'>JEE container</a></li>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-ApacheTomcat7'>Apache Tomcat 7</a></li>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-SetEnvironment'>Set Environment</a></li>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-Linux'>Linux</a></li>
    <li><a href='#RunSyncopeinrealenvironments-Windows'>Windows</a></li>
</ul>
    <li><a href='#RunSyncopeinrealenvironments-%7B%7Bcontext.xml%7D%7D'> <tt>context.xml</tt></a></li>
</ul>
    <li><a href='#RunSyncopeinrealenvironments-Glassfish3.1'>Glassfish 3.1</a></li>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-Updatecore%7B%7Bglassfishweb.xml%7D%7D'>Update
core <tt>glassfish-web.xml</tt></a></li>
</ul>
    <li><a href='#RunSyncopeinrealenvironments-JBossAS7.1'>JBoss AS 7.1</a></li>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-Use%7B%7BJBossPersistenceMappingFactory%7D%7D'>Use
<tt>JBossPersistenceMappingFactory</tt></a></li>
    <li><a href='#RunSyncopeinrealenvironments-UseDataSource'>Use DataSource</a></li>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-core%7B%7Bweb.xml%7D%7D'>core <tt>web.xml</tt></a></li>
    <li><a href='#RunSyncopeinrealenvironments-core%7B%7Bjbossdeploymentstructure%7D%7D'>core
<tt>jboss-deployment-structure</tt></a></li>
</ul>
</ul>
    <li><a href='#RunSyncopeinrealenvironments-OracleWebLogic12'>Oracle WebLogic
12</a></li>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-Updatecore%7B%7Bweb.xml%7D%7D'>Update
core <tt>web.xml</tt></a></li>
    <li><a href='#RunSyncopeinrealenvironments-Updatecore%7B%7Bweblogic.xml%7D%7D'>Update
core <tt>weblogic.xml</tt></a></li>
</ul>
</ul>
    <li><a href='#RunSyncopeinrealenvironments-Othersetuptasks'>Other setup tasks</a></li>
<ul>
    <li><a href='#RunSyncopeinrealenvironments-Usedatasource'>Use datasource</a></li>
    <li><a href='#RunSyncopeinrealenvironments-Connectconsoletocore'>Connect console
to core</a></li>
    <li><a href='#RunSyncopeinrealenvironments-Disableconsoledebug'>Disable console
debug</a></li>
</ul>
    <li><a href='#RunSyncopeinrealenvironments-Buildanddeploy'>Build and deploy</a></li>
    <li><a href='#RunSyncopeinrealenvironments-Testyourinstallation'>Test your
installation</a></li>
</ul></div>

<h1><a name="RunSyncopeinrealenvironments-Introduction"></a>Introduction</h1>

<p>Once you have <a href="/confluence/display/SYNCOPE/Create+a+new+Syncope+project"
title="Create a new Syncope project">created your project</a>, you can start adapting
it to your own needs and requirements.</p>

<h1><a name="RunSyncopeinrealenvironments-Deploymentdirectory"></a>Deployment
directory</h1>

<p>Currently, Syncope needs two base directories to be defined:</p>
<ul>
	<li><em>bundles</em> &#45; where ConnId bundles are stored (check what
a <a href="/confluence/display/SYNCOPE/Connectors+and+resources" title="Connectors and
resources">connector bundle</a> is);</li>
	<li><em>log</em> &#45; where all system logs are written.</li>
</ul>


<p>For example, you can create directories as follows:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
$ mkdir /opt/syncope
$ mkdir /opt/syncope/bundles
$ mkdir /opt/syncope/log
</pre>
</div></div>

<h1><a name="RunSyncopeinrealenvironments-Internalstorage"></a>Internal
storage</h1>

<p>Internal storage is a database where all information and configurations are stored.</p>

<p>You may want to setup some default content to be loaded on internal storage upon
schema creation: for this you need to edit </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">core/src/main/resources/content.xml</pre>
</div></div>
<p>.</p>

<p><b><em>Please note</em></b> <em>that Syncope core will
populate internal storage with provided content only if the corresponding database is empty,
i.e. does not contain any table or view.</em></p>

<p>Depending on your DBMS, you will need to change your project setup accordingly; modify
the content of </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">core/src/main/resources/persistence.properties</pre>
</div></div>
<p> as indicated in the following.</p>

<h2><a name="RunSyncopeinrealenvironments-PostgreSQL"></a>PostgreSQL</h2>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
jpa.driverClassName=org.postgresql.Driver
jpa.url=jdbc:postgresql:<span class="code-comment">//localhost:5432/syncope
</span>jpa.username=syncope
jpa.password=syncope
jpa.dialect=org.apache.openjpa.jdbc.sql.PostgresDictionary
quartz.jobstore=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
quartz.sql=tables_postgres.sql
logback.sql=postgresql.sql
</pre>
</div></div>

<p>This assumes that you have a PostgreSQL instance running on localhost, listening
on its default port 5432 with a database </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>
<p> fully accessible by user </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>
<p> with password </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>

<h2><a name="RunSyncopeinrealenvironments-MySQL"></a>MySQL</h2>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
jpa.driverClassName=com.mysql.jdbc.Driver
jpa.url=jdbc:mysql:<span class="code-comment">//localhost:3306/syncope?characterEncoding=UTF-8
</span>jpa.username=syncope
jpa.password=syncope
jpa.dialect=org.apache.openjpa.jdbc.sql.MySQLDictionary
quartz.jobstore=org.quartz.impl.jdbcjobstore.StdJDBCDelegate
quartz.sql=tables_mysql_innodb.sql
logback.sql=mysql.sql
</pre>
</div></div>

<p>This assumes that you have a MySQL instance running on localhost, listening on its
default port 3306 with a database </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>
<p> fully accessible by user </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>
<p> with password </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>

<h2><a name="RunSyncopeinrealenvironments-Oracle"></a>Oracle</h2>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
jpa.driverClassName=oracle.jdbc.OracleDriver
jpa.url=jdbc:oracle:thin:@localhost:1521:orcl
jpa.username=syncope
jpa.password=syncope
jpa.dialect=org.apache.openjpa.jdbc.sql.OracleDictionary
quartz.jobstore=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
quartz.sql=tables_oracle.sql
logback.sql=oracle.sql
database.schema=SYNCOPE
</pre>
</div></div>

<p>This assumes that you have an Oracle instance running on localhost, listening on
its default port 1521 with a database </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>
<p> under tablespace </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">SYNCOPE</pre>
</div></div>
<p> fully accessible by user </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>
<p> with password </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>

<p>You will also need to</p>
<ol>
	<li>create directory 
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">core/src/main/resources/META-INF</pre>
</div></div></li>
	<li>download <a href="https://svn.apache.org/repos/asf/syncope/trunk/core/src/main/resources/META-INF/orm.xml.oracle"
class="external-link" rel="nofollow">Oracle mapping file</a>, rename it to 
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">orm.xml</pre>
</div></div>
<p> and copy it under the directory created above</p></li>
</ol>


<h2><a name="RunSyncopeinrealenvironments-MicrosoftSQLServer"></a>Microsoft
SQL Server</h2>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
jpa.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
jpa.url=jdbc:sqlserver:<span class="code-comment">//localhost:1344;database=syncope;selectMethod=cursor;sendStringParametersAsUnicode=<span
class="code-keyword">false</span>
</span>jpa.username=syncope
jpa.password=syncope
jpa.dialect=org.apache.openjpa.jdbc.sql.SQLServerDictionary
quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate
quartz.sql=tables_sqlserver.sql
logback.sql=sqlserver.sql
</pre>
</div></div>

<p>This assumes that you have an SQL Server instance running on localhost, listening
on its default port 1344 with a database </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>
<p> fully accessible by user </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>
<p> with password </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">syncope</pre>
</div></div>

<p>You will also need to</p>
<ol>
	<li>create directory 
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">core/src/main/resources/META-INF</pre>
</div></div></li>
	<li>download <a href="https://svn.apache.org/repos/asf/syncope/trunk/core/src/main/resources/META-INF/orm.xml.sqlserver"
class="external-link" rel="nofollow">SQL Server mapping file</a>, rename it to 
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">orm.xml</pre>
</div></div>
<p> and copy it under the directory created above</p></li>
</ol>


<h1><a name="RunSyncopeinrealenvironments-JEEcontainer"></a>JEE container</h1>

<h2><a name="RunSyncopeinrealenvironments-ApacheTomcat7"></a>Apache Tomcat
7</h2>

<p>This assumes that you have got Apache Tomcat 7 installed in directory <tt>$CATALINA_HOME</tt>.</p>

<h3><a name="RunSyncopeinrealenvironments-SetEnvironment"></a>Set Environment</h3>

<h4><a name="RunSyncopeinrealenvironments-Linux"></a>Linux</h4>

<p>Create </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">$CATALINA_HOME/bin/setenv.sh</pre>
</div></div>
<p> with content (keep everything on a single line).</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">JAVA_OPTS="-Djava.awt.headless=<span class="code-keyword">true</span>
-Dfile.encoding=UTF-8 -server \
-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m \
-XX:MaxPermSize=256m -XX:+DisableExplicitGC"</pre>
</div></div>

<h4><a name="RunSyncopeinrealenvironments-Windows"></a>Windows</h4>

<p>Create </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">$CATALINA_HOME/bin/setenv.bin</pre>
</div></div>
<p> with content (keep everything on a single line).</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">set JAVA_OPTS=-Djava.awt.headless=<span class="code-keyword">true</span>
-Dfile.encoding=UTF-8 -server \
-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m \
-XX:MaxPermSize=256m -XX:+DisableExplicitGC</pre>
</div></div>

<h3><a name="RunSyncopeinrealenvironments-%7B%7Bcontext.xml%7D%7D"></a><tt>context.xml</tt></h3>

<p>Uncomment <tt>&lt;Manager pathname="" /&gt;</tt> in <tt>$CATALINA_HOME/conf/context.xml</tt>.</p>

<p>Optionally, define a datasource for internal storage (following example is for MySQL):
please check that the connection parameters are same as configured above.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;Resource name=<span class="code-quote">"jdbc/syncopeDataSource"</span>
auth=<span class="code-quote">"Container"</span> type=<span class="code-quote">"javax.sql.DataSource"</span>
          factory=<span class="code-quote">"org.apache.tomcat.jdbc.pool.DataSourceFactory"</span>
testWhileIdle=<span class="code-quote">"<span class="code-keyword">true</span>"</span>
          testOnBorrow=<span class="code-quote">"<span class="code-keyword">true</span>"</span>
testOnReturn=<span class="code-quote">"<span class="code-keyword">true</span>"</span>
validationQuery=<span class="code-quote">"SELECT 1"</span> validationInterval=<span
class="code-quote">"30000"</span>
          maxActive=<span class="code-quote">"50"</span> minIdle=<span class="code-quote">"2"</span>
maxWait=<span class="code-quote">"10000"</span> initialSize=<span class="code-quote">"2"</span>
removeAbandonedTimeout=<span class="code-quote">"20000"</span>
          removeAbandoned=<span class="code-quote">"<span class="code-keyword">true</span>"</span>
logAbandoned=<span class="code-quote">"<span class="code-keyword">true</span>"</span>
suspectTimeout=<span class="code-quote">"20000"</span>
          timeBetweenEvictionRunsMillis=<span class="code-quote">"5000"</span>
minEvictableIdleTimeMillis=<span class="code-quote">"5000"</span>
          jdbcInterceptors=<span class="code-quote">"org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"</span>
          username=<span class="code-quote">"syncope"</span> password=<span
class="code-quote">"syncope"</span> driverClassName=<span class="code-quote">"com.mysql.jdbc.Driver"</span>
          url=<span class="code-quote">"jdbc:mysql:<span class="code-comment">//localhost:3306/syncope?characterEncoding=UTF-8"</span>/&gt;</span>
</pre>
</div></div>

<p>Be sure to put the JDBC driver JAR file under <tt>$CATALINA_HOME/lib</tt>
for the Datasource you have defined above.</p>

<h2><a name="RunSyncopeinrealenvironments-Glassfish3.1"></a>Glassfish 3.1</h2>

<h3><a name="RunSyncopeinrealenvironments-Updatecore%7B%7Bglassfishweb.xml%7D%7D"></a>Update
core <tt>glassfish-web.xml</tt></h3>

<p>When using a datasource for internal storage, be sure to add</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
  &lt;resource-ref&gt;
    &lt;res-ref-name&gt;jdbc/syncopeDataSource&lt;/res-ref-name&gt;
    &lt;jndi-name&gt;jdbc/syncopeDataSource&lt;/jndi-name&gt;
  &lt;/resource-ref&gt;
</pre>
</div></div>
<p>assuming that your Glassfish instance provides a datasource named <tt>jdbc/syncopeDataSource</tt>.</p>

<p>right after <tt>&lt;/context-root&gt;&gt;</tt> in <tt>core/src/main/webapp/WEB-INF/glassfish-web.xml</tt>.</p>

<h2><a name="RunSyncopeinrealenvironments-JBossAS7.1"></a>JBoss AS 7.1</h2>

<h3><a name="RunSyncopeinrealenvironments-Use%7B%7BJBossPersistenceMappingFactory%7D%7D"></a>Use
<tt>JBossPersistenceMappingFactory</tt></h3>

<p>Until issue <a href="https://issues.apache.org/jira/browse/OPENJPA-2229" class="external-link"
rel="nofollow">OPENJPA-2229</a> gets fixed and reaches Apache OpenJPA mainstream,
a temporary fix is needed.</p>

<p>Download <a href="https://svn.apache.org/repos/asf/syncope/trunk/core/src/test/resources/jboss/persistenceContextEMFactory.xml"
class="external-link" rel="nofollow">this file</a>, copy it under </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">core/src/main/resources/</pre>
</div></div>
<p> and replace</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;entry key=<span class="code-quote">"openjpa.MetaDataFactory"</span> value=<span
class="code-quote">"org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory(URLs=vfs:${project.build.directory}/cargo/configurations/jboss71x/deployments/${project.build.finalName}.war/WEB-INF/classes/,
Resources=META-INF/orm.xml)"</span>/&gt;
</pre>
</div></div>
<p>with</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;entry key=<span class="code-quote">"openjpa.MetaDataFactory"</span> value=<span
class="code-quote">"org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory(URLs=vfs:/content/${project.build.finalName}.war/WEBINF/classes/,
Resources=META-INF/orm.xml)"</span>/&gt;
</pre>
</div></div>

<h3><a name="RunSyncopeinrealenvironments-UseDataSource"></a>Use DataSource</h3>

<p>When using a DataSource, a few additional adjustments are needed.</p>

<h4><a name="RunSyncopeinrealenvironments-core%7B%7Bweb.xml%7D%7D"></a>core
<tt>web.xml</tt></h4>

<p>Change</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
  &lt;resource-ref&gt;
    &lt;res-ref-name&gt;jdbc/syncopeDataSource&lt;/res-ref-name&gt;
    &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
    &lt;res-auth&gt;Container&lt;/res-auth&gt;
  &lt;/resource-ref&gt;
</pre>
</div></div>

<p>to</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
  &lt;resource-ref&gt;
    &lt;res-ref-name&gt;jdbc/syncopeDataSource&lt;/res-ref-name&gt;
    &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
    &lt;res-auth&gt;Container&lt;/res-auth&gt;
    &lt;lookup-name&gt;java:/syncopeDataSource&lt;/lookup-name&gt;
  &lt;/resource-ref&gt;
</pre>
</div></div>

<p>assuming that you have defined a DataSource with JNDI name 'java:/syncopeDataSource'
in JBoss configuration.</p>

<h4><a name="RunSyncopeinrealenvironments-core%7B%7Bjbossdeploymentstructure%7D%7D"></a>core
<tt>jboss-deployment-structure</tt></h4>

<p>Add </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">&lt;module name=<span class="code-quote">"com.mysql"</span>/&gt;</pre>
</div></div>
<p> right before </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">&lt;/dependencies&gt;</pre>
</div></div>
<p> assuming that 'com.mysql' is the name of the JBoss module you have deployed for
your JDBC Driver (MySQL in this case).</p>

<h2><a name="RunSyncopeinrealenvironments-OracleWebLogic12"></a>Oracle WebLogic
12</h2>

<h3><a name="RunSyncopeinrealenvironments-Updatecore%7B%7Bweb.xml%7D%7D"></a>Update
core <tt>web.xml</tt></h3>

<p>Change </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">classpath*:/*Context.xml</pre>
</div></div>
<p> to </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">/WEB-INF/classes/*Context.xml</pre>
</div></div>
<p> at the beginning of <tt>core/src/main/webapp/WEB-INF/web.xml</tt>.</p>

<h3><a name="RunSyncopeinrealenvironments-Updatecore%7B%7Bweblogic.xml%7D%7D"></a>Update
core <tt>weblogic.xml</tt></h3>

<p>When using a datasource for internal storage, be sure to add</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
  &lt;resource-description&gt;
    &lt;jndi-name&gt;syncopeDataSource&lt;/jndi-name&gt;
    &lt;res-ref-name&gt;jdbc/syncopeDataSource&lt;/res-ref-name&gt;
  &lt;/resource-description&gt;
</pre>
</div></div>

<p>assuming that your WebLogic instance provides a datasource named <tt>syncopeDataSource</tt>.</p>

<p>before <tt>&lt;/weblogic-web-app&gt;</tt> in <tt>core/src/main/webapp/WEB-INF/weblogic.xml</tt>.</p>

<h1><a name="RunSyncopeinrealenvironments-Othersetuptasks"></a>Other setup
tasks</h1>

<h2><a name="RunSyncopeinrealenvironments-Usedatasource"></a>Use datasource</h2>
<p>Syncope, when not finding a datasource called <tt>jdbc/syncopeDataSource</tt>,
will connect to internal storage by instantiating a new connection upon request: this is of
course <b>strongly discouraged</b> for any production environment.</p>

<p>When using a container-managed datasource, be sure to uncomment the <tt>&lt;resource-ref
... /&gt;</tt> element in <tt>core/src/main/webapp/WEB-INF/web.xml</tt>.</p>

<h2><a name="RunSyncopeinrealenvironments-Connectconsoletocore"></a>Connect
console to core</h2>
<p>Modify <tt>console/src/main/resources/configuration.properties</tt> so
that provided properties reflects the scheme, hostname and port number where your JEE container
is running and the URL context where Syncope core will be deployed.</p>

<p>For example, when running your JEE container on port 9080, you should have</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
scheme=http
host=localhost
port=9080
path=/syncope/<span class="code-keyword">rest</span>/
</pre>
</div></div>

<h2><a name="RunSyncopeinrealenvironments-Disableconsoledebug"></a>Disable
console debug</h2>
<p>Once you are ready to deploy, you might would like to get rid of Wicket debug features
provided by the console.</p>

<p>Just change <tt>development</tt> to <tt>deployment</tt> at
the beginning of <tt>console/src/main/webapp/WEB-INF/web.xml</tt>.</p>


<h1><a name="RunSyncopeinrealenvironments-Buildanddeploy"></a>Build and
deploy</h1>

<p>Assuming that you have created the two deployment directories defined above, just
run</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean <span class="code-keyword">package</span> -Dbundles.directory=/opt/syncope/bundles
-Dlog.directory=/opt/syncope/log
</pre>
</div></div>

<p>At this point you can deploy <tt>core/target/syncope.war</tt> and <tt>console/target/syncope-console.war</tt>
to your JEE container.</p>

<h1><a name="RunSyncopeinrealenvironments-Testyourinstallation"></a>Test
your installation</h1>

<ol>
	<li>Point your favorite browser to administration console at <a href="http://localhost:9080/syncope-console/"
class="external-link" rel="nofollow">http://localhost:9080/syncope-console/</a> (assuming
that your JEE container is running on localhost, port 9080)</li>
	<li>Login as 'admin' / 'password'</li>
</ol>

    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=27841547&revisedVersion=37&originalVersion=36">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message