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

From OpenKM Documentation
Jump to: navigation, search
(Remove duplicate lines)
Line 1: Line 1:
Manage several companies with an unique OpenKM instance can render in several security problems. Actually there is no way to make a relation between a group of user 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 because you can't configure especifically for each company.  
+
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 in one JBoss. The most complex and time-consuming configuration is related to JBoss. But configure an OpenKM instance is very straightforward and can take seconds. This implies some source code modifications, so read carefully [[Developer Guide]] before trying this:
+
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.}}
  
== Files located at $OPENKM_PRJ ==
+
== Files located in $OPENKM_PRJ ==
  
 
* '''src/main/java/com/openkm/core/Config.java'''
 
* '''src/main/java/com/openkm/core/Config.java'''
Line 50: Line 50:
 
</source>
 
</source>
  
== Files located at $JBOSS_HOME ==
+
== Files located in $JBOSS_HOME ==
  
 
* '''OpenKM#.cfg'''
 
* '''OpenKM#.cfg'''

Revision as of 15:35, 10 November 2011

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