Difference between revisions of "Several OpenKM instances in the same JBoss"

From OpenKM Documentation
Jump to: navigation, search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
You can have several OpenKM instances running in the same JBoss. This implies some source code modifications, so read carefully [[Developer Guide]] before trying this:
+
Managing several companies with only one OpenKM instance can present several security problems. Actually there is no way to make a relation between a group of users and a company. This means that when you manage document security, all the users will be shown, even users in other companies. Also is not a good way of doing things because you can't have specific configurations for each company.
 +
 
 +
The best way to accomplish this is having several OpenKM instances in one JBoss. The most complex and time-consuming configuration is related to JBoss. But configuring an OpenKM instance is very straightforward and can take seconds. This implies some source code modifications, so read the [[Developer Guide]] carefully before trying this:
  
 
{{Note|Replace # with an OpenKM installation id.}}
 
{{Note|Replace # with an OpenKM installation id.}}
  
* '''openkm/src/main/java/com/openkm/core/Config.java'''
+
== Files located in $OPENKM_PRJ ==
 +
 
 +
* '''src/main/java/com/openkm/core/Config.java'''
  
 
<source lang="java">
 
<source lang="java">
Line 9: Line 13:
 
</source>
 
</source>
  
* '''openkm/src/main/java/com/openkm/frontend/client/config/Config.java'''
+
* '''src/main/java/com/openkm/frontend/client/config/Config.java'''
  
 
<source lang="java">
 
<source lang="java">
Line 15: Line 19:
 
</source>
 
</source>
  
* '''openkm/src/main/java/com/openkm/frontend/client/config/Config.java'''
+
* '''src/main/java/com/openkm/ws'''
 
 
<source lang="java">
 
private static String INSTALL = "#";
 
</source>
 
 
 
* '''openkm/src/main/java/com/openkm/ws'''
 
  
 
<source lang="text">
 
<source lang="text">
Line 27: Line 25:
 
</source>
 
</source>
  
* '''$JBOSS_HOME/server/default/conf/login-config.xml'''
+
* '''src/main/resources/hibernate.cfg.xml'''
 
 
<source lang="text">
 
Duplicate OpenKM entry to meet the new context.
 
</source>
 
 
 
* '''openkm/src/main/resources/hibernate.cfg.xml'''
 
  
 
<source lang="xml">
 
<source lang="xml">
Line 39: Line 31:
 
</source>
 
</source>
  
* '''openkm/src/main/webapp/WEB-INF/web.xml'''
+
* '''src/main/webapp/WEB-INF/web.xml'''
  
 
<source lang="xml">
 
<source lang="xml">
Line 45: Line 37:
 
</source>
 
</source>
  
* '''openkm/src/main/webapp/WEB-INF/jboss-web.xml'''
+
* '''src/main/webapp/WEB-INF/jboss-web.xml'''
  
 
<source lang="xml">
 
<source lang="xml">
Line 52: Line 44:
 
</source>
 
</source>
  
* '''$JBOSS_HOME/OpenKM#.cfg'''
+
* '''src/pom.xml'''
 +
 
 +
<source lang="xml">
 +
<finalName>OpenKM#</finalName>
 +
</source>
 +
 
 +
== Files located in $JBOSS_HOME ==
 +
 
 +
* '''OpenKM#.cfg'''
  
 
<source lang="text">
 
<source lang="text">
Line 58: Line 58:
 
</source>
 
</source>
  
* '''$JBOSS_HOME/server/default/deploy/openkm-ds.xml'''
+
* '''server/default/conf/login-config.xml'''
 +
 
 +
<source lang="text">
 +
Duplicate OpenKM entry to meet the new context.
 +
</source>
 +
 
 +
* '''server/default/deploy/openkm-ds.xml'''
  
 
<source lang="text">
 
<source lang="text">
Line 64: Line 70:
 
</source>
 
</source>
  
* Remove jcr-1.0.jar from OpenKM.war and copy to '''$JBOSS_HOME/server/default/lib'''
+
* Remove jcr-1.0.jar from OpenKM.war and copy to '''server/default/lib'''
  
 
[[Category: Installation Guide]]
 
[[Category: Installation Guide]]
[[Category: OKM Network]]
 

Latest revision as of 12:15, 27 December 2012

Managing several companies with only one OpenKM instance can present several security problems. Actually there is no way to make a relation between a group of users and a company. This means that when you manage document security, all the users will be shown, even users in other companies. Also is not a good way of doing things because you can't have specific configurations for each company.

The best way to accomplish this is having several OpenKM instances in one JBoss. The most complex and time-consuming configuration is related to JBoss. But configuring an OpenKM instance is very straightforward and can take seconds. This implies some source code modifications, so read the Developer Guide carefully before trying this:


Nota clasica.png Replace # with an OpenKM installation id.

Files located in $OPENKM_PRJ

  • src/main/java/com/openkm/core/Config.java
public static String INSTALL = "#";
  • src/main/java/com/openkm/frontend/client/config/Config.java
private static String INSTALL = "#";
  • src/main/java/com/openkm/ws
Disable WS deleting this folder.
  • src/main/resources/hibernate.cfg.xml
<property name="hibernate.connection.datasource">java:/OKMWorkflow#DS</property>
  • src/main/webapp/WEB-INF/web.xml
<display-name>OpenKM#</display-name>
  • src/main/webapp/WEB-INF/jboss-web.xml
<security-domain>java:/jaas/OpenKM#</security-domain>
<context-root>/OpenKM#</context-root>
  • src/pom.xml
<finalName>OpenKM#</finalName>

Files located in $JBOSS_HOME

  • OpenKM#.cfg
Duplicate OpenKM configuratoin to meet the new context.
  • server/default/conf/login-config.xml
Duplicate OpenKM entry to meet the new context.
  • server/default/deploy/openkm-ds.xml
Duplicate OpenKM datasource configuration to meet the new context.
  • Remove jcr-1.0.jar from OpenKM.war and copy to server/default/lib