Servicemix Camel Activiti Integration and H2 Database configuration - apache-camel

I have configured Activiti on Servicemix 5.1.1 and got it working with Camel. I need to configure Activiti to use SQL Server instead of the default inbuilt H2 which comes with servicemix for Activiti during feature installation. I am not finding any config files related to activiti to change the DB credentials either.
Any help on how to configure the Activiti DB with Servicemix is highly appreciated.

There's no easy way to configuring another database at the moment. The solution would be to create a Blueprint XML file like the one we're using internally (cfr. https://github.com/apache/servicemix/blob/master/activiti/activiti-config/src/main/resources/OSGI-INF/blueprint/activiti-config.xml - you may have to remove the custom resolver bits), modify it to point to your SQL server and drop it in ServiceMix' deploy directory.
FWIW, I created https://issues.apache.org/jira/browse/SM-2379 to provide a more convenient way to define a new database.

Related

Quarkus MSSQL with IntegratedSecurity, is it possible?

Has anyone gotten quarkus to connect to an MSSQL database using integratedsecurity=true in the JDBC url? I have used this in the past based on Microsoft's instructions here but have not been able to figure out how to pass the jaas and krb5 conf file paths as properties into quarkus when using docker.

How to access Alfresco database via url?

in my alfresco-global.properties file it says:
db.url=jdbc:postgresql://localhost:5432/${db.name}
I want to know how to access this database in the browser?
The default PostgreSQL client application is psql. If you can't install this or if you want to use a GUI client, the PostgreSQL community maintains a list of GUI clients.
Every client either asks you for credentials or will present you a form where you can enter them.
The JDBC URL from your question is
jdbc:postgresql://localhost:5432/${db.name}
My guess is that db.name is equal to alfresco. So the complete JDBC URL would be
jdbc:postgresql://localhost:5432/alfresco
If you have installed Alfresco only your local computer, this would be the JDBC URL to use with a client that uses JDBC. If you have installed Alfresco on a different computer, you would have to replace localhost with the host name of this computer.
To connect to alfresco data base you can use any Postgresql client, by the way, alfresco install pgAdmin client.
To use this client you shoud open {alfresco_install_directory}/postgresql/bin/pgAdmin3, add new server and type database credentials(host, port ...) from alfresco-global.properties.
Edit
This is an example of configuration, you can find all what you need in alfresco-global.properties.
In case you have made the default installation(postgresql), you cant.
If you have switched the database to mysql you could use something like php admin or similar. Hope it helps.

JUnit to connect to Oracle DB from Jenkins

I would like to connect to the actual physical database from JUnit, while it runs from Jenkins during maven build/test. I am using JBoss for writing JUnit. I don't want to store the DB connection string within the JUnit code/git/svn. I will rather externalize it either via a datasource and connect using JNDI in runtime or any other mechanism. Is there a way, I can use the datasource setup in Jenkins to connect to DB or Is there a better approach to achieve this? Basically, I want to hide the connection id/pwd for the developers as well, so they don't know/see.
You can use environment variables or system properties to provide configuration from Jenkins to a JUnit test. Read them in your test and use it to establish a connection to the DB.
But those will be readable ad the developers have access to the Jenkins job configuration.

Multiple DB support using JDBC

We are having an application which is already developed(Very OLD application,That time ORM was not in Market) and use Oracle as a database using JDBC. Now we are in situation where we have to connect different database like Postgres. We can not use ORM or such tool at this stage when application is completely developed. Is there any way so that we can provide multiple db support for our application using JDBC.
You can create multiple Datasource connections using the Apache commons DBCP package.
If you have a Spring Application you can easily have this configured in your spring application context.
http://javarevisited.blogspot.in/2012/06/jdbc-database-connection-pool-in-spring.html
Connection Pooling with Apache DBCP
Or you can have them defined as JNDI in your web server like JBOSS

Hawt.io prevents Jvisualvm to connect to the JVM

I am using Hawt.io to monitor my Apache Camel java app, but I have found that if I let it run I cannot use jvisualvm (and similar tools) to profile my app. It seems Hawt.io is using the connector that Camel exposes so jvisualvm cannot connect to the jvm.
What can I do to have Hawt.io and still be able to use jvisualvm?
Thank you!
Can JConsole connect to your JVM too?
Hawtio just connects to Jolokia on the server side; which just exposes JMX over HTTP/JSON; so the hawtio console doesn't itself change JMX in any way.
Incidentally are you using Local connector to connect from the hawtio web app into a separate JVM? Only that approach does add a jolokia agent dynamically to the JVM you are trying to connect to. If thats whats causing the issue - don't use it - and just configure your own Jolokia agent in your JVM?

Resources