osdir.com
mailing list archive

Subject: RE: HSQLDB & Velocity Loader (was ALE) - msg#00260

List: jakarta.velocity.user

Date: Prev Next Index Thread: Prev Next Index
I have been using HSQLDB quite a bit lately for local development.

Has anyone implemented (and have examples) of a template loader that
uses HSQLDB?

The Docs for the DataResourceLoader say it requires j2ee.jar... why is
that, seems scary.

----
DataSourceResourceLoader : This loader will load resources from a
DataSource such as a database. This loader is not built as part of the
standard build as it requires J2EE support. To build this loader, please
download the J2EE distribution, move the j2ee.jar into the build/lib
directory, and then build the new velocity jar with the jar-j2ee build
target. For more information on this loader, please see the javadoc for
the class
org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader.
--

-Timo


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Velocity and JSF UI

Hi, I have not played around with velocity (I am still a new bie). I would be interested to know how would velocity fit in with the JSF UI component (with all the new tags that JSF is introducing). Thanks Shishir -----Original Message----- From: Will Glass-Husain [mailto:wglass@xxxxxxxxx] Sent: Friday, January 23, 2004 1:46 PM To: Velocity Users List Subject: Re: Active Learning Environment (Velocity/Java/XML) Hi Brad, We have an app ( broadcast.forio.com ) that similarly has a number of accounts for which different users upload Velocity pages. (like your app, accounts are distinguished by pathinfo from the url). We stuck with a single VelocityEngine for performance reasons, with a few customizations. A few issues that may be parallel First, I was concerned about #include and #parse, so we implemented a customized event handler (patch in Bugzilla) to restrict users to only be able to include files within their own account. (it's a little more complex, as we also have a system-wide set of includeable files). Second, there's some (solvable) security-related issues to consider if you are allowing untrusted users to upload templates. [1] Third, database initialization in our system done via a singleton wrapper class that sets an application-wide boolean flag to indicate the database status. (with appropriate synchronization, of course). Actually, our apps use the Hibernate object persistance library. Putting O/R objects in the Velocity context is an easy way to make data available to template writers. I hadn't thought about the macro issue, but (assuming you wanted to go with a single VelocityEngine) remember that users can always define macros within a file that is pulled in with #parse throughout the pages. Best, WILL P.S. Is availability of MySQL really an issue? My impression is that it's standard on most Linux systems, and installable with an "EXE" installer on Windows. [1] http://nagoya.apache.org/wiki/apachewiki.cgi?BuildingSecureWebApplicatio ns ----- Original Message ----- From: "Brad Cox" <bcox@xxxxxxxxxxxxxxxxx> To: "Tim Colson" <tcolson@xxxxxxxxx>; "'Velocity Users List'" <velocity-user@xxxxxxxxxxxxxxxxxx> Sent: Friday, January 23, 2004 10:06 AM Subject: RE: Active Learning Environment (Velocity/Java/XML) > Thanks for the support, and the interest. Guess I better brush up on > my mind-reading skills. ;) > > And please do send in those (constructive) comments and suggestions. > The main problem is not sure how to provide for a foolproof, > seamless, no configuration install. Considering switching to > berkeley db instead of mysql for this reason alone. TBD. Suggestions > most welcome. > > PS: The main snag is that each course should have its own velocity > engine for course-specific macros and a connection to its very own > database. The ale servlet should handle multiple courses, > distinguished via pathinfo from the url. Possible, I know, but messy > to think through. When/how to trigger automatic database > initialization is also an issue. I'm working on it. ;) > > At 10:41 AM -0700 1/23/04, Tim Colson wrote: > >Brad - > > > >Will wrote: > >> Thanks for posting this, found it interesting. Always > >> interested to hear about other Velocity apps (especially related to > >e-learning). > >> I'll download it and take a look, maybe send back some thoughts in a > >> personal email. > > > >Ditto. :-) > >Timo > > -- > Brad J. Cox, PhD, 703 361 4751, http://virtualschool.edu > http://virtualschool/ale Action Learning Environment > http://virtualschool.edu/mybank Digital Rights Management System > http://virtualschool.edu/jco Java Cryptographic Objects (JCO) > http://virtualschool.edu/jwaa Java Web Application Architecture (JWAA) > http://virtualschool.edu/java+ Java Preprocessor (Java+) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: velocity-user-unsubscribe@xxxxxxxxxxxxxxxxxx > For additional commands, e-mail: velocity-user-help@xxxxxxxxxxxxxxxxxx > --------------------------------------------------------------------- To unsubscribe, e-mail: velocity-user-unsubscribe@xxxxxxxxxxxxxxxxxx For additional commands, e-mail: velocity-user-help@xxxxxxxxxxxxxxxxxx

Next Message by Date: click to view message preview

Re: HSQLDB & Velocity Loader (was ALE)

Hi, In JDBC 2.0 this was really the "Optional Extension" for JDBC (with server-side libraries). jdbc2_0-stdext.jar see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9020 http://java.sun.com/products/jdbc/articles/package2.html downloadable here: http://java.sun.com/products/jdbc/download.html But in JDK 1.4 this is part of J2SE. WILL ----- Original Message ----- From: "Tim Colson" <tcolson@xxxxxxxxx> To: "'Velocity Users List'" <velocity-user@xxxxxxxxxxxxxxxxxx>; "'Will Glass-Husain'" <wglass@xxxxxxxxx> Sent: Friday, January 23, 2004 11:43 AM Subject: RE: HSQLDB & Velocity Loader (was ALE) > I have been using HSQLDB quite a bit lately for local development. > > Has anyone implemented (and have examples) of a template loader that > uses HSQLDB? > > The Docs for the DataResourceLoader say it requires j2ee.jar... why is > that, seems scary. > > ---- > DataSourceResourceLoader : This loader will load resources from a > DataSource such as a database. This loader is not built as part of the > standard build as it requires J2EE support. To build this loader, please > download the J2EE distribution, move the j2ee.jar into the build/lib > directory, and then build the new velocity jar with the jar-j2ee build > target. For more information on this loader, please see the javadoc for > the class > org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader. > -- > > -Timo >

Previous Message by Thread: click to view message preview

Re: Active Learning Environment (Velocity/Java/XML)

At 10:46 AM -0800 1/23/04, Will Glass-Husain wrote: We have an app ( broadcast.forio.com ) that similarly has a number of accounts for which different users upload Velocity pages. (like your app, accounts are distinguished by pathinfo from the url). We stuck with a single VelocityEngine for performance reasons, with a few customizations. A few issues that may be parallel Is there a performance issue with multiple ones? I'm using one engine per course and one servlet shared by all courses. That didn't seem excessive but haven't studied it deeply. First, I was concerned about #include and #parse, so we implemented a customized event handler (patch in Bugzilla) to restrict users to only be able to include files within their own account. (it's a little more complex, as we also have a system-wide set of includeable files). I'm assuming (only) faculty do this, by modifying xml/macro files directly. That seems safe enough for now. Will rethink security if I ever provide a web interface. Second, there's some (solvable) security-related issues to consider if you are allowing untrusted users to upload templates. [1] I'm not (now). Third, database initialization in our system done via a singleton wrapper class that sets an application-wide boolean flag to indicate the database status. (with appropriate synchronization, of course). Actually, our apps use the Hibernate object persistance library. Putting O/R objects in the Velocity context is an easy way to make data available to template writers. I'm passing plain 'ol beans. Legacy habit. P.S. Is availability of MySQL really an issue? My impression is that it's standard on most Linux systems, and installable with an "EXE" installer on Windows. That's why its TBD. I want to completely encapsulate (hide) the dbms in the server app anyway, and the BDB arguments seemed compelling at the time. Dislike relational DBMS anyway. Looking forward to returning to the object-oriented style I used with the perl version. Looking for any excuse I suppose. Its a big boring job to convert all my beans and the mysql version is working, so I might punt on the whole thing and stay there. -- Brad J. Cox, PhD, 703 361 4751, http://virtualschool.edu http://virtualschool/ale Action Learning Environment http://virtualschool.edu/mybank Digital Rights Management System http://virtualschool.edu/jco Java Cryptographic Objects (JCO) http://virtualschool.edu/jwaa Java Web Application Architecture (JWAA) http://virtualschool.edu/java+ Java Preprocessor (Java+)

Next Message by Thread: click to view message preview

Re: HSQLDB & Velocity Loader (was ALE)

Hi, In JDBC 2.0 this was really the "Optional Extension" for JDBC (with server-side libraries). jdbc2_0-stdext.jar see http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9020 http://java.sun.com/products/jdbc/articles/package2.html downloadable here: http://java.sun.com/products/jdbc/download.html But in JDK 1.4 this is part of J2SE. WILL ----- Original Message ----- From: "Tim Colson" <tcolson@xxxxxxxxx> To: "'Velocity Users List'" <velocity-user@xxxxxxxxxxxxxxxxxx>; "'Will Glass-Husain'" <wglass@xxxxxxxxx> Sent: Friday, January 23, 2004 11:43 AM Subject: RE: HSQLDB & Velocity Loader (was ALE) > I have been using HSQLDB quite a bit lately for local development. > > Has anyone implemented (and have examples) of a template loader that > uses HSQLDB? > > The Docs for the DataResourceLoader say it requires j2ee.jar... why is > that, seems scary. > > ---- > DataSourceResourceLoader : This loader will load resources from a > DataSource such as a database. This loader is not built as part of the > standard build as it requires J2EE support. To build this loader, please > download the J2EE distribution, move the j2ee.jar into the build/lib > directory, and then build the new velocity jar with the jar-j2ee build > target. For more information on this loader, please see the javadoc for > the class > org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader. > -- > > -Timo >
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by