Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 4 files changed
  • 0 commit comments
  • 2 contributors
Commits on Aug 02, 2012
@anpieber anpieber [KARAF-1666] Fixed another jetty problem with acceptors and blocking …
…connectors

Signed-off-by: Andreas Pieber <anpieber@gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/karaf/trunk@1368388 13f79535-47bb-0310-9956-ffa450edef68
c5ca1dc
Jamie Mark Goodyear [KARAF-447] Add JDBC lock implementation for PostgreSQL
Update to tests.



git-svn-id: https://svn.apache.org/repos/asf/karaf/trunk@1368406 13f79535-47bb-0310-9956-ffa450edef68
aad32f8
Jamie Mark Goodyear [KARAF-1700] update manual to reflect JDBC Lock updates
Update to locking manual. Thank you for the patch Heath Kesler.



git-svn-id: https://svn.apache.org/repos/asf/karaf/trunk@1368408 13f79535-47bb-0310-9956-ffa450edef68
fc8a1a6
View
2  assemblies/apache-karaf/src/main/resources/extra/jetty.xml
@@ -45,7 +45,7 @@ DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
<Property name="jetty.port" default="8181"/>
</Set>
<Set name="maxIdleTime">300000</Set>
- <Set name="Acceptors">2</Set>
+ <Set name="Acceptors">1</Set>
<Set name="statsOn">false</Set>
<Set name="confidentialPort">8443</Set>
</New>
View
4 main/src/test/java/org/apache/karaf/main/lock/PostgreSQLJDBCLockIntegrationTest.java
@@ -35,7 +35,7 @@
public void setUp() throws Exception {
password = "secret";
driver = "org.postgresql.Driver";
- url = "jdbc:derby://127.0.0.1:5432/test";
+ url = "jdbc:postgresql://127.0.0.1:5432/test";
super.setUp();
}
@@ -48,7 +48,7 @@ PostgreSQLJDBCLock createLock(Properties props) {
@Test
public void initShouldCreateTheDatabaseIfItNotExists() throws Exception {
String database = "test" + System.currentTimeMillis();
- url = "jdbc:derby://127.0.0.1:5432/" + database;
+ url = "jdbc:postgresql://127.0.0.1:5432/" + database;
props.put("karaf.lock.jdbc.url", url);
lock = createLock(props);
lock.lock();
View
6 main/src/test/java/org/apache/karaf/main/lock/PostgreSQLJDBCLockTest.java
@@ -38,7 +38,7 @@
public void setUp() throws Exception {
password = "secret";
driver = "org.postgresql.Driver";
- url = "jdbc:derby://127.0.0.1:5432/test";
+ url = "jdbc:postgresql://127.0.0.1:5432/test";
super.setUp();
}
@@ -48,7 +48,7 @@ DefaultJDBCLock createLock(Properties props) {
@Override
Connection doCreateConnection(String driver, String url, String username, String password) {
assertEquals(this.driver, driver);
- assertEquals(this.url + ";create=true", url);
+ assertEquals(this.url, url);
assertEquals(this.user, username);
assertEquals(this.password, password);
return connection;
@@ -69,7 +69,7 @@ public void createConnectionShouldConcatinateOptionsCorrect() {
@Override
Connection doCreateConnection(String driver, String url, String username, String password) {
assertEquals(this.driver, driver);
- assertEquals(this.url + ";create=true", url);
+ assertEquals(this.url, url);
assertEquals(this.user, username);
assertEquals(this.password, password);
return connection;
View
60 manual/src/main/webapp/users-guide/failover.conf
@@ -57,7 +57,7 @@ Otherwise, configure the system.properties file as normal for your setup, for ex
{noformat}
karaf.lock=true
-karaf.lock.class=org.apache.karaf.main.OracleJDBCLock
+karaf.lock.class=org.apache.karaf.main.lock.OracleJDBCLock
karaf.lock.jdbc.url=jdbc:oracle:thin:@hostname:1521:XE
karaf.lock.jdbc.driver=oracle.jdbc.OracleDriver
karaf.lock.jdbc.user=user
@@ -73,15 +73,61 @@ As with the default JDBC locking setup, the Oracle JDBC driver JAR file must be
h3. Derby
-{warning}
-TODO
-{warning}
+The same rules apply when using derby. Make sure you have the driver jar file in the Karaf {{lib}} folder before starting Karaf.
+
+Then make you update the properties in {{$KARAF_HOME/etc/system.properties}} to look something like this example:
+
+{noformat}
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.lock.DerbyJDBCLock
+karaf.lock.jdbc.url=jdbc:derby://127.0.0.1:1527/dbname
+karaf.lock.jdbc.driver=org.apache.derby.jdbc.ClientDriver
+karaf.lock.jdbc.user=user
+karaf.lock.jdbc.password=password
+karaf.lock.jdbc.table=KARAF_LOCK
+karaf.lock.jdbc.clustername=karaf
+karaf.lock.jdbc.timeout=30
+{noformat}
h3. MySQL
-{warning}
-TODO
-{warning}
+Make sure you have the MySQL driver jar file in the Karaf {{lib}} folder before starting Karaf.
+
+*NOTE*: for 2.2.x, 2.3.x, 3.0.x you need to rename the MySQL Driver jar to prefix with 'karaf-' in order for karaf to pick it up, otherwise you will see karaf just hang on startup and the log will show you that it could not find the driver.
+
+Then make you update the properties in {{$KARAF_HOME/etc/system.properties}} to look something like this example:
+
+{noformat}
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.lock.MySQLJDBCLock
+karaf.lock.jdbc.url=jdbc:mysql://127.0.0.1:3306/dbname
+karaf.lock.jdbc.driver=com.mysql.jdbc.Driver
+karaf.lock.jdbc.user=user
+karaf.lock.jdbc.password=password
+karaf.lock.jdbc.table=KARAF_LOCK
+karaf.lock.jdbc.clustername=karaf
+karaf.lock.jdbc.timeout=30
+{noformat}
+
+h3. PostgreSQL
+
+Make sure you have the PostgreSQL driver jar file in the Karaf {{lib}} folder before starting Karaf.
+
+*NOTE*: for 2.2.x, 2.3.x, 3.0.x you need to rename the PostgreSQL Driver jar to prefix with 'karaf-' in order for karaf to pick it up, otherwise you will see karaf just hang on startup and the log will show you that it could not find the driver.
+
+Then make you update the properties in {{$KARAF_HOME/etc/system.properties}} to look something like this example:
+
+{noformat}
+karaf.lock=true
+karaf.lock.class=org.apache.karaf.main.lock.PostgreSQLJDBCLock
+karaf.lock.jdbc.url=jdbc:postgresql://127.0.0.1:1527/dbname
+karaf.lock.jdbc.driver=org.postgresql.Driver
+karaf.lock.jdbc.user=user
+karaf.lock.jdbc.password=password
+karaf.lock.jdbc.table=KARAF_LOCK
+karaf.lock.jdbc.clustername=karaf
+karaf.lock.jdbc.timeout=0
+{noformat}
{anchor:locklevel}

No commit comments for this range

Something went wrong with that request. Please try again.