datasource

smartgwt listgrid RestDataSource not populating

百般思念 提交于 2019-12-04 21:10:02
Im new using this front end framework application... I recently started to work with smartgwt and i'm bulding a new application with a Spring MVC integration. I'm using a ListGrid with a RestDataSource (Consume the Rest service with mvc:annotation-driven for plain JSON) I can see that the servaice gets consuming properly perhaps my grid is never shown with the data in it. Can someone help me here ? Here's my ListGrid class public class ListGrid extends com.smartgwt.client.widgets.grid.ListGrid { private final SpringJSONDataSource springJSONDataSource; public ListGrid(List<DataSourceField>

Grails: Getting the Data Source in a normal groovy class

十年热恋 提交于 2019-12-04 21:02:56
问题 How can I get access to the data source from within a normal groovy class? Injection doesn't work like it does with services. The reason for this is that I need to do some manual database calls (ie: SQL statements using the groovy.sql.Sql class) from the groovy class since I'm working with a legacy database. 回答1: dataSource is a bean which gets auto injected in services when used. All beans are auto wired in grails artifacts (controllers, services etc) by default. In your case you are using a

Cached connection manager in jboss/wildfly

一曲冷凌霜 提交于 2019-12-04 19:49:34
问题 I have defined a datasource for JBoss AS 7.4, with min/max pool sizes, tracing of idle connections etc. I am confused about the datasource use-ccm property. What does it do? Why use it? I thought the datasource itself manages the connection pool. 回答1: What does it do? It's just a useful debugging tool to detect connection leaks in manually managed transactions (BMT) by inspecting its logging. When turned on in debug mode, it will log all connections acquired and released by application code,

JBoss AS 5 database connection pool re-connect routine for MS SQL Server

耗尽温柔 提交于 2019-12-04 19:25:02
I'd like to come up with the best approach for re-connecting to MS SQL Server when connection from JBoss AS 5 to DB is lost temporarily. For Oracle, I found this SO question: "Is there any way to have the JBoss connection pool reconnect to Oracle when connections go bad?" which says it uses an Oracle specific ping routine and utilizes the valid-connection-checker-class-name property described in JBoss' Configuring Datasources Wiki . What I'd like to avoid is to have another SQL run every time a connection is pulled from the pool which is what the other property check-valid-connection-sql

How to set a role in DataSource from Spring

别说谁变了你拦得住时间么 提交于 2019-12-04 18:11:18
I have to use a default Role so that after the datasource has been defined and connected that role will allow me to use select statements. I know its little weird but I have to do it due to security concerns. So here is the code in my Spring's applicationContext.xml: <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.ibm.db2.jcc.DB2Driver" /> <property name="url" value="jdbc:db2://host_name:Port/DB_NAME:INFORMIXSERVER=SERVER_NAME;DELIMIDENT=y;" /> <property name="username" value="user" /> <property name=

jboss datasource statistics JMX monitoring - inconsistent information

99封情书 提交于 2019-12-04 17:40:06
I have defined two datasources in *-ds.xml on jboss 4.2.3 (redhat 4.3) Both datasources are identical. Only jndi-name differ Each defines min=max=10 <xa-datasource> <jndi-name>com.trax.hibernate.DataSource</jndi-name> <track-connection-by-tx>true</track-connection-by-tx> <isSameRM-override-value>false</isSameRM-override-value> <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class> <xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:orcl10</xa-datasource-property> <xa-datasource-property name="User"> xxxx </xa-datasource-property> <xa-datasource

ArgumentException when adding ComboBox column to DataGridView with same DataSource

岁酱吖の 提交于 2019-12-04 16:47:12
I have a DataGridView with custom columns. But when I add a " DataGridViewComboBoxColumn " and give to it a list of my model class as DataSource then I had the following error: System.ArgumentException: DataGridViewComboBoxCell value is not valid. New EDIT: 4/9/2009 "More Details" I've a class called SmsPart has these properties: public class SmsPart { public int ID public SmsPart Parent public string Name // and more } I've method called " GetSmsParts " return " List<SmsPart> ". I want the Parent column in the DataGridView to be ComboBoxColumn to select which part is the parent of selected

Bind Dropdownlist with optGroup from sql datasource

二次信任 提交于 2019-12-04 16:41:50
I have to bind a Dropdownlist with coutries which should be grouped by region, I have found a sample code from the following link, http://www.codeproject.com/KB/custom-controls/DropDownListOptionGroup.aspx?msg=3984074#xx3984074xx I wanted the country list same as this. But problem is that I want to bind the dropdownlist from sql result. I have tried the following but didn't work, ddlCountry.DataSource = CountryDtoCollection; ddlCountry.DataBind(); ddlCountry.Attributes.Add("OptionGroup", "Region"); any one knows any solution for this. you can write a custom server control and use the data

How to obtain JNDI data source for JPA/JTA DAO integration test?

别等时光非礼了梦想. 提交于 2019-12-04 16:06:58
I have a JPA application that has specified JTA transactions in persistence.xml. For whatever reason, I have found that when using JTA, you MUST specify a JNDI data source within persistence.xml as well. This is fine, unless you are trying to go integration testing outside a container and JNDI is not available. My questions are: a) is there anyway to inject a jdbc datasource into my JTA transaction manager? b) if not, how do a handle a JNDI lookup during integration testing? Edit: The error I get when firing up the integration test is: Caused by: org.springframework......

Spring boot preloading data from database in bean

吃可爱长大的小学妹 提交于 2019-12-04 15:21:04
I'm asking for elements that have a recursive relationship in one table: child id | parent id 1 | null 2 | 1 3 | 1 4 | 2 And so on...To ask for this whole datastructure it takes about 10 secondsAt the moment I can't redesign this table because it cost too much time (for more information: Spring Repository performance issues with recursive ORM Class ) Now, I am thinking about preloading all data during spring startup in a bean, so that the client "communicates" with the bean and I update the data in bean and database. I think it doesn't matter how long this startup takes, but it matters how