Permalink
Browse files

Built a 0.3 version of that connector that could work correctly with

added parameters, Glassfish AND neo4j 1.5.
  • Loading branch information...
1 parent 204a89e commit 95d9e1b492823edcf7f3bcdc7ae4f75831255a12 Riduidel committed Feb 3, 2012
@@ -71,11 +71,13 @@
private int connectionsCreated = 0;
- @ConfigProperty
+ @ConfigProperty(defaultValue = "dump_configuration=true")
private String neo4jConfig;
- @ConfigProperty
+ @ConfigProperty(defaultValue = "lib/databases/neo4j")
private String dir;
- @ConfigProperty
+ @ConfigProperty(defaultValue="false")
+ private String xaMode;
+
private boolean xa;
/**
@@ -95,7 +97,7 @@ public String getDir() {
public void setDir(String dir) {
this.dir = dir;
}
-
+
public boolean isXa() {
return xa || ra.isXa();
}
@@ -323,4 +325,40 @@ public TransactionSupportLevel getTransactionSupport() {
}
}
+ /**
+ * @return the neo4jConfig
+ * @category getter
+ * @category neo4jConfig
+ */
+ public String getNeo4jConfig() {
+ return neo4jConfig;
+ }
+
+ /**
+ * @param neo4jConfig the neo4jConfig to set
+ * @category setter
+ * @category neo4jConfig
+ */
+ public void setNeo4jConfig(String neo4jConfig) {
+ this.neo4jConfig = neo4jConfig;
+ }
+
+ /**
+ * @return the xaMode
+ * @category getter
+ * @category xaMode
+ */
+ public String getXaMode() {
+ return Boolean.toString(isXa());
+ }
+
+ /**
+ * @param xaMode the xaMode to set
+ * @category setter
+ * @category xaMode
+ */
+ public void setXaMode(String xaMode) {
+ this.setXa(Boolean.parseBoolean(xaMode));
+ }
+
}
@@ -52,6 +52,7 @@
private String dir;
@ConfigProperty(defaultValue = "false")
+ private String xaMode;
private boolean xa;
private final Set<Neo4jManagedConnectionFactory> factories = new HashSet<Neo4jManagedConnectionFactory>();
@@ -213,4 +214,22 @@ public boolean equals(Object other) {
return result;
}
+ /**
+ * @return the xaMode
+ * @category getter
+ * @category xaMode
+ */
+ public String getXaMode() {
+ return Boolean.toString(isXa());
+ }
+
+ /**
+ * @param xaMode the xaMode to set
+ * @category setter
+ * @category xaMode
+ */
+ public void setXaMode(String xaMode) {
+ this.setXa(Boolean.parseBoolean(xaMode));
+ }
+
}
@@ -27,13 +27,21 @@ public PlatformTransactionProvider() {
super(JEE_JTA);
log.info("Load PlatformTransactionManagerProvider");
}
-
+/*
@Override
protected AbstractTransactionManager loadTransactionManager(
String txLogDir, KernelPanicEventGenerator kpe,
TxHook rollbackHook, StringLogger msgLog, FileSystemAbstraction fileSystem) {
log.info("Create Platform TransactionManager wrapper");
return new PlatformTransactionManager();
}
+*/
+ @Override
+ protected AbstractTransactionManager loadTransactionManager(
+ String txLogDir, KernelPanicEventGenerator kpe, TxHook rollbackHook) {
+ // old Neo4j 1.5 version
+ log.info("Create Platform TransactionManager wrapper");
+ return new PlatformTransactionManager();
+ }
}
@@ -171,5 +171,4 @@
<scope>test</scope>
</dependency>
</dependencies>
-
</project>
View
@@ -11,7 +11,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<arquillian.version>1.0.0.CR7</arquillian.version>
<jbossas.version>7.0.2.Final</jbossas.version>
- <neo4j.version>1.6</neo4j.version>
+ <neo4j.version>1.5</neo4j.version>
</properties>
<scm>
<developerConnection>scm:git:git@github.com:alexsmirnov/neo4j-connector.git</developerConnection>
@@ -132,6 +132,14 @@
</build>
<repositories>
<repository>
+ <id>jboss</id>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <url>http://repository.jboss.org/nexus/content/groups/public/</url>
+ </repository>
+ <repository>
<id>fungal</id>
<url>http://jesperpedersen.github.com/fungal/maven2</url>
</repository>

0 comments on commit 95d9e1b

Please sign in to comment.