velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ganesh" <>
Subject RE: Velocity in EJB Container
Date Tue, 21 Oct 2003 12:05:30 GMT

On Monday, October 20, 2003, at 08:32 AM, Ganesh wrote:

> Hi,
> I am trying to use Velocity inside an EJB Container. There are 
> programming restriction of EJB 1.1 spec (section 18.1.2), as given
> below
> in using the File System.
> "An enterprise bean must not use the package to attempt to 
> access files and directories in the file system.
> The file system APIs are not well-suited for business components to 
> access data. Business components should use a resource manager API,
> such
> as JDBC API, to store data. "
> In this scenario,which is best resource loader for Velocity to be 
> used? Will the selected resource loader, provide the caching facility
> well?
> Please let me know if there any know issues of using Velocity inside
> EJB container. Apart from the fact that I can see some 'synchronized'
> keywords being used in the velocity source code.

I think the best resource loader is the webapp resource loader, if you  
are in the servlet part of the container, or the classpath resource  

<G>I am using Velocity in the EJB container only, may be I should use
classpath resource loader for making the EJB portable. Thanks for the

What's the problem with synchronization?

<G> In the Programming restriction section of EJB 1.1 spec(section
18.1.2), it is mentioned that any kind of synchronization should not
used so that the container can manage the threads. Though this
restriction are provided, I could get velocity working in EJB as well,
but this doesn't solve my problem as I am not compliant to the spec. 
" An enterprise Bean must not use thread synchronization primitives to
synchronize execution of multiple instances.
Same reason as above. Synchronization would not work if the EJB
Container distributed enterprise bean's instances across multiple JVMs.
> Regards,
> Ganesh

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


Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.


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

View raw message