datasource

Grails GORM domain association across two datasources

不打扰是莪最后的温柔 提交于 2019-11-27 15:04:43
问题 Is it possible to have an association between two domain classes (i.e. belongsTo ) if the other domain class uses a different datasource? The two datasources are different database drivers too. I suspect this may not be possible, but I wanted to reach out to the community here to see if it was possible. Right now I'm trying to do it and I am getting the usual suspected Hibernate error: Invocation of init method failed; nested exception is org.hibernate.MappingException: An association from

Grails 2 multiple dynamic datasources in services

一世执手 提交于 2019-11-27 14:08:35
问题 I am working on a Grails application where I must access several datasources. The datasources are defined in the default database (ie. they are stored there and I must make a call to the default database to retrieve a list of the datasource names I must prepare to connect to). When the server boots up I retrieve the list of databases, create the datasource beans and inject them. All dynamically added databases are structurally identical (ie. have the same table and domain object structure).

What are the WCF Service Reference .datasource files?

懵懂的女人 提交于 2019-11-27 12:57:54
What are the .datasource files that are automatically generated by "Create Service Reference" in Visual Studio? The comment in the file is this: This file is automatically generated by Visual Studio .Net. It is used to store generic object data source configuration information. Renaming the file extension or editing the content of this file may cause the file to be unrecognizable by the program. However, it sounds like these files are optional, so I'm wondering what they are used for. I'm also wondering if it is truly safe to delete them, since they often cause path length problems on XP. http

Easy way to start a standalone JNDI server (and register some resources)

↘锁芯ラ 提交于 2019-11-27 12:31:49
问题 For testing purposes, I'm looking for a simple way to start a standalone JNDI server, and bind my javax.sql.DataSource to "java:/comp/env/jdbc/mydatasource" programmatically. The server should bind itself to some URL, for example: "java.naming.provider.url=jnp://localhost:1099" (doesn't have to be JNP), so that I can look up my datasource from another process. I don't care about which JNDI server implementation I'll have to use (but I don't want to start a full-blown JavaEE server). This

Multiple Combo Boxes With The Same Data Source (C#)

六眼飞鱼酱① 提交于 2019-11-27 12:04:57
问题 UPDATE: This is now resolved, see answer below. On one of my forms (in a Windows Forms application) I have 3 Combo Boxes. These combo boxes need to display a list of prices (In text, with an integer back-end value). All of these combo boxes are using the same data source (A List<> of type TSPrice, with ValueMember set to Price and DisplayMember set to Description). My problem is this... Everytime I choose a price option from one of the dropdowns, they ALL change to the same value... Is this

Separating Data Source to another class in Swift

血红的双手。 提交于 2019-11-27 11:48:50
问题 I'm trying to keep my view controllers clean as described in this article objc.io Issue #1 Lighter View Controllers. I tested this method in Objective-C and it works fine. I have a separate class which implements UITableViewDataSource methods. #import "TableDataSource.h" @interface TableDataSource() @property (nonatomic, strong) NSArray *items; @property (nonatomic, strong) NSString *cellIdentifier; @end @implementation TableDataSource - (id)initWithItems:(NSArray *)items cellIdentifier:

React-Native Updating List View DataSource

你离开我真会死。 提交于 2019-11-27 11:39:56
I have an iOS app I am making with react-native. The Game class contains a ListView component. I set the state in the constructor and include a dataSource . I have a hardcoded array of data for right now that I store in a different state property ( this.state.ds ). Then in the componentDidMount I use the cloneWithRows method to clone my this.state.ds as my dataSource for the view. That is pretty standard as far as ListViews go and is working well. Here is the code: /** * Sample React Native App * https://github.com/facebook/react-native */ 'use strict'; var React = require("react-native"); var

Should you set up database connection properties in server.xml or context.xml

浪子不回头ぞ 提交于 2019-11-27 10:11:24
I am trying to set up the database connection properties using JNDI for a Spring web application. I am considering two approaches as below: Approach 1: In your Spring configuration you may have something like: <jee:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/facs"/> Then in your webapp /META-INF/context.xml file you should have something similar too: <?xml version='1.0' encoding='utf-8'?> <!-- antiResourceLocking="true" --> <Context path="/podd-apn" reloadable="true" cachingAllowed="false" antiResourceLocking="true" > <Resource name="jdbc/facs" type="javax.sql.DataSource"

ERROR : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

会有一股神秘感。 提交于 2019-11-27 09:11:31
While connecting .net to sybase server I got this error message: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified This has worked properly before. System DSN with same details work and data connection through vs.net also work. I am using vs.net 2005. Any suggestions? If you're working with an x64 server, keep in mind that there are different ODBC settings for x86 and x64 applications. The "Data Sources (ODBC)" tool in the Administrative Tools list takes you to the x64 version. To view/edit the x86 ODBC settings, you'll need to run that version of the

jboss 7 oracle datasource configuration

梦想的初衷 提交于 2019-11-27 08:08:16
I'm currently migrating from jboss 4.3 to jboss 7.1.1 (Final) and i'm trying to configure an oracle datasource but it's not working. Following is what I've done to setup an oracle datasource 1)Downloaded ojdbc6-11.jar and placed it inside the folder $JBOSS_HOME/modules/com/oracle/ojdbc6/main 2)Created the file module.xml under $JBOSS_HOME/modules/com/oracle/ojdbc6/main and this is the content of the file <module xmlns="urn:jboss:module:1.0" name="com.oracle.ojdbc6"> <resources> <resource-root path="ojdbc6.jar"/> </resources> <dependencies> <module name="javax.api"/> </dependencies> </module> 3