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.
Related
I have created connection manager within SSIS packages which has windows authentication and by default it is going to use my credentials to connect to a specific db.
I created project parameters that have connectionstring to dev, qa, prod.
and edited connection manager properties to give in expressions to use project parameters and automatically update package to use service account Userid and password.
But, my package has been defaulting to SQL server authentication and is failing when I am trying to connect to database.
Any help is much appreciated and would love to provide any necessary information.
If you're using Windows Authentication, make sure your connection string(s) use Integrated Security=SSPI;. Also make sure all your database connections you use in your various tasks are all also set to use Windows Authentication. You may need to use an expression to set their connection strings per environment as well.
I have two different servers. One of them includes Oracle db and Apex listener. I want to setup the Apex listener(ords) on a different server. So users cant reach db server directly. How can I configure this installation? Is there any way to do that?
That's actually the standard practise. Keep the ords on a separate application server.
On the application server you need the following.
Oracle JAVA
Application server (if not standalone). I.e. tomcat or glassfish
Port access to the database. I.e. 1521
If you have those you can set it up.
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.
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?
I created a web application through the NetBeans IDE running a glassfish server and a Java Database.
I want to now have this be standalone and run on the startup of my physical machine.
I am having trouble figuring out how to get the database set up on the server though.
On my server machine, I've got Glassfish running and I figured out where to put my war file so that it will run on the server. However I can't figure out how to get the database setup that the application needs to run.
I don't know if it has to do specifically with the glassfish server ?
Or do I need to have a separate database program along with the server ?
I believe glassfish comes with a JavaDB but i can't figure out how to actually create and configure a database. All I can do is create connection pools and resources...
According to Oracle's javadb page, it's an implementation of Apache Derby.
You should be able to download and run Derby directly on your machine. The connection strings may be different than what they were when using the embedded version, but once you figure that out it should work fine. Good luck!