Does Grails v1.1.1 support multiple database connections? - grails

Currently I am using Grails v1.1.1. I need to connect multiple databases.
So I need to know if it's possible to connect to multiple DB's in Grails v1.1.1.
What is the procedure to connect multiple DB's?
Are there any plugins required?
If so, please share the link.

Try installing the datasources plugin.
grails install-plugin datasources
UPDATE
Datasources plugin is no longer available.

Related

Create Neo4j database dump with JQAssistant

I want to create a dump of the database that JQAssistant creates with a scan. So far i have tried to do this with the integrated server and by connecting jqassistant to a running database.
The problem with the integrated database is that i can't access a shell and therefore i don't know how i could create the dump.
Connecting to the running database also didn't work. I assume the problem here is the encryption, my server is running local and trying to connect to it with
jqassistant.sh scan -f my-project.jar -storeUri bolt://localhost:7687 -storeUsername neo4j -storePassword secret
which is the example from the jqa tutorial throws the error:
javax.net.ssl.SSLHandshakeException: General SSLEngine problem
so i assume i can't connect without ssl encryption.
I am using Neo4j server 3.5.15 and JQAssistant Commandline Tool version 1.9 which uses an integrated Neo4j 3.5.14 server.
If you can give me an new idea how to create a data dump out of the scan or how to fix one of the two given problems i would appreciate that a lot!
Thanks in advance!
I couldn't figure out a way to export the database with the commandline tool, but with the maven plugin. If you setup a maven project and include jqassistant as a plugin it offers you the option "export-database" which creates a Cypher script.

ejabberd - Disable MySQL without recompiling

I have an ejabberd application in production. I've been using MySQL for a couple of month, but now I've decided to migrate to a different db (I've created a custom module which I have in production). The problem is that even when no module is setup with "dbtype: mysql", ejabberd needs the odbc configuration to start, and creates the connection to mysql. I want to disable mysql.
I know I can recompile the code without the --enable-mysql flag, but I'm wondering if there is a way to stop ejabberd for trying to connect to mysql without recompiling.
Thanks!
You have something wrong in your configuration. MySQL can be disabled by not configuring MySQL in the configuration. Maybe you have configured default database backend to be MySQL.

Adding .jar to Grails Dependencies of a Project

I have this project having MSSQL 2008 R2 as its database server. The connection between the Services view of IReport and the database is established and running. The problem here is that the project cannot connect to the database server when running it.
These is the error showned on grails console prior to start-up completion:
ERROR hbm2ddl.SchemaUpdate - could not complete schema update
I've seen similar case but the way to resolve it is having the driver sqljdbc4.jar put inside the [Project Name]\classpath\Grails Dependencies (project explorer heirarchy) where the driver is located in the [Project Name]\lib. But the do how has gone missing.
I've also tried to manually install the dependency following the commmand below but grails return that the driver is not found.
grials> install-dependency sqljdbc4
The question is how can I include the driver into the Grails Dependencies?
Assuming you are running Grails 2+, this article should help you. I also had to restart Eclipse before everything actually showed up correctly.

Riak for Grails Plugin

I am trying to use the Grails Riak plugin but I don't succeed.
Maybe I didn't get it, but I expect that the plugin let's me store my domain objects in a riak database: http://springsource.github.com/grails-data-mapping/riak/manual/guide/3.%20Object%20Mapping.html
But it seems since there is still a datasource defined, Grails just maps the object to the normal SQL database.
What am I doing wrong? How do I get the plugin to work?
Update:
uninstalling the Hibernate plugin seems not to work for Grails 2.0.x. After uninstalling, it seems to be automatically reinstalled.
For Grails 1.3.8, it works, but
grails install-plugin riak
will result in an error while downloading and installing it works:
grails install-plugin grails-riak-1.0.0.M4.zip
I've now configured my riak to listen on port 8091 (http://localhost:8091/buckets?buckets=true) and when I connect through a browser, I get a reply. But my Grails App complains java.net.ConnectException: Connection Refused
Update 2:
It seems that the riak plugin ignores my configuration - if a riak instance is configured for port 9098, the plugin manages to connect and works!
If you install the Riak plugin you have to uninstall the Hibernate plugin. Otherwise it will get confused as to which datastore you actually want to store data in.

Can I prevent an Ack from being sent with the Grails RabbitMQ plugin?

The Grails RabbitMQ plugin is great, but I can't seem to find any information about what to do when processing a message fails. I would prefer not to send an Ack back to RabbitMQ, but I can't seem to find any information on how to do this using the plugin.
Is it possible to control this with the RabbitMQ plugin for grails, or am I stuck not using the plugin?
The current version of Grails RabbitMQ plugin (0.3.3) do not support manual acknowledge mode.
Under the hood Grails RabbitMQ plugin use Spring AMQP libraries, so you can always declare your custom SimpleMessageListenerContainer in resources.groovy and implement a listener with manual acks. Check out http://static.springsource.org/spring-amqp/reference/html/#d0e377

Resources