Database-less CONNECT Deployment
Overview
CONNECT can facilitate a database-less deployment for environments and/or clients that do not want to use databases. With CONNECT 5.1, there is no need to have data-sources already defined on the server in order to deploy CONNECT successfully. This is achieved by defining the database beans on as required basis (lazy-init= true) and removing the unnecessary resource-refs in the web.xml files. Additionally, we need to configure following files:
Comment out the databaseEventLogger from the loggersList bean in EventLoggerFactoryConfig.xml. Your EventLoggerFactoryConfig.xml should look like this:
EventLoggerFactoryConfig.xml<bean id="loggersList" class="java.util.ArrayList"> <constructor-arg> <list> <ref bean="log4jEventLogger"/> <!--ref bean="databaseEventLogger" /--> </list> </constructor-arg> </bean>
- Provide a No-Op implementation for transactionstore in TransactionLoggingProxyConfig.xmlTransactionLoggingProxyConfig.xml
<!-- Beans defined for transactionstore --> <alias alias="transactionstore" name="transactionstorenoop" />
- Set LogToDatabase=false in audit.properties
Important note regarding Example DS
Wildfly requires at-least one datasource defined on the server and it must be refferred to in the default bindings section. Removing all datasources will result in the below error:
2017-09-13 13:11:32,358 ERROR [org.jboss.as.controller.management-operation] (XNIO-1 task-9) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "CONNECT-JB7.ear")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => [
"jboss.naming.context.java.module.CONNECT.\"DocumentQuery_a0-5.1.0-SNAPSHOT\".DefaultDataSource is missing [jboss.naming.context.java.jboss.datasources.ExampleDS]",
This is not related to CONNECT. It is mandated by the Java EE Specification. For more information, visit Wildfly documentation.
Note: CONNECT can be deployed in fully functional pass-through modes without data sources defined on the server. Although CONNECT can be deployed without databases in standard mode, customers need to override the PD, PD Deferred Request, QD and RD reference adapters to not use databases.