I haven't used the XDoclet guid generator, but the tyrex GUID class is much faster than using a database sequence - I would put the main reason as being the absence of network calls involved.
Of course it makes debugging a right pain, but it is nice to be able to generate an id on the client. cheers dim ----- Original Message ----- From: "tek1" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, November 29, 2002 3:29 AM Subject: [Xdoclet-user] xdoclet xxxUtil.generateGUID() vs. sequence bean? > i recently read brett mclaughlin's "building java enterprise applications" > and in chapter 5 (advanced entities), he talks about using a sequence > (stateless session) bean for generating/managing entity id. in xdoclet, i > see that each xxxUtil class contains a very convenient generateGUID() > method, which returns a 32-bit string that can be used to generate an > entity's id. > > i'm trying to decide which approach to use, and wondering what people from > the field have to say about the +/- of both approaches, including performance. > > also, regarding the generateGUID(), it appears as though the logic is not > specific to a particular entity, so is it necessary to include the statis > generateGUID() method in each entity's xxxUtil class? can it be placed in > a single, non-ejb class? it probably won't affect performance (much), but > it would eliminate repeating the same code in numerous entities. just > wondering the reason for each xxxUtil class having its own generateGUID() method? > > thank you. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Get the new Palm Tungsten T > handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > _______________________________________________ > Xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user > ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
