This one time, at band camp, tek1 said:

t>After struggling for what seems an eternity to get my web app working with
t>StatelessSessionBeans, which in turn call Castor via the CastorJDO in JNDI,
t>is CastorJDO the best approach in a J2EE app?
t>
t>In order to get everything working correctly, I had to put the:
t>
t>      1. entities.jar (POJOs that Castor uses) in server/default/lib,
t>      2. database.xml in server/default/conf, and
t>      3. mapping.xml in server/default/conf
t>      4. project-ejb.ear in server/default/deploy
t>      5. project-web.war in server/default/deploy
t>      ---
t>      6. castorJdoMBean.jar in server/default/lib
t>      7. castor-0.9.4.3.jar in server/default/lib
t>
t>
t>Is this how it should be done?
t>
t>I envisioned simply having only #4 and #5 (with #4 containing #1-3), and
t>dropping them in the server/default/deploy directory to run the application.
t>
t>Would a better approach be to just have #4 and #5, and within #4, have a
t>static class that looks up the JDO instance in JNDI, and if it doesn't
t>exist, create it and place it in JNDI (rather than have the CastorJDO MBean
t>do it)?
t>
t>This approach would seem to allow for better app management and deployment.
t>
t>Any advice from the Castor+JBoss experts out there?

I am in agreement with you that you should be able to just use #4
and #5in the list above. The castorJdoMbean.jar should probably be
the only thing that needs to reside in server/default/lib. I know
that JBoss is distributed with an older version of Castor in one
of the lib directories and that can just be removed. I may be wrong
(it's been a while since I've used JBoss/Castor), but I think that
the Castor jar can either be placed in the .ear/.war file or in
server/default/lib. Because you're using a .war and a .ear, it would
be a better idea to place it in server/default/lib because then
both archives can use it from there - no duplicate jars.

About the castorJdoMBean.jar, this is a JMX MBean that places the
Castor JDO instance in a JNDI ENC for you so that Castor is started
up with JBoss. IMO, I would use it rather than trying to worry about
putting the JDO instance in a JNDI ENC myself.

Bruce
--

perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to