datasource

smartgwt operationId not working

Hello all: How do operationIds work when calling a smartGWT fetch operation? I have the following simple Datasource, and below it the code that calls that datasource. However, the operationId is never acknowledged, and the first fetch operation is always executed... <DataSource ID="cartDS" serverType="sql" tableName="cart"> <fields> ...

Why can I run JUnit tests for my Spring project, but not a main method?

I am using JDBC to connect to MySQL for a small application. In order to test without altering the real database, I'm using HSQL in memory for JUnit tests. I'm using Spring for DI and DAOs. Here is how I'm configuring my HSQL DataSource <bean id="mockDataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource"> ...

Setting data source for reports in Crystal Reports 2008 Java (performance)

Hi, we have Crystal Reports 2008 on the Tomcat 5.5 server, and use the Java SDK to display reports and convert them to PDF. Since the server has its own database, we have to set the data source on the DatabaseController to make CR connect to this database. We do it like specified in the docs, and tried the functions in CRJavaHelper, bu...

Maintain Added List Item while binding from datasource

Hi, I have a drop down list, and I added some items in it as follows <asp:DropDownList ID="ddlInsAuther" runat="server" DataSourceID="ObjectDataSourceInsAuthers" DataTextField="AutherName" DataValueField="AutherID"> <asp:ListItem Value="-1">No Authers</asp:ListItem> </asp:DropDownList> ...

refering Tomcat JNDI datasource in persistence.xml

in server.xml I've defined global resource (I'm using Tomcat 6): <GlobalNamingResources> <Resource name="jdbc/myds" auth="Container" type="javax.sql.DataSource" maxActive="10" maxIdle="3" maxWait="10000" username="sa" password="" driverClassName="org.h2.Driver" url="jd...

Managing Many to Many relationships in asp.net Wizard Control

Say I have this entity with a lot of attributes. In the input form I have decided to implement a wizard control so I can collect information about this entity in several steps. The problem is that I need to collect information that has been modeled has many to many relationships. I am planning to use a telerik gridview to manage this (...

JdbcTemplate — logging the dataSource connection url

Hi, is there a way to log the JdbcTemplate's DataSource connection URL in Java? The field exists in the DataSource, but there ain't a getter to access it. Of course I could read the DataSource properties from the application context xml, but I'd like to do it the other way. ...

Flexible Data source for Multi-Section Table View Controller

I have a TableViewController which display a list of NewsItem objects: @interface NewsItem : NSObject { NSString *feedID; NSString *title; NSDate *published; } I'm trying to implement a Table View Controller (multiple sections) that can display the list in two ways: One divide News Items into sections which based on Pu...

MS Charts C# DataSource from array or List

i want to fill the data of the charts from values i have in 2D array, one column will present the X-axis and the second is present the Y-axis.. i did it, but its not reading from the array, it gives me the default line when i run the application, i found a solution using List<>, i had an error, so if any one could help me in this, i will...

Are multiple DAOs with jdbctemplate constructor injection a multi-threading risk?

I've got a large multi-threaded webapp in which I am passing in jdbcTemplates into DAO classes via constructor injection. Is this a multi-threading risk? Should I be passing in just the datasource instead? ...

Deploying two Grails apps on Tomcat ignores one DataSource

I have two applications each pointing to a different database. when I deploy these applications to Tomcat at the same time, whichever datasource gets loaded first is the same datasource that gets used for both apps. I am using the latest Tomcat and Grails. ...

javax.activation.DataSource size question

How do I get the amount of physical memory, consumed by the DataSource (specifically — ByteArrayDataSource)? I use javax.mail.util.ByteArrayDataSource (byte[] bytes, String type) constructor, where I get bytes like this: String str = "test"; byte[] bytes = str.getBytes(); Would that be str.length() in bytes? Any other ideas? ...

Use a folder of xml files as data source for nhibernate

I'm going to start writing NUnit tests for a few classes in my project. A certain number of these classes use data gathered through nhibernate from a sql server 2008 database. The part of the program I'm about to test is very specific (and complicated). Therefore I have made a folder of xml files. Combined, the xml files could result in...

one picker, multiple arrays for datasources - working fine but how ?

hi guys, I have a class with 4 arrays: tab_1,tab_2,tab_3 and tab_T. I set the picker's delegate and datasource to self (which is the class containing the arrays). The picker is called when textfields begin editing. I return NO in order to prevent the keyboard from being shown. I have a method animating the picker instead. Depending on...

Best JDBC data source bean class

I see that some people use org.apache.commons.dbcp.BasicDataSource while other configurations have com.mchange.v2.c3p0.ComboPooledDataSource. Spring has its own: org.springframework.jdbc.datasource.DriverManagerDataSource There are probably even more. But which one is best? I have a JPA/Hibernate three tier application that needs co...

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

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) i...

Custom DataSource Extender

I dream of creating a control which works something like this: <asp:SqlDataSource id="dsFoo" runat="server" ConnectionString="<%$ ConnectionStrings:conn %>" SelectCommandType="StoredProcedure" SelectCommand="cmd_foo"> </asp:SqlDataSource> <Custom:DataViewSource id="dvFoo" runat="server" ro...

Why or why not use a DataSource to fill ASP controls?

So we have a GridView asp control and one of my coworkers doesn't like to use an DataSource to fill the GridView. I wasn't sure if/what the pros and cons are of using one. I don't mind using going through the wizard to set the type, and the select/update methods. Besides using the wizard are there pros and cons? ...

What data should I use to create an autofill "destination" field like Facebook or the Trip Advisor search field

In order to create a “destination” auto filter input field on our website, I need a data source that provides a hierarchical data set of Region, Country, County/State, City and Town (plus an area like the Peak District National Park if at all possible) I know sites like Trip Advisor and Facebook seem to have very robust datasets for th...

UITableView in a View controller by a UIViewController and not a UITableView

Hi all, I have a View with lots of things inside it including buttons, a scroll view and a tableView (ipad app). I am controller this view with a viewController subclass but I don't know how to manage my tableView. I don't know where put the methods : - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexP...