SmartGWT idea where the realization of dynamic DataSource

sponsored links
The idea is to solve the problem when the Chinese title found. And thought, I will not do it myself

A DataSource definition. SmartGWT Lane, DataSource is the core of its metadata.

Here, DataSource actually two,

One is the client, this part is open source, you can freely create their own.

The other is server-side com.isomorphic.datasource.DataSource, this is inside the SmartGwtEE

Content, non-open source, but only in the Server-side use, not clients.

And I want to do dynamic DataSource, refers to the client to define a DataSource, where java classes can be used to describe the

Various Field, including the type or something. While in the service side, according to the client-defined DataSource automatically generate a service-side

DataSource, so can the need for a flexible definition, and all definitions are carried out through the java code, but also the

To compile-time checking, you can also bypass the issue of Chinese garbage.

Of course, now the Chinese garbage issue is resolved, this requirement becomes less urgent. The idea of recording what the future when the need arises again

To use this idea to achieve dynamic DataSource.

1. inside the definition of the default datasource repo:


2. MyDSRepo inherited from FileSystemDSRepo, this is actually SmartGWT default DSRepo

3. In the public DataSource loadDS (String dsName) methods among the judging is not dynamic DataSource,

If so, then according to the client DataSource Class whether there is change, to decide whether to generate a new ds.xml file,

And then to the super to load.

How to determine whether the client DataSource Class has changed, is a problem. Of course, may not generate ds.xml file, but this

DSRepo will not be able to use the cache mechanism. The specific implementation, such as when required to say, at present did not come across such a demand, but have to say,

SmartGwtEE or for the expansion has left a variety of mechanisms.
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of SmartGWT idea where the realization of dynamic DataSource

  • FLEX: integrating Spring + Hibernate

    Before a friend also wanted to study development of FLEX. Asked me to help him to be a small sample. Spent a weekend time, to integrate a sampleproject. Client: FLEX Server: Spring2.5 + Hibernate3.2 + Hibernate-annotations3.3.1 + MySQL5 FDS: BlazeDS3 IDE:

  • Hibernate pessimistic locking mechanism for locking and optimistic locking

    hibernate lock mechanism 1. Pessimistic lock It refers to the modification of data by outsiders hold a conservative attitude. The assumption that at any time access to data, may also have another client to access the same data, in order to maintain t ...

  • hibernate using c3p0 connection pooling

    Private c3p0 for open source's JDBC connection pool, with the release hibernate. This article describes how to use the hibernate configuration in c3p0. c3p0 connection pool configuration is v ...

  • Spring + Hibernate to use Glassfish Database Connection Pool

    applicationContext.xml file content <? xml version = "1.0" encoding = "UTF-8"?> <beans xmlns = " " xmlns: xsi = " " ...

  • Nan-Jing 5: When IBatis.Hibernate mixed affairs, pay attention to your SQL

    [Problem] Now, in the development of the so-called multi-storey JavaEE applications, data persistence layer is always essential, and "Automatic" of ORM - Hibernate, and "all-manual-type" of SqlMap - IBatis, equivalent data are Per ...

  • hibernate to use the principle of

    The use of hibernate, implementation of data persistence. Has the following several processes. One configuration database connection information. Hibernate.config 2 configuration mapping. 3 use: the use of the process are the following steps: 3.1: Ge ...

  • Based on JDBC, JPA Annotation achieve simple CRUD Generic Dao

    The origin of ideas are pretty long history of reasons: [Use iBATIS history] The use of iBATIS has been a long time, the system is to use the CRUD template tool to generate the code, although there are tools to generate, but looked at a lot of CRUD the Sq

  • The level Hibernate cache

    Hibernate cache level: (1) a cache is very short and the session life cycle consistent, also known as session-level cache-level cache or transaction-level cache (2) Ways of Supporting level cache: get (); load (); iterator (); only entity object cach ...

  • Hibernate's lazy strategy

    hibernate Lazy strategy can be used in: <class> tag, it can be true / false Tags can <PROPERTY> values true / false type of necessary tools to enhance <set> <list> can tag values true / false / extra <many-to-one> <on ...

blog comments powered by Disqus
Recent Entries
Tag Cloud
Random Entries