Commits

Sean Flanigan committed a767f25 Merge

-- Merged

  • Participants
  • Parent commits 8d063b0, 924dd27

Comments (0)

Files changed (30)

server/flies-model/pom.xml

 		<env.hibernate.format_sql>false</env.hibernate.format_sql>
 		<env.hibernate.indexBase>fliessearchindex</env.hibernate.indexBase>
 
-		<ds.jndi.name>fliesTestDatasource</ds.jndi.name>
+		<ds.jndi.name>zanataTestDatasource</ds.jndi.name>
 		<ds.hibernate.dialect>org.hibernate.dialect.H2Dialect</ds.hibernate.dialect>
 		<ds.driver.class>org.h2.Driver</ds.driver.class>
 		<ds.connection.url>jdbc:h2:mem:flies;DB_CLOSE_DELAY=-1</ds.connection.url> <!-- *-ds.xml -->
 			<id>mysql</id>
 			<properties>
 				<env.dbunit.type>MYSQL</env.dbunit.type>
-				<ds.jndi.name>fliesDatasource</ds.jndi.name>
+				<ds.jndi.name>zanataDatasource</ds.jndi.name>
 				<ds.hibernate.dialect>net.openl10n.flies.FliesMySQL5InnoDBDialect</ds.hibernate.dialect>
 				<ds.driver.class>com.mysql.jdbc.Driver</ds.driver.class>
-				<ds.connection.url>jdbc:mysql://localhost:3306/flies?characterEncoding=UTF-8</ds.connection.url>
-				<ds.user.name>root</ds.user.name>
-				<ds.password />
 			</properties>
 			<build>
 				<plugins>

server/flies-model/src/main/java/net/openl10n/flies/model/HApplicationConfiguration.java

 {
 
    public static String KEY_HOST = "flies.host";
-   public static String KEY_HELP = "flies.help";
    public static String KEY_REGISTER = "flies.register";
    public static String KEY_DOMAIN = "flies.email.domain";
    public static String KEY_ADMIN_EMAIL = "flies.admin.email";

server/flies-model/src/test/resources/META-INF/persistence.xml

     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
     version="1.0">
     
-	<persistence-unit name="fliesTestDatasource"
+	<persistence-unit name="zanataTestDatasource"
 		transaction-type="RESOURCE_LOCAL">
 		<provider>org.hibernate.ejb.HibernatePersistence</provider>
 		<!--

server/flies-war/pom.xml

 
 		<env.debug>false</env.debug>
 		<env.import.testdata>false</env.import.testdata>
-		<ds.jndi.name>fliesTestDatasource</ds.jndi.name>
-		<war.name>flies</war.name>
+		<ds.jndi.name>zanataTestDatasource</ds.jndi.name>
+		<war.name>zanata</war.name>
 		<!-- Default database settings -->
 		<env.dbunit.type>HSQL</env.dbunit.type>
 		<internal.authentication>false</internal.authentication>
 		<profile>
 			<id>mysql</id>
 			<properties>
-		        <ds.jndi.name>fliesDatasource</ds.jndi.name>
+		        <ds.jndi.name>zanataDatasource</ds.jndi.name>
 			</properties>
 		</profile>
 
 						<configuration>
 							<serverName>default</serverName>
 							<fileNames>
-								<fileName>${project.build.directory}/classes/flies-ds.xml</fileName>
+								<fileName>${project.build.directory}/classes/zanata-ds.xml</fileName>
 								<fileName>${project.build.directory}/${war.name}.war</fileName>
 							</fileNames>
 						</configuration>
 		<profile>
 			<id>flies-test</id>
 			<properties>
-				<war.name>flies-test</war.name>
+				<war.name>zanata-test</war.name>
 			</properties>
 		</profile>
 

server/flies-war/src/main/java/net/openl10n/flies/ApplicationConfiguration.java

 
    private void setDefaults(Map<String, String> map)
    {
-      map.put(HApplicationConfiguration.KEY_REGISTER, "/flies/account/register");
-      map.put(HApplicationConfiguration.KEY_HOST, "http://localhost:8080/flies");
+      map.put(HApplicationConfiguration.KEY_REGISTER, "/zanata/account/register");
+      map.put(HApplicationConfiguration.KEY_HOST, "http://localhost:8080/zanata");
       map.put(HApplicationConfiguration.KEY_DOMAIN, "example.com");
       map.put(HApplicationConfiguration.KEY_ADMIN_EMAIL, "no-reply@redhat.com");
    }

server/flies-war/src/main/java/net/openl10n/flies/action/ProjectHome.java

       if (!validateSlug(getInstance().getSlug(), "slug"))
          return null;
 
-      getInstance().setOverrideLocales(overrideLocales);
-      if (customizedItems != null && overrideLocales != null && overrideLocales.booleanValue())
-      {
-         Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(customizedItems);
-         getInstance().getCustomizedLocales().clear();
-         getInstance().getCustomizedLocales().addAll(locale);
-      }
-
       if (authenticatedAccount != null)
       {
+         updateOverrideLocales();
          HPerson currentPerson = getEntityManager().find(HPerson.class, authenticatedAccount.getPerson().getId());
          if (currentPerson != null)
          {
    @Override
    public String update()
    {
-      getInstance().setOverrideLocales(overrideLocales);
-      if (customizedItems != null && overrideLocales != null && overrideLocales.booleanValue())
-      {
-         Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(customizedItems);
-         getInstance().getCustomizedLocales().clear();
-         getInstance().getCustomizedLocales().addAll(locale);
-      }
+      updateOverrideLocales();
       return super.update();
    }
 
+   private void updateOverrideLocales()
+   {
+      if (overrideLocales != null)
+      {
+         getInstance().setOverrideLocales(overrideLocales);
+         if (!overrideLocales.booleanValue())
+         {
+            getInstance().getCustomizedLocales().clear();
+         }
+         else if (customizedItems != null)
+         {
+            Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(customizedItems);
+            getInstance().getCustomizedLocales().clear();
+            getInstance().getCustomizedLocales().addAll(locale);
+         }
+      }
+   }
+
 }

server/flies-war/src/main/java/net/openl10n/flies/action/ProjectIterationHome.java

       if (!validateSlug(getInstance().getSlug(), "slug"))
          return null;
 
-      getInstance().setOverrideLocales(iterationOverrideLocales);
-      if (iterationCustomizedItems != null && iterationOverrideLocales != null && iterationOverrideLocales.booleanValue())
-      {
-         Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(iterationCustomizedItems);
-         getInstance().getCustomizedLocales().clear();
-         getInstance().getCustomizedLocales().addAll(locale);
-      }
+      updateOverrideLocales();
 
       return super.persist();
    }
    @Override
    public String update()
    {
-      getInstance().setOverrideLocales(iterationOverrideLocales);
-      if (iterationCustomizedItems != null && iterationOverrideLocales != null && iterationOverrideLocales.booleanValue())
+      updateOverrideLocales();
+      return super.update();
+   }
+   
+   
+   private void updateOverrideLocales()
+   {
+      if (iterationOverrideLocales != null)
       {
-         Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(iterationCustomizedItems);
-         getInstance().getCustomizedLocales().clear();
-         getInstance().getCustomizedLocales().addAll(locale);
+         getInstance().setOverrideLocales(iterationOverrideLocales);
+         if (!iterationOverrideLocales.booleanValue())
+         {
+            getInstance().getCustomizedLocales().clear();
+         }
+         else if (iterationCustomizedItems != null)
+         {
+            Set<HLocale> locale = localeServiceImpl.convertCustomizedLocale(iterationCustomizedItems);
+            getInstance().getCustomizedLocales().clear();
+            getInstance().getCustomizedLocales().addAll(locale);
+         }
       }
-      return super.update();
    }
 
 }

server/flies-war/src/main/resources-jboss/flies-ds.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE datasources
-    PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
-    "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
-<datasources>
-  <local-tx-datasource>
-	<jndi-name>fliesDatasource</jndi-name>
-	<connection-url>jdbc:mysql://localhost:3306/flies?characterEncoding=UTF-8</connection-url>
-    <driver-class>com.mysql.jdbc.Driver</driver-class>
-    <user-name>root</user-name>
-    <password></password>
-  </local-tx-datasource>
-</datasources>
-
-<!--
-The three transaction types you can use are:
-
-  local-tx-datasource : Identifies a data source that uses transactions, even distributed 
-                        transactions within the local application server, but does not use 
-                        distributed transactions among multiple application servers.
-                        
-  no-tx-datasource    : Identifies a data source that does not use transactions. This option is not 
-                        shown in the example, but would appear in place of the <local-tx-datasource> 
-                        tag. 
-  
-  xa-datasource       : Identifies a data source that uses distributed transaction among multiple 
-                        application servers. This option is not shown in the example, but would 
-                        appear in place of the <local-tx-datasource> tag. 
-                        
-                        So which transaction type should you use? In most cases you will use  
-                        <local-tx-datasource> because it handles transactions within a single 
-                        application server. If you are clustering your application servers, or want 
-                        to use distributed transactions among multiple application servers, then you 
-                        should use  <xa-datasource>. Note that both  <local-tx-datasource> and  
-                        <xa-datasource> handle distributed transactions which involve multiple 
-                        datasources. The difference is that  <local-tx-datasource> handles them only 
-                        within a single running application server, while  <xa-datasource> handles 
-                        them among many running application servers. On the other end of the 
-                        spectrum, if your applications only read from the database, then using 
-                        <no-tx-datasource> would be appropriate. 
-                        
-                        WHAT IS XA? 
-                        XA is an API defined by The Open Group's Distributed Transaction Processing 
-                        model. This model provides communications mechanisms between a Transaction 
-                        Monitor and several resource managers which perform updates against 
-                        databases. The Transaction Monitor is responsible for coordinating the 
-                        individual transactions handled by the resource managers to ensure 
-                        transactional semantics when multiple resource managers are involved in a 
-                        single transaction. 
-
-                        
-Within the transaction type, you can specify a wide variety of configuration options. The following
-describes the various configuration options in the *-ds.xml file. A complete set of configuration 
-options, along with a description of each option, can be found in the  docs/dtd/jboss-ds_1_5.dtd file.                         
-  
-  jndi-name           : The name used to reference the data source in your application configurations. 
-                        The name is used to look up the data source in the JNDI namespace. The 
-                        "java:" prefix is automatically added to this name, so datasources are not 
-                        available outside the virtual machine.
-                        
-  connection-url      : The database-specific URL to the server.
-                        
-  driver-class        : The driver you are using for your database.
-  
-  xa-datasource-class : The class name for the distributed transaction data source. 
-                        Valid only for xa-datasource
-                        
-  user-name           : The username that is defined to access this data source. In general,
-                        do not use the root username.
-                        
-  password            : The password for the corresponding username.
-  
-  min-pool-size       : The starting pool size for the number of database connections to be allowed 
-                        by the application server, default=0. Note that the application server does 
-                        not open any connections until the first request for a connection, at which 
-                        time it opens this many connections. One way of forcing the connections to be 
-                        established when the application server is started is to write a simple 
-                        service that does nothing but ask for a connection. 
-                        
-  max-pool-size       : The maximum number of open connections maintained by the application server,
-                        default=20. If the application server runs out of connections, it allocates 
-                        a new connection to fulfill that request, until it hits the maximum number of 
-                        connections. At that point it queues the requests until connections are freed. 
-                        Therefore, it is very important that applications close any connections that 
-                        they obtain.
-                        NOTE: The max-pool-zize value must not exceed the max-connections porperty
-                        value in MySql.
-                        
-  idle-timeout-minutes: The amount of time before the connection times out.
-                        If a surplus connection is not in use for this many minutes, then that 
-                        connection is closed. Note that the number of open connections never goes 
-                        below the <min-pool-size>, default=0
-  blocking-timeout-
-  millis              : The amount of time a thread waits on a connection, if all of the connections 
-                        are in use and the maximum connections have been allocated. On a timeout 
-                        the requestor will gett an exception.
-                        
-  track-statements    : A Boolean (true/false) that has the data source monitor for unclosed 
-                        Statements or ResultSets when the connection is returned to the pool, this 
-                        is a debugging feature that should be turned off in production.
-                        
-  new-connection-sql  : An sql statement that is executed against each new connection. 
-                        This can be used to set the connection schema, etc.
-  check-valid-
-  connection-sql      : Identifies a SQL to be executed when the connection is established to 
-                        verify that the connection is valid, e.g. SELECT 1
-                        JBoss will run the SQL statement before handing out the connection from 
-                        the pool. If the SQL fails, the connection will be destroyed/closed and 
-                        new ones will be created. 
-                        MySQLValidConnectionChecker is preferred for newer drivers. This will be run 
-                        before a managed connection is removed from the pool for use by a client. 
-                        See: valid-connection-checker-class-name
-  valid-connection-
-  checker-class-name  : A class that determines if a connection is valid before it is handed out 
-                        from the pool. Should only be used on drivers after 3.22.1 with "ping" 
-                        support. The class specified must implement the 
-                        org.jboss.resource.adapter.jdbc.ValidConnectionChecker interface. Use this 
-                        option instead of check-valid-connection-sql when you want to use more than 
-                        a single SQL statement to check the validity of the connection. Be aware 
-                        that any application making a connection request that causes a connection to 
-                        be established must wait until the connection checker is finished
-                        For MySql the class name is:
-                        org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker
-  exception-sorter-
-  class-name          : Identifies a class used to determine if an error number returned by the 
-                        database is fatal. For MySql the class name is:
-                        org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
-                        
-  type-mapping        : Used by the container-managed persistence (CMP) code to identify the 
-                        database and adjust its database handling accordingly. The name use 
-                        must match one of the names in the standardjbosscmp-jdbc.xml file. 
-                        Additionally, you can add new entries to the standardjbosscmp-jdbc.xml 
-                        to customize the database interaction. 
-                        NOTE that this is used ONLY for EJB 2.1, NOT for EJB 3.
-                        
-  config-property:      Identifies a property to pass to the java.sql.Driver when establishing a 
-                        database connection. Refer to the documentation for your JDBC driver for the 
-                        valid properties. You can provide multiple config-property entries. Valid 
-                        only for local-tx-datasource and no-tx-datasource.    
-  xa-datasource-
-  property            : Identifies a property to pass to the javax.sql.DataSource when establishing 
-                        a database connection. Refer to the documentation for the JDBC driver for 
-                        the valid properties. You can provide multiple xa-datasource-property 
-                        entries. Valid only for xa-datasource.                        
-  prepared-statement-
-  cache-size          : The number of prepared statements to hold in the cache, default=0
-  
-  share-prepared-
-  statements          : If a request creates the same prepared statement more than once in a
-                        given request, should the same prepared statement object be used. Note
-                        that reusing the prepared statement in this case could cause the
-                        application to get unintended results if the application requested the result
-                        set from the first prepared statement after creating the second prepared
-                        statement, default=false
-  transaction-
-  isolation           : Specifies the java.sql.Connection transaction isolation level to use,
-                        unspecified means use the default provided by the database. 
-                        The constants defined in the Connection interface are the possible element 
-                        content values and include:
-                          TRANSACTION_READ_UNCOMMITTED
-                          TRANSACTION_READ_COMMITTED
-                          TRANSACTION_REPEATABLE_READ
-                          TRANSACTION_SERIALIZABLE
-                          TRANSACTION_NONE
-                          
-                        Refer to your database JDBC documentation for a description of each level 
-                        and which levels your database supports.
-                        
-  Notes for MySql:
-  * Use UTF8 charset when creating the database:
-      CREATE DATABASE my_database CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT CHARSET utf8;
-    
-  * Use InnoDb for tables
-      In persistence.xml add this property for hbm2ddl: 
-      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
-      
-      or if you creates the tables by writing the SQL DDL by hand (you little machocist:):
-        CREATE TABLE `my_database`.`my_table` (
-          `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
-          `text` VARCHAR(256) NOT NULL DEFAULT '',
-          PRIMARY KEY (`id`)
-        ) ENGINE = InnoDB;
-
-
-    MySql example:
-    
-    <local-tx-datasource>
-
-        <jndi-name>seam-refimplDatasource</jndi-name>
-        <connection-url>jdbc:mysql://localhost/refimpl_db?characterEncoding=UTF-8</connection-url>
-        <driver-class>com.mysql.jdbc.Driver</driver-class>
-        <user-name>root</user-name>
-        <password></password>
-
-        <min-pool-size>20</min-pool-size>
-
-        // Make sure your MySQL config has that many max_connections!
-             This is the max_threads in default Tomcat server.xml on JBoss AS. //
-        <max-pool-size>250</max-pool-size>
-
-        <blocking-timeout-millis>5000</blocking-timeout-millis>
-
-        // Needs to be smaller than wait_timeout (which is in seconds) in /etc/my.cnf! //
-        <idle-timeout-minutes>2</idle-timeout-minutes>
-
-        // These are the secret ingredients that make it stable! A simple check-valid-connection-sql won't be enough! //
-        <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
-        <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
-
-    </local-tx-datasource>
-        
--->

server/flies-war/src/main/resources-jboss/flies-test-ds.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE datasources
-    PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
-    "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
-<datasources>
-  <local-tx-datasource>
-	<jndi-name>fliesTestDatasource</jndi-name>
-	<connection-url>jdbc:h2:mem:flies;DB_CLOSE_DELAY=-1</connection-url>
-    <driver-class>org.h2.Driver</driver-class>
-    <user-name>sa</user-name>
-    <password></password>
-  </local-tx-datasource>
-</datasources>

server/flies-war/src/main/resources-jboss/zanata-ds.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE datasources
+    PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+  <local-tx-datasource>
+	<jndi-name>zanataDatasource</jndi-name>
+	<connection-url>jdbc:mysql://localhost:3306/zanata?characterEncoding=UTF-8</connection-url>
+    <driver-class>com.mysql.jdbc.Driver</driver-class>
+    <user-name>root</user-name>
+    <password></password>
+  </local-tx-datasource>
+</datasources>
+
+<!--
+The three transaction types you can use are:
+
+  local-tx-datasource : Identifies a data source that uses transactions, even distributed 
+                        transactions within the local application server, but does not use 
+                        distributed transactions among multiple application servers.
+                        
+  no-tx-datasource    : Identifies a data source that does not use transactions. This option is not 
+                        shown in the example, but would appear in place of the <local-tx-datasource> 
+                        tag. 
+  
+  xa-datasource       : Identifies a data source that uses distributed transaction among multiple 
+                        application servers. This option is not shown in the example, but would 
+                        appear in place of the <local-tx-datasource> tag. 
+                        
+                        So which transaction type should you use? In most cases you will use  
+                        <local-tx-datasource> because it handles transactions within a single 
+                        application server. If you are clustering your application servers, or want 
+                        to use distributed transactions among multiple application servers, then you 
+                        should use  <xa-datasource>. Note that both  <local-tx-datasource> and  
+                        <xa-datasource> handle distributed transactions which involve multiple 
+                        datasources. The difference is that  <local-tx-datasource> handles them only 
+                        within a single running application server, while  <xa-datasource> handles 
+                        them among many running application servers. On the other end of the 
+                        spectrum, if your applications only read from the database, then using 
+                        <no-tx-datasource> would be appropriate. 
+                        
+                        WHAT IS XA? 
+                        XA is an API defined by The Open Group's Distributed Transaction Processing 
+                        model. This model provides communications mechanisms between a Transaction 
+                        Monitor and several resource managers which perform updates against 
+                        databases. The Transaction Monitor is responsible for coordinating the 
+                        individual transactions handled by the resource managers to ensure 
+                        transactional semantics when multiple resource managers are involved in a 
+                        single transaction. 
+
+                        
+Within the transaction type, you can specify a wide variety of configuration options. The following
+describes the various configuration options in the *-ds.xml file. A complete set of configuration 
+options, along with a description of each option, can be found in the  docs/dtd/jboss-ds_1_5.dtd file.                         
+  
+  jndi-name           : The name used to reference the data source in your application configurations. 
+                        The name is used to look up the data source in the JNDI namespace. The 
+                        "java:" prefix is automatically added to this name, so datasources are not 
+                        available outside the virtual machine.
+                        
+  connection-url      : The database-specific URL to the server.
+                        
+  driver-class        : The driver you are using for your database.
+  
+  xa-datasource-class : The class name for the distributed transaction data source. 
+                        Valid only for xa-datasource
+                        
+  user-name           : The username that is defined to access this data source. In general,
+                        do not use the root username.
+                        
+  password            : The password for the corresponding username.
+  
+  min-pool-size       : The starting pool size for the number of database connections to be allowed 
+                        by the application server, default=0. Note that the application server does 
+                        not open any connections until the first request for a connection, at which 
+                        time it opens this many connections. One way of forcing the connections to be 
+                        established when the application server is started is to write a simple 
+                        service that does nothing but ask for a connection. 
+                        
+  max-pool-size       : The maximum number of open connections maintained by the application server,
+                        default=20. If the application server runs out of connections, it allocates 
+                        a new connection to fulfill that request, until it hits the maximum number of 
+                        connections. At that point it queues the requests until connections are freed. 
+                        Therefore, it is very important that applications close any connections that 
+                        they obtain.
+                        NOTE: The max-pool-zize value must not exceed the max-connections porperty
+                        value in MySql.
+                        
+  idle-timeout-minutes: The amount of time before the connection times out.
+                        If a surplus connection is not in use for this many minutes, then that 
+                        connection is closed. Note that the number of open connections never goes 
+                        below the <min-pool-size>, default=0
+  blocking-timeout-
+  millis              : The amount of time a thread waits on a connection, if all of the connections 
+                        are in use and the maximum connections have been allocated. On a timeout 
+                        the requestor will gett an exception.
+                        
+  track-statements    : A Boolean (true/false) that has the data source monitor for unclosed 
+                        Statements or ResultSets when the connection is returned to the pool, this 
+                        is a debugging feature that should be turned off in production.
+                        
+  new-connection-sql  : An sql statement that is executed against each new connection. 
+                        This can be used to set the connection schema, etc.
+  check-valid-
+  connection-sql      : Identifies a SQL to be executed when the connection is established to 
+                        verify that the connection is valid, e.g. SELECT 1
+                        JBoss will run the SQL statement before handing out the connection from 
+                        the pool. If the SQL fails, the connection will be destroyed/closed and 
+                        new ones will be created. 
+                        MySQLValidConnectionChecker is preferred for newer drivers. This will be run 
+                        before a managed connection is removed from the pool for use by a client. 
+                        See: valid-connection-checker-class-name
+  valid-connection-
+  checker-class-name  : A class that determines if a connection is valid before it is handed out 
+                        from the pool. Should only be used on drivers after 3.22.1 with "ping" 
+                        support. The class specified must implement the 
+                        org.jboss.resource.adapter.jdbc.ValidConnectionChecker interface. Use this 
+                        option instead of check-valid-connection-sql when you want to use more than 
+                        a single SQL statement to check the validity of the connection. Be aware 
+                        that any application making a connection request that causes a connection to 
+                        be established must wait until the connection checker is finished
+                        For MySql the class name is:
+                        org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker
+  exception-sorter-
+  class-name          : Identifies a class used to determine if an error number returned by the 
+                        database is fatal. For MySql the class name is:
+                        org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
+                        
+  type-mapping        : Used by the container-managed persistence (CMP) code to identify the 
+                        database and adjust its database handling accordingly. The name use 
+                        must match one of the names in the standardjbosscmp-jdbc.xml file. 
+                        Additionally, you can add new entries to the standardjbosscmp-jdbc.xml 
+                        to customize the database interaction. 
+                        NOTE that this is used ONLY for EJB 2.1, NOT for EJB 3.
+                        
+  config-property:      Identifies a property to pass to the java.sql.Driver when establishing a 
+                        database connection. Refer to the documentation for your JDBC driver for the 
+                        valid properties. You can provide multiple config-property entries. Valid 
+                        only for local-tx-datasource and no-tx-datasource.    
+  xa-datasource-
+  property            : Identifies a property to pass to the javax.sql.DataSource when establishing 
+                        a database connection. Refer to the documentation for the JDBC driver for 
+                        the valid properties. You can provide multiple xa-datasource-property 
+                        entries. Valid only for xa-datasource.                        
+  prepared-statement-
+  cache-size          : The number of prepared statements to hold in the cache, default=0
+  
+  share-prepared-
+  statements          : If a request creates the same prepared statement more than once in a
+                        given request, should the same prepared statement object be used. Note
+                        that reusing the prepared statement in this case could cause the
+                        application to get unintended results if the application requested the result
+                        set from the first prepared statement after creating the second prepared
+                        statement, default=false
+  transaction-
+  isolation           : Specifies the java.sql.Connection transaction isolation level to use,
+                        unspecified means use the default provided by the database. 
+                        The constants defined in the Connection interface are the possible element 
+                        content values and include:
+                          TRANSACTION_READ_UNCOMMITTED
+                          TRANSACTION_READ_COMMITTED
+                          TRANSACTION_REPEATABLE_READ
+                          TRANSACTION_SERIALIZABLE
+                          TRANSACTION_NONE
+                          
+                        Refer to your database JDBC documentation for a description of each level 
+                        and which levels your database supports.
+                        
+  Notes for MySql:
+  * Use UTF8 charset when creating the database:
+      CREATE DATABASE my_database CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT CHARSET utf8;
+    
+  * Use InnoDb for tables
+      In persistence.xml add this property for hbm2ddl: 
+      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
+      
+      or if you creates the tables by writing the SQL DDL by hand (you little machocist:):
+        CREATE TABLE `my_database`.`my_table` (
+          `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
+          `text` VARCHAR(256) NOT NULL DEFAULT '',
+          PRIMARY KEY (`id`)
+        ) ENGINE = InnoDB;
+
+
+    MySql example:
+    
+    <local-tx-datasource>
+
+        <jndi-name>seam-refimplDatasource</jndi-name>
+        <connection-url>jdbc:mysql://localhost/refimpl_db?characterEncoding=UTF-8</connection-url>
+        <driver-class>com.mysql.jdbc.Driver</driver-class>
+        <user-name>root</user-name>
+        <password></password>
+
+        <min-pool-size>20</min-pool-size>
+
+        // Make sure your MySQL config has that many max_connections!
+             This is the max_threads in default Tomcat server.xml on JBoss AS. //
+        <max-pool-size>250</max-pool-size>
+
+        <blocking-timeout-millis>5000</blocking-timeout-millis>
+
+        // Needs to be smaller than wait_timeout (which is in seconds) in /etc/my.cnf! //
+        <idle-timeout-minutes>2</idle-timeout-minutes>
+
+        // These are the secret ingredients that make it stable! A simple check-valid-connection-sql won't be enough! //
+        <exception-sorter-class-name>com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter</exception-sorter-class-name>
+        <valid-connection-checker-class-name>com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker</valid-connection-checker-class-name>
+
+    </local-tx-datasource>
+        
+-->

server/flies-war/src/main/resources-jboss/zanata-test-ds.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE datasources
+    PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
+    "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
+<datasources>
+  <local-tx-datasource>
+	<jndi-name>zanataTestDatasource</jndi-name>
+	<connection-url>jdbc:h2:mem:flies;DB_CLOSE_DELAY=-1</connection-url>
+    <driver-class>org.h2.Driver</driver-class>
+    <user-name>sa</user-name>
+    <password></password>
+  </local-tx-datasource>
+</datasources>

server/flies-war/src/main/resources/META-INF/testdata/ProjectsData.dbunit.xml

 		  description="An example Project"
 		  homeContent=""
 		  name="Sample Project"
+		  overrideLocales="FALSE"
 	    />
         <HProjectIteration id="1"
 				          versionNum="1"
                            lastChanged="2009-09-01 20:30:46"
                            slug="1.0"
                            active="TRUE"
-                           description="Initial Release"
-                           name="Version 1.0"
                            parentId="[NULL]"
                            project_id="1"
+				  		   overrideLocales="FALSE"
         />
 	   	<HProjectIteration id="2"
 				          versionNum="1"
                            lastChanged="2009-09-01 20:31:32"
                            slug="1.1"
                            active="TRUE"
-                           description="Next Release"
-                           name="Version 1.1"
                            parentId="[NULL]"
                            project_id="1"
+				  		   overrideLocales="FALSE"
         />
 	    <HProject_Maintainer personId="3" 
                              projectId="1"

server/flies-war/src/main/resources/messages.properties

 jsf.ChangePassword=Change Password
 jsf.Close=Close
 jsf.Copyright=Copyright
-jsf.CopyrightYearInfo=2008
+jsf.CopyrightYearInfo=2008-11
 jsf.Configuration=Configuration
 jsf.ConfirmPassword=Confirm Password
 jsf.CountryCode=Country Code
 jsf.Enabled=Enabled
 jsf.Error=Error
 jsf.FirstExternalLoginMessage=Please verify the email address below and click Save to validate your email address.
-jsf.Flies=Flies
-jsf.FliesAccountActivation=Flies Account Activation
-jsf.FliesMainTitle=#{messages['jsf.Flies']}
-jsf.FliesMainDescription=Flies
-jsf.FliesResetPasswordRequest=Flies Reset Password Request
 jsf.ForgotYourPassword=Forgot your password?
 jsf.FoundResultsizeProjectsMatchingQuerySearchquery=Found #{projectSearch.resultSize} Projects matching query '#{projectSearch.searchQuery}'
 jsf.Help=Help
 jsf.HelpUrl=Help URL
-jsf.HelpUrlExample=e.g. http://flies.example.com/help
 jsf.HelpUrlToolTip=The help URL for the server (shown on welcome page and every page's header)
 jsf.Home=Home
 jsf.HomepageContent=Homepage Content
 jsf.RecordNotFound=Record not found
 jsf.Register=Register
 jsf.RegisterUrl=Register URL
-jsf.RegisterUrlExample=eg /flies/account/register or http://example.com/register
+jsf.RegisterUrlExample=eg /zanata/account/register or http://example.com/register
 jsf.RegisterUrlToolTip=The user registration URL for the server
 jsf.ReindexFullTextSearchDatabase=Re-index full text search database
 jsf.RememberMe=Remember me
 jsf.Role=Role
 jsf.RoleDetails=Role Details
 jsf.RoleManager=Role Manager
-jsf.RunningVersionInfo=Running version #{fliesInit.version} (#{fliesInit.buildTimestamp}).
+jsf.RunningVersionInfo=Zanata version #{fliesInit.version} (#{fliesInit.buildTimestamp}).
 jsf.Save=Save
 jsf.Search=Search
 jsf.SelectedLocales=Selected Locales
 jsf.TranslateGWTDevMode=Translate (GWT DevMode)
 jsf.UnexpectedErrorPleaseTryAgain=Unexpected error. Please try again.
 jsf.Update=Update
-jsf.UrlExample=e.g. http://example.com/flies or http://flies.example.com
+jsf.UrlExample=e.g. http://example.com/zanata or http://zanata.example.com
 jsf.UrlToolTip=The base URL for the server, including the application context path (no final slash)
 jsf.UserManager=User Manager
 jsf.Username=Username
 jsf.UsernameToolTip=The username should be all in lower case.
 jsf.Variant=Variant
 jsf.ViewStatus=View Status
-jsf.WelcomeToFlies=Welcome to Flies!
 jsf.YouDoNotHavePermissionToAccessThisResource=You do not have permission to access this resource.
 jsf.YourSessionHasTimedOutPleaseTryAgain=Your session has timed out. Please try again.
 jsf.YourCurrentApiKeyIs=Your current API key is
 jsf.YourLanguageMissing=Your language missing?
+jsf.Zanata=Zanata
+jsf.ZanataAccountActivation=Zanata Account Activation
+jsf.ZanataMainTitle=#{messages['jsf.Zanata']}
+jsf.ZanataMainDescription=Zanata
+jsf.ZanataResetPasswordRequest=Zanata Reset Password Request

server/flies-war/src/main/webapp/WEB-INF/facelets/email/activation.xhtml

            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:s="http://jboss.com/products/seam/taglib"
            charset="UTF-8" importance="normal">
-  <m:from name="Flies" >#{applicationConfiguration.adminEmail}</m:from>
+  <m:from name="#{messages['jsf.Zanata']}" >#{applicationConfiguration.adminEmail}</m:from>
   <m:to name="#{register.person.name}">#{register.person.email}</m:to>
-  <m:subject>#{messages['jsf.FliesAccountActivation']}</m:subject>
+  <m:subject>#{messages['jsf.ZanataAccountActivation']}</m:subject>
   <m:body>
     <html>
     <body>

server/flies-war/src/main/webapp/WEB-INF/facelets/email/email_activation.xhtml

            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:s="http://jboss.com/products/seam/taglib"
            charset="UTF-8" importance="normal">
-  <m:from name="Flies" >#{applicationConfiguration.adminEmail}</m:from>
+  <m:from name="#{messages['jsf.Zanata']}" >#{applicationConfiguration.adminEmail}</m:from>
   <m:to name="#{register.person.name}">#{profileAction.email}</m:to>
-  <m:subject>#{messages['jsf.FliesAccountActivation']}</m:subject>
+  <m:subject>#{messages['jsf.ZanataAccountActivation']}</m:subject>
   <m:body>
     <html>
     <body>

server/flies-war/src/main/webapp/WEB-INF/facelets/email/email_validation.xhtml

            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:s="http://jboss.com/products/seam/taglib"
            charset="UTF-8" importance="normal">
-  <m:from name="Flies" >#{applicationConfiguration.adminEmail}</m:from>
+  <m:from name="#{messages['jsf.Zanata']}" >#{applicationConfiguration.adminEmail}</m:from>
   <m:to name="#{register.person.name}">#{profileAction.email}</m:to>
   <m:subject>#{messages['jsf.EmailAccountChangeValidation']}</m:subject>
   <m:body>

server/flies-war/src/main/webapp/WEB-INF/facelets/email/password_reset.xhtml

            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:s="http://jboss.com/products/seam/taglib"
            charset="UTF-8" importance="normal">
-  <m:from name="Flies" >#{applicationConfiguration.adminEmail}</m:from>
+  <m:from name="#{messages['jsf.Zanata']}" >#{applicationConfiguration.adminEmail}</m:from>
   <m:to name="#{passwordResetRequest.account.person.name}">#{passwordResetRequest.account.person.email}</m:to>
-  <m:subject>#{messages['jsf.FliesResetPasswordRequest']}</m:subject>
+  <m:subject>#{messages['jsf.ZanataResetPasswordRequest']}</m:subject>
   <m:body>
     <html>
       <body>

server/flies-war/src/main/webapp/WEB-INF/layout/template.xhtml

 
 	<head>
 		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-		<title>#{messages['jsf.FliesMainTitle']}</title>
+		<title>#{messages['jsf.ZanataMainTitle']}</title>
 		<link rel="shortcut icon"
 		  href="#{request.contextPath}/img/favicon.ico" type="image/x-icon" />
 		<a:loadStyle src="/stylesheet/reset-fonts-grids.css" />
 			<div id="banner">
         		<div id="headerlogo">
 					<s:link view="/home.xhtml" propagation="none">
-						<h1><span>#{messages['jsf.FliesMainDescription']}</span></h1>
+						<h1><span>#{messages['jsf.ZanataMainDescription']}</span></h1>
 					</s:link>
 				</div>
         		<div id="header_top_right">
 					<div id="footer-text">
 						#{messages['jsf.Copyright']} #{messages['jsf.CopyrightYearInfo']}
 						<a href="http://www.redhat.com/">#{messages['jsf.ManufacturerInfo']}</a> #{messages['jsf.AndOthers']}.
-						#{messages['jsf.PoweredBy']} <a href="http://flies.googlecode.com/">#{messages['jsf.Flies']}</a>.
+						#{messages['jsf.PoweredBy']} <a href="http://flies.googlecode.com/">#{messages['jsf.Zanata']}</a>.
 						<br/>#{messages['jsf.RunningVersionInfo']}
 					</div>
 					<div id="localeSelector">

server/flies-war/src/main/webapp/img/zanata_tmp_background.png

Added
New image

server/flies-war/src/main/webapp/stylesheet/flies.css

 	float: left;
 	width: 900px;
 	height: 100px;
-	background: #ffffff url('../img/banner-background-with-logo.png') no-repeat left top;
+	background: #ffffff url('../img/zanata_tmp_background.png') no-repeat left top;
 
 }
 

server/flies-war/src/test/java/net/openl10n/flies/FliesDBUnitSeamTest.java

    // begin config methods from DBUnitSeamTest
    @BeforeClass
    @Parameters("datasourceJndiName")
-   public void setDatasourceJndiName(@Optional("java:/fliesTestDatasource") String datasourceJndiName)
+   public void setDatasourceJndiName(@Optional("java:/zanataTestDatasource") String datasourceJndiName)
    {
       super.setDatasourceJndiName(datasourceJndiName);
    }

server/flies-war/src/test/java/net/openl10n/flies/FliesJpaTest.java

 public abstract class FliesJpaTest
 {
 
-   private static final String PERSIST_NAME = "fliesTestDatasource";
+   private static final String PERSIST_NAME = "zanataTestDatasource";
 
    private static EntityManagerFactory emf;
 

server/flies-war/src/test/java/net/openl10n/flies/rest/service/ResourceTestObjectFactory.java

       TextFlow stf = sr.getTextFlows().get(0);
 
       PotEntryHeader potEntryHeader = new PotEntryHeader();
-      potEntryHeader.setExtractedComment("exactedComment");
       potEntryHeader.setContext("potentrycontext");
       // for the convenience of test only
       potEntryHeader.getFlags().add("");

server/flies-war/src/test/java/net/openl10n/flies/rest/service/RestUtilsTest.java

 import net.openl10n.flies.rest.dto.resource.ResourceMeta;
 import net.openl10n.flies.rest.dto.resource.TranslationsResource;
 
+@Test(groups = { "unit-tests" })
 public class RestUtilsTest
 {
    private ResourceTestObjectFactory resourceTestFactory = new ResourceTestObjectFactory();

server/flies-war/src/test/java/net/openl10n/flies/util/Base64UrlSafeTest.java

 import org.testng.Assert;
 import org.testng.annotations.Test;
 
+@Test(groups = { "unit-tests" })
 public class Base64UrlSafeTest
 {
    @Test

server/flies-war/src/test/jboss-embedded-bootstrap/META-INF/persistence.xml

     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
     version="1.0">
     
-	<persistence-unit name="fliesTestDatasource"
+	<persistence-unit name="zanataTestDatasource"
 		transaction-type="RESOURCE_LOCAL">
 		<provider>org.hibernate.ejb.HibernatePersistence</provider>
 
-		<non-jta-data-source>java:/fliesTestDatasource</non-jta-data-source>
+		<non-jta-data-source>java:/zanataTestDatasource</non-jta-data-source>
 
 		<!--
 			NB non-jta-data-source is not compatible with JPA tests, but is

server/flies-war/src/test/resources/AllIntegrationTests.tng.xml

 
 <!-- these default values are hard-coded into FliesDBUnitSeamTest:
 	<parameter name="database" value="hsql" />
-	<parameter name="datasourceJndiName" value="java:/fliesDatasource" />
+	<parameter name="datasourceJndiName" value="java:/zanataDatasource" />
 	<parameter name="binaryDir" value="" />
  -->
 

server/flies-war/src/test/resources/META-INF/persistence.xml

     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
     version="1.0">
     
-	<persistence-unit name="fliesTestDatasource"
+	<persistence-unit name="zanataTestDatasource"
 		transaction-type="RESOURCE_LOCAL">
 		<provider>org.hibernate.ejb.HibernatePersistence</provider>
 

server/flies-war/src/test/resources/net/openl10n/flies/test/model/DocumentsData.dbunit.xml

 		description="An example Project"
 		homeContent=""
 		name="Sample Project"
+ 	    overrideLocales="FALSE"
 	/>
 	<!-- Tell DbUnit to delete any existing documents -->
 	<HDocument />

server/flies-war/src/test/resources/net/openl10n/flies/test/model/ProjectsData.dbunit.xml

 		  description="An example Project"
 		  homeContent=""
 		  name="Sample Project"
+		  overrideLocales="FALSE"
 	    />
         <HProjectIteration id="1"
 				          versionNum="1"
                            lastChanged="2009-09-01 20:30:46"
                            slug="1.0"
                            active="TRUE"
-                           description="Initial Release"
-                           name="Version 1.0"
                            parentId="[NULL]"
                            project_id="1"
+						  overrideLocales="FALSE"
         />
 	   	<HProjectIteration id="2"
 				          versionNum="1"
                            lastChanged="2009-09-01 20:31:32"
                            slug="1.1"
                            active="TRUE"
-                           description="Next Release"
-                           name="Version 1.1"
                            parentId="[NULL]"
                            project_id="1"
+						  overrideLocales="FALSE"
         />
 	    <HProject_Maintainer personId="3" 
                              projectId="1"