actually, check the "best practices" link on the documentation for xdoclet1.2b1 (listed below), which caches the home object.
----
Add the cacheHomes="true" parameter to the <utilobject/> task to have the utility objects cache the homes (you no longer need an EJBHomeFactory):
<utilobject cacheHomes="true"/>
----
since homes holds a reference to the InitialContext, the InitialContext is only created once for each object class, so after the initial call for each object class, performance improves.
i believe that there was previous discussion about having to create the InitialContext each time or once per object class (as above) because caching a single InitialContext instance in a clustered environment would not work.
perhaps another attribute could be added to the "utilobject" subtask called 'cacheInitialContextForApp="true"', which would then allow the InitialContext to be created once and stored in a static class to be referenced by all the xxxUtil.getHome() class methods (in a non-clustered environment) to further improve performance...?
At 16:21 02/12/06 -0600, you wrote:
Greetings,
When calling an application server from client code, it is a common best practice to keep your connection to the application in a static context (it takes 3-10 seconds for each InitialContext generation, this limits the generation to one time for the entire client session). When XDoclet generates a Util Object, it doesn t follow this practice. It generates a new InitialContext every time a home or local interface is called. This works great on an Application Server (EJB to EJB or Web to EJB), but the performance from this method is very bad from a Client to AppServer paradigm.
So, my question, has this been addressed by the XDoclet Community? What is the recommended way to handle this?
Thanks,
Michael Hedgpeth
Software Development Consultant
Fair, Isaac & Company
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
