Open J Proxy
Everything you need to get started with Open J Proxy
Get up and running in 5 minutes
The easiest way to get started is using Docker:
docker run --rm -d --network host rrobetti/ojp:0.3.1-beta
For production deployments, you can also run as a standalone JAR or deploy to Kubernetes.
For Maven projects, add this dependency to your pom.xml:
<dependency>
<groupId>org.openjproxy</groupId>
<artifactId>ojp-jdbc-driver</artifactId>
<version>0.3.1-beta</version>
</dependency>
For Gradle projects:
implementation 'org.openjproxy:ojp-jdbc-driver:0.3.1-beta'
Update your database driver class:
org.openjproxy.jdbc.Driver
Update your JDBC URL by prefixing it with OJP connection info:
// PostgreSQL
jdbc:ojp[localhost:1059]_postgresql://user@localhost:5432/mydb
// MySQL
jdbc:ojp[localhost:1059]_mysql://localhost:3306/mydb
// Oracle
jdbc:ojp[localhost:1059]_oracle:thin:@localhost:1521/XEPDB1
// SQL Server
jdbc:ojp[localhost:1059]_sqlserver://localhost:1433;databaseName=mydb
That's it! Your application now benefits from:
Customize OJP for your environment
Configure the OJP server with environment variables or configuration files:
Fine-tune HikariCP pool settings for optimal performance:
Configure security and authentication:
Works seamlessly with popular Java frameworks
Configure OJP in your application.properties:
spring.datasource.driver-class-name=org.openjproxy.jdbc.Driver
spring.datasource.url=jdbc:ojp[localhost:1059]_postgresql://localhost:5432/mydb
spring.datasource.username=user
spring.datasource.password=password
Configure data source in your application server:
<data-source>
<driver>org.openjproxy.jdbc.Driver</driver>
<url>jdbc:ojp[localhost:1059]_...</url>
</data-source>
Add OJP configuration to application.properties:
quarkus.datasource.db-kind=postgresql
quarkus.datasource.jdbc.driver=org.openjproxy.jdbc.Driver
quarkus.datasource.jdbc.url=jdbc:ojp[localhost:1059]_...
Configure OJP in application.yml:
datasources:
default:
driver-class-name: org.openjproxy.jdbc.Driver
url: jdbc:ojp[localhost:1059]_...
OJP supports XA distributed transactions for coordinating across multiple resources. Configure XA data sources and use standard JTA transaction managers.
Built-in metrics, query tracking, and performance monitoring. Integrate with Prometheus, Grafana, or your monitoring stack.
Deploy multiple OJP server instances for high availability. Load balance connections and handle failover automatically.
Use the gRPC API to access OJP from non-Java languages. Protocol Buffers definitions available on GitHub.
Configure primary and replica databases. Automatic failover to replica in case of primary failure.
Optimize connection pool sizes, query timeouts, and resource allocation based on your workload patterns.
Our team is here to assist you