Hi all,
I'm going to implement a new module which main goal is to provide an easy interface to external resources / sources like DBMS, Webservices, XLS files (CSV), R/W access...

For now I've managed to connect JNDI resources and with a little of configuration I have made available to JSP pages Collections of beans, with cache control. Beans are the output of a ResultSet transformation.

<io:externalContent
  sourceType="db/jndi"
  var="resultSet"
  sourceName="myLocalDB"
  isToCache="true"
  cacheKey="testCK">
SELECT * FROM myTable
</io:getContent>

<c:forEach items="resultSet">
   ...
</c:forEach>

I would like to have a common interface object instad of custom JavaBeans to let ResultSet coming from different sources be available to as many client I need.

I've thought to Content.
But the problem is that Content is an Interface, so not instantiable.

The question is: is reasonable to try to instantiate a Content even thought it is not stored on JCR? A Collection<Content> can be really cross-module return type of a generic ResultSet transformer, used for instance inside a forEach loop.

To clarify: i want to be able to replace

<io:externalContent
  sourceType="db/jndi"
  var="resultSet"
  sourceName="myLocalDB"
  isToCache="true"
  cacheKey="testCK">
SELECT * FROM myTable
</io:getContent>

with:

<io:externalContent
  sourceType="soap"
  var="resultSet"
  sourceName="externalWs"
  isToCache="true"
  cacheKey="testCK" />
</io:getContent>

without changing the following <c:forEach> loop.

Otherwise I think that I need to think about another solution...

Thanks for your suggestions
matteo


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to