12 Replies Latest reply on Oct 23, 2002 1:12 PM by Willie Wheeler

    O'Reilly JBoss 3.0 Workbook

    Bill Burke Master

      Hello all,
      Sacha Labourey and I have written a companion workbook to O'Reilly's "EJB 3rd Edition" by Richard Monson-Haefel. It will be published sometime in October and we would really like some feedback! Please refrain from grammar and spelling mistakes, since our editor will handle these sort of things.

      To download a 1st draft of the workbook and corresponding examples, please go to:

      http://www.monson-haefel.com/titanbooks/jbos30worfor.html

      To use the book it is highly recommended that you also have a copy of EJB 3rd edition since the Workbook follows closely with the chapters of EJB 3rd edition. It can be purchased at:

      http://www.amazon.com/exec/obidos/tg/detail/-/0596002262/qid=1031070299/sr=1-1/ref=sr_1_1/002-1658527-7362441?v=glance&s=books

      Thanks,
      Bill Burke

        • 1. Re: O'Reilly JBoss 3.0 Workbook
          Chul-Woo Choi Newbie

          Hi,

          This is about "run.client_71a" target of the Workbook.
          A running of this target creates an entity bean with a specified primary key and writes the record to DB. The second run causes ...DuplicateKeyException... error as expected.

          But it seems the data that have been written to DB by running run.client_71a is lost when JBoss is shutdown.
          If you run "run.client_71a" again after having RE-started JBoss, you do NOT get ...DuplicateKeyException... message;
          i.e., the entity bean is created with no problem as if it had never been created.

          How come the data is lost when JBoss is shutdown?
          How could I keep the data even when JBoss is shutdown?

          Thank you very much for your explanations in advance:)
          (Also posted in this Forum on Sep. 16th)

          • 2. Re: O'Reilly JBoss 3.0 Workbook
            Chul-Woo Choi Newbie

            Hi,

            This is about "run.client_71a" target of the Workbook.
            A running of this target creates an entity bean with a specified primary key and writes the record to DB. The second run causes ...DuplicateKeyException... error as expected.

            But it seems the data that have been written to DB by running run.client_71a is lost when JBoss is shutdown.
            If you run "run.client_71a" again after having RE-started JBoss, you do NOT get ...DuplicateKeyException... message;
            i.e., the entity bean is created with no problem as if it had never been created.

            How come the data is lost when JBoss is shutdown?
            How could I keep the data even when JBoss is shutdown?

            Thank you very much for your explanations in advance:)
            (Also posted in this Forum on Sep. 16th)

            • 3. Re: O'Reilly JBoss 3.0 Workbook
              Chul-Woo Choi Newbie

              Hi,

              This is about "run.client_71a" target of the Workbook.
              A running of this target creates an entity bean with a specified primary key and writes the record to DB. The second run causes ...DuplicateKeyException... error as expected.

              But it seems the data that have been written to DB by running run.client_71a is lost when JBoss is shutdown.
              If you run "run.client_71a" again after having RE-started JBoss, you do NOT get ...DuplicateKeyException... message;
              i.e., the entity bean is created with no problem as if it had never been created.

              How come the data is lost when JBoss is shutdown?
              How could I keep the data even when JBoss is shutdown?

              Thank you very much for your explanations in advance:)
              (Also posted in this Forum on Sep. 16th)

              • 4. Re: O'Reilly JBoss 3.0 Workbook
                Chul-Woo Choi Newbie

                Hi,

                This is about "run.client_71a" target of the Workbook.
                A running of this target creates an entity bean with a specified primary key and writes the record to DB. The second run causes ...DuplicateKeyException... error as expected.

                But it seems the data that have been written to DB by running run.client_71a is lost when JBoss is shutdown.
                If you run "run.client_71a" again after having RE-started JBoss, you do NOT get ...DuplicateKeyException... message;
                i.e., the entity bean is created with no problem as if it had never been created.

                How come the data is lost when JBoss is shutdown?
                How could I keep the data even when JBoss is shutdown?

                Thank you very much for your explanations in advance:)
                (Also posted in this Forum on Sep. 16th)

                • 5. Re: O'Reilly JBoss 3.0 Workbook
                  Brian C. Parfitt Newbie

                  Bill,
                  I am a bit of a newbie and am using the 'EJB 3rd Edition' as well as your workbook as a primer to get my feet wet. I came across something that appears a little confusing in the text and example code.

                  On page 5 of the Chapter 4 examples section, you make mention of an ant task 'clean.db'. It appears just under the 'compile:' ejb-jar:' output sample at the top of the page. I tried executing this without success. After digging into the build.xml file, I do not see a task defined for 'clean.db'. I would think that this should be in the ../ex4_01/build.xml file, but maybe I am missing it and it is someplace else.... Could you clarify if this is in inconsistency?

                  I would like to be able to hack up these examples and be able to run them multiple times. However, I am struggling with HypersonicSQL trying to remove the data that was added. Thanks in advance!

                  Brian

                  • 6. Re: O'Reilly JBoss 3.0 Workbook
                    Edmund Mitchell Newbie

                    The link above is broken.
                    Also, at the www.monson-haefel.com website, there is a link to workbooks, which is also broken.

                    • 8. Re: O'Reilly JBoss 3.0 Workbook
                      Bill Burke Master

                      Sorry for the late response....

                      In jbosscmp-jdbc.xml you'll see the <remove-table> tag. This is what causes the table to be dropped on jboss shutdown. Turn off this flag, and it will hold data between shutdowns.

                      <jbosscmp-jdbc>


                      java:/DefaultDS
                      <datasource-mapping>Hypersonic SQL</datasource-mapping>
                      <create-table>true</create-table>
                      <remove-table>true</remove-table>

                      • 9. Re: O'Reilly JBoss 3.0 Workbook
                        Bill Burke Master

                        Sorry....

                        Add this to build.xml





                        *Please note*
                        JBoss must be shut down to run this target.

                        Bill


                        > Bill,
                        > I am a bit of a newbie and am using the 'EJB 3rd
                        > Edition' as well as your workbook as a primer to get
                        > my feet wet. I came across something that appears a
                        > little confusing in the text and example code.
                        >
                        > On page 5 of the Chapter 4 examples section, you make
                        > mention of an ant task 'clean.db'. It appears just
                        > under the 'compile:' ejb-jar:' output sample at the
                        > top of the page. I tried executing this without
                        > success. After digging into the build.xml file, I do
                        > not see a task defined for 'clean.db'. I would think
                        > that this should be in the ../ex4_01/build.xml file,
                        > but maybe I am missing it and it is someplace
                        > else.... Could you clarify if this is in
                        > inconsistency?
                        >
                        > I would like to be able to hack up these examples and
                        > be able to run them multiple times. However, I am
                        > struggling with HypersonicSQL trying to remove the
                        > data that was added. Thanks in advance!
                        >
                        > Brian

                        • 10. Re: O'Reilly JBoss 3.0 Workbook
                          Robert Christenson Newbie

                          Hello All,

                          Has anyone else had trouble printing the Beta pdf? My Acrobat reader has the Print button grayed out.

                          Thanks,

                          -Bob

                          • 11. Re: O'Reilly JBoss 3.0 Workbook
                            Andrew Boyd Novice

                            Your link didn't work for me. However this one did:
                            http://www.oreilly.com/catalog/entjbeans3/workbooks/index.html

                            then just scroll down to the JBoss section and select which one you want.

                            Cheers,

                            Andrew

                            • 12. Re: O'Reilly JBoss 3.0 Workbook
                              Willie Wheeler Newbie

                              Yeah, it's a nonprintable PDF. The idea is to whet your appetite, allow user testing, whatever, without removing the incentive to purchase. :-)

                              Willie