Changes between Version 9 and Version 10 of tap


Ignore:
Timestamp:
Mar 9, 2015 1:24:11 PM (7 years ago)
Author:
vegasm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • tap

    v9 v10  
    1515
    1616{{{
    17 $JRE_HOME/bin/java -jar $PATH_TO_DERBY_LIB /db-derby-10.10.1.1-bin/lib/derbyrun.jar server start -p YOUR_PORT -h 0.0.0.0 &
     17$JRE_HOME/bin/java -jar $PATH_TO_DERBY_LIB/db-derby-10.10.1.1-bin/lib/derbyrun.jar server start -p DERBY_PORT -h 0.0.0.0 &
    1818}}}
    1919
    2020To start derby successfully add a socket permission in JAVA 7 by including in $JRE_HOME/lib/security/java.policy the following line:
    2121{{{
    22 permission java.net.SocketPermission "HOST:PORT", "listen,resolve";
    23 
    24 }}}
     22permission java.net.SocketPermission "HOST:DERBY_PORT", "listen,resolve";
     23
     24}}}
     25
    2526=== Expose our datasource in Tomcat ===
     27
    2628Tomcat gets users and roles from conf/tomcat-users.xml by default. We are going to change this in order to get users and roles from a given database.
    2729First of all, include both derbyclient.jar and derbynet.jar in $CATALINA_HOME/lib. After doing that, we need to add a new resource called “jdbc/admin” in GlobalNamingResurces:
     
    3032{{{
    3133<Resource name="jdbc/adminDB" auth="Container" type="javax.sql.DataSource" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    32     validationQuery="SELECT count(*) FROM users" maxActive="20" maxIdle="10" username="password" password="secret"
     34    validationQuery="SELECT count(*) FROM users" maxActive="20" maxIdle="10" username="admin" password="adm!n"
    3335    driverClassName="org.apache.derby.jdbc.ClientDriver" url="jdbc:derby://host:port/derbypath/derbydb" readOnly="false"/>
    3436}}}
    3537
    3638=== Set the realm ===
     39
    3740A Realm is a “database” of usernames and passwords that identify valid users of a web application (or set of web applications), plus an enumeration of the list of roles associated with each valid user. The servlet container will be connected to the database and it also be aware of the username and the corresponding roles. Define this realm inside <Engine> in your server.xml:
    3841
     
    4245}}}
    4346
     47=== Expose the datasource as JNDI resource ===
     48
     49TAP gets the datasource from the JNDI resource "jdbc/adminDB". Add to $CATALINA_HOME/conf/context.xml the following line:
     50
     51{{{
     52<ResourceLink global="jdbc/adminDB" name="jdbc/adminDB" type="javax.sql.DataSource"/>
     53}}}
    4454
    4555== Initial TAP setup ==
     
    5868tap.email.noreply = no-reply@your_host.com
    5969tap.email.admin = admin@host.com
    60 tap.filter.groups = TAP_USER,TAP_ADMIN #Invisible in TAP Groups
     70tap.filter.groups = TAP_USER,TAP_ADMIN #Invisible in TAP Groups.
    6171}}}
    6272