Hi Matthias,

On Wednesday 26 November 2003 23:19, Matthias Bohlen wrote:
> BTW, the ejb cartridge generates a lot of Velocity error messages (see
> the attached log output). Richard, is there a way to optimize this?

As far as I can tell, these are all caused by checking or assigning things 
that are null. For example, the error message

  RHS of #set statement is null. Context will not be modified. 
  templates/EJBglobals.vm [line 70, column 1]

is caused by the following code:

#set ($myClass = $transform.getGeneralization($class.id))
#if ($myClass)
  ... set parent class from $myClass ...
#else
#set ($beanparentclass = 'java.lang.Object')
#end

I'd say it is possible to avoid most of the error messages (in the example 
above e.g. by not using the $myClass shortcut) but IMO that would make the 
template code still uglier and more unreadable as it already is.

On the upside, most of the code causing error messages is introducing 
shortcuts for lengthy expressions (usually calls to the transformer class) 
that may have null results. Most of these should go away when the EJB 
cartridge is changed to use the new decorators.

Bye,

Richard
-- 
Richard Kunze 

[ t]ivano Software, Bahnhofstr. 18, 63263 Neu-Isenburg
Tel.: +49 6102 80 99 07 - 0, Fax.: +49 6102 80 99 07 - 1
http://www.tivano.de

Attachment: pgp00000.pgp
Description: signature

Reply via email to