datasource

Spring datasource configuration for localhost, development, and production

核能气质少年 提交于 2019-12-31 10:31:09
问题 I'm trying to figure out how my Spring app can determine where it is deployed and load the appropriate datasource. We have 3 environments...my local, the development server, and the production server. So far I have 3 properties files called localhost.datasource.properties development.datasource.properties production.datasource.properties I have them conifgured like this: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3

connection refused postgres docker

こ雲淡風輕ζ 提交于 2019-12-31 03:03:07
问题 I made a small application with spring-boot, spring jpa data, that connects to a dockerized postgres instace and it works pretty fine, even if I try to connect via 'psql' to the dockerized postgres instace it works well. The porblem is when I try to dockerize an image's instance of my spring-boot application and I try to link it with the dockerized postegres instance. The docker command I use is this docker run -it --link mypgcontainerwithpwd:postgres --name postgresclient1 sprinbootjpa As a

JasperReports collection as datasource?

时间秒杀一切 提交于 2019-12-30 11:31:50
问题 I'm trying to find out how to use a string collection as a datasource in JasperReports. I guess I found the solution, but I can't get this to work, can anyone assist me? set as datasource the special data source JREmptyDatasource( $F{my_collection}.size() ) This creates an empty data set with the same size of records as the collection. Pass the $F{my_collection} as parameter to the sub dataset (using the data set run of the List). To print the current element of the collection: $P{my

JasperReports collection as datasource?

房东的猫 提交于 2019-12-30 11:31:30
问题 I'm trying to find out how to use a string collection as a datasource in JasperReports. I guess I found the solution, but I can't get this to work, can anyone assist me? set as datasource the special data source JREmptyDatasource( $F{my_collection}.size() ) This creates an empty data set with the same size of records as the collection. Pass the $F{my_collection} as parameter to the sub dataset (using the data set run of the List). To print the current element of the collection: $P{my

MySQL Connector for Visual Studio 2012 Update 3

戏子无情 提交于 2019-12-30 09:37:48
问题 since I've installed mysql connector 6.7.4 and Update 3 for Visual Studio 2012 the MySQL Connector is gone away from the Connection Manager dialog. It was a working project, so the data source configuration is correct. But when I open my existing *.edmx file I get an error (see the picture below). I've tried to reinstall the connector with rebooting between each installation step, controlled the GAC but I cannot get the connector working back again. I believe it is related to the Update 3, as

Produce a `DataSource` object for Postgres JDBC, programmatically

徘徊边缘 提交于 2019-12-30 06:31:11
问题 The JDBC Tutorial recommends using a DataSource object to obtain database connections rather than using the DriverManager class. To quote the Connecting with DataSource Objects page: DataSource objects … the preferred means of getting a connection to a data source. How do I get such an object for a JDBC connection to Postgres? I have a JDBC driver in place. Right now, I do not want to fiddle around with JNDI like this or this. Can I instantiate a DataSource programmatically within my Java app

Does c3p0 connection pooling ensures max pool size?

放肆的年华 提交于 2019-12-30 04:45:09
问题 I've gone through several question, this is somewhat related but doesn't answer my question. Does the c3p0 connection pooling maxPoolSize ensures that the number of connections at a certain time never exceeds this limit? What if the maxPoolSize=5 and 10 users start using the app exactly at the same time? My app. configurations <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass"><value>${database.driverClassName}</value>

What is the best way to store data in c# application [closed]

ε祈祈猫儿з 提交于 2019-12-30 03:25:18
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I want to make Cookbook application for storing and reading (and updating) recipes, or anything else to practice OOP programming and thinking. But, I am not sure, what way of storing data, in this case, recipes, is the best in c# (Visual Studio Express). I want to optimize

Mocking DataSource for JdbcTemplate with Mockito

你。 提交于 2019-12-29 09:12:15
问题 I'm trying to test a class in a Spring project. I would like to make as many changes as possible in the test class vs. the dao class so that I don't have to retest all sorts things because of a change. The class I'm working with has a JdbcTemplate template class variable that is instantiated by the following: setJdbcTemplate(DataSource dataSource) { this.template = new JdbcTemplate(dataSource); } The method I would like to test makes a template.query(<code>) to run a defined SQL query and

Simple Application using JNDI and DataSource without Server, ServiceUnavailableException, ConnectException

醉酒当歌 提交于 2019-12-29 09:06:14
问题 I'm reading about JNDI and DataSource. https://www.journaldev.com/2509/java-datasource-jdbc-datasource-example https://www.journaldev.com/2513/tomcat-datasource-jndi-example-java https://www.baeldung.com/jndi Does it make sense to use JNDI without a server, e.g. Tomcat, JBoss, WAS? Is there some simple, standalone application that uses JNDI? I would like an example using both without a server. import java.rmi.Remote; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry;