commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <>
Subject RE: commons-concoct - new project proposal
Date Thu, 01 Dec 2005 01:01:47 GMT
The HiveMind library already supports something like this.  Maybe we could
lean on that work also.  The prefixes are associated with object providers
which know how to translate a "locator string" (the rest of the expression)
into an object.

-----Original Message-----
From: Giorgio Gallo [] 
Sent: Wednesday, November 30, 2005 6:13 PM
To: Commons Developer
Subject: commons-concoct - new project proposal

I've been working on a library I aim to contribute to the commons
bazaar (as a standalone lib or maybe as part of commons-transform), but:

- I'm not sure mine is a good idea for a commons library
- I'm not a commons committer
- The lib still needs work (it is a prototype right now)

The library, which is named Concoct for now, should come handy in
configuration files (that is, I think so :).

Its purpose is to parse URI-like strings (anything in the form
"somescheme:somestring") into java objects according to a
scheme-specific syntax (which is straightforward in most cases): for now
it can only handle strings like

-> new Integer(189)

-> new String("foo")

-> null

-> oracle.jdbc.driver.OracleDriver.class

and convert expressions like

into an instance of MyClass, with attributes set as specified.

Plans are to add many other "schemes", eg:
- "jdbc:" to produce Connections
- "jdbc-datasource:" to produce DataSources (via commons-dbcp)
- "singleton:" to return the same Object if the expression is evaluated
more than once
- "proxy:" to build a dynamic proxy
- "file:","http:","ftp:" to read the specified url into a
- "deserialize:" to read an object from an URL
- ...

The idea is to enable the combination of different schemes in
expressions (such as in the "bean:" scheme example - above).

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message