datasource

Sending datasource information only when UIView has been laid out?

大城市里の小女人 提交于 2020-01-06 06:34:16
问题 I am having trouble understanding this. I have been able to do such a project earlier on but now a similar approach isn't working for me. Here is the issue: I have a UIPageViewController that has 4 storyViewControllers . Each storyViewControllers has a custom containerView . I want to add 'n' number of UIViews on the containerView . I am sending the dataSource or 'n' from the view controller. However, I am not able to correctly lay out the subviews on the container view. Essentially I want to

Java, Spring : Create a separate datasource bean throws NonUnique error

对着背影说爱祢 提交于 2020-01-06 06:28:52
问题 I am working on a Spring-MVC application in which as of now we had a single data source. For our requirements, where most of the transactions are either short lived, we do have applications which rarely require very long time to process. To avoid the system being choked up because of those requests, we are planning to create a separate data source. Other than that, those methods will have a lower priority, as user knows these will take a longer time. For that, I am simply calling Thread

How to get data from another data base in runtime

霸气de小男生 提交于 2020-01-06 04:35:12
问题 I need an optimal way to change Database in run-time, whether from hibernate or from JNDI or another. I need to change the database when a user clicks on a specific button (Change dependencies on events). 回答1: If you are running Grails 1.3.x you can to use the Burt Beckwith's Datasources plugin, in Grails 2.x that feature has been added to core. Then you can to use a parameter to pass database connection name def database = params.database if(!database) database = "default" and to use Groovy

iMacros concatenating strings from datasource

我们两清 提交于 2020-01-05 08:28:14
问题 In the below iMacros how can I set a variable value and then concatenate it? VERSION BUILD=8530828 RECORDER=FX TAB T=1 SET !ERRORIGNORE YES SET !DATASOURCE allsource.CSV SET !TIMEOUT 1 SET !VAR! = My<SP>Content<SP>Here. TAG POS=1 TYPE=TEXTAREA FORM=ID:pst-main ATTR=ID:description CONTENT={{!COL1}} How can the SET !VAR1 = MyContentHere. work? Please correct my syntax. And, how can I concatenate COL1 and VAR1 the below way didn't work TAG POS=1 TYPE=TEXTAREA FORM=ID:pst-main ATTR=ID:description

WSO2 AS JDNI lookup

谁说我不能喝 提交于 2020-01-05 05:50:53
问题 In WSO2 AS 5.0.1 I deploy a webapp which should use a datasource. I can configure the datasource in tomcat-server.xml or any other place in the WAR, but is it possible to use a datasource that is configured in the Carbon Management Console through JNDI? Steps taken: Configure datasource in Management Console, export it as JNDI as jdbc/platform ResourceLink in META-INF/context.xml to link the global resource: < ResourceLink name="jdbc/platform" global="jdbc/platform" type="javax.sql.DataSource

Automated deployment of DSS datasource configuration

谁说胖子不能爱 提交于 2020-01-05 03:36:16
问题 We have a "mavenized" project with several containers (wso2esb, wso2dss, tomcat) and many components to deploy to them. We are trying to find a way to deploy the datasource configuration for all our DSS services but I notice it is stored in its own DB (H2). Do you know if there is any way to declare something like a XML file in order to create the datasource in the DSS in an automated way? I tried to see the documentation but did not find anything useful for automatic deployment (meaning

Issue creating DbContext connection with LINQPad using Entity Framework 6.0 code first

时间秒杀一切 提交于 2020-01-04 15:29:19
问题 I'm using LINQPad v4.51.03 and attempting to create a DbContext connection from a code-first implementation in Entity Framework 6.0 (6.1.1). public partial class MyEntities : DbContext { public MyEntities() : base("mydbname") { ... The connection string looks like: <add name="mydbname" connectionString="Data Source=<db>;initial catalog=<cat>;integrated security=True;multipleactiveresultsets=True;application name=EntityFramework" providerName="System.Data.EntityClient" /> In the LINQPad 'Add

Cannot call JNDI resource in persistence.xml file

空扰寡人 提交于 2020-01-04 11:44:28
问题 Although it seems many users faced the same problem, I have to post my own issue, taking in account that for now, no suggestion from those already present worked for me. Or maybe am I missing something? Here is my persistence.xml file (located uner resources/META-INF/ directory, in a maven project): <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/

Spring RoutingDataSource validationQuery is not being injected

◇◆丶佛笑我妖孽 提交于 2020-01-04 06:07:45
问题 I'm using RoutingDataSource to dynamically create datasources for each tenant of our application. After 8 - 12 hours application application losts connection with database and I'm getting jpa transaction exception. I found that the following properties are responsible for validation and sustaining database connection so I placed them in my application.properties. spring.datasource.initialize=false spring.datasource.test-while-idle=true spring.datasource.test-on-borrow=true spring.datasource

Grails datasource becoming null in Service

眉间皱痕 提交于 2020-01-04 04:39:22
问题 I am using Grails 2.2.1, and I have a custom dataSource injected into the service so that I can execute some SQL queries. Upon first execution, there is a dataSource, but on each subsequent call, the reference to the dataSource has become null. class ReportService { def dataSource_myds Object[] reportRecords(int a) { String query = "SELECT ..." Object[] resultSet; Sql sql = new Sql(dataSource_myds) // ^ Here the NullPointerException is thrown // But it always works at the first execution sql