Gordon,

> In the 2.2d6 release in the TransformerFactoryImpl, there is still a check
> for the "transletPool" system property.  I am now confused on whether this
> is in use or not.  I am using it to make sure that all my translets end up
> in the same directory (so the can be picked up in the classpath, although
> this does not seem to work for me).  Should the "transletPool" continue to
> be used, and if not should one just use the "setDestDirectory()" method to
> place the translets in the correct place?

Use the transletPool property with 2.2d6. The very latest code does not
contain this property. This will be the case with all coming releases.

> In the response below, you say that the translet object is not written to a
> disk, yet that, I thought, was half the point of using translets.  Compile
> once, use over and over.  On a web based applications, keeping multiple
> translets in memory is not always practical, and the overhead of reloading
> the stylesheets all the time can consume a lot of resources.  You also state
> that the user need not be concerned with the classnames.  Could you expain
> how this is so?  Is the template supposed to abstract the translet out to
> such a degree that you don't even know you are using it?

The Templates object is used to represent the translet class. When you call
TransformerFactory.getTemplates() you get a Templates object that contains
the translet class definition (and all auxiliary classes). Note that these
are classes were talking about and not objects. The classes are represented
by byte-arrays that can be loaded by the JVM's native class loader. When
you create Transformer objects from the Templates we simply invoke the class
loader to familiarize the JVM with the translet class(es) and instanciate a
new instance of the class.

The Templates implementation is serializable, thus making it possible for
the application to cache translets anywhere!

Morten

Reply via email to