5 Replies Latest reply on Jul 16, 2002 1:24 PM by shaun

    BMP Examples?

      Hi,

      Does anyone know where I can get BMP examples that work with JBoss 3.0? I have tried the example in Mastering EJB by Roman et al but cannot get it to work.
      Thanks in advance,

      Shaun

        • 1. Re: BMP Examples?
          crypto

          What is the problem you are having in getting it to run ?

          /Werner

          • 2. Re: BMP Examples?

            From one of my previous posts
            [ http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ ] :

            When I deploy the BMPEntity example from Ed Roman's Mastering Enterprise Java Beans book I get the following warning:

            [15:27:28,187,ContainerFactory]
            Bean : Account
            Method : public abstract double getTotalBankValue() throws AccountException, RemoteException
            Section: 9.2.8
            Warning: Each method defined in the entity bean's home interface must be either create or finder method.

            Then when I run the example client I get:

            javax.naming.NameNotFoundException: AccountHome not bound ...

            The only changes I have made are to modify the run_client.bat and compile.bat so it sees all the *.jars

            Shaun

            • 3. Re: BMP Examples?
              joelvogt

              Well, namenotfound exception would be as it is not deploying properly.
              As for getTotalBankValue(), which attribute of Account are you trying to return?
              It should at least declare a FinderException I think.

              • 4. Re: BMP Examples?

                That's strange because the log file states:

                2002-07-11 16:58:29,203 INFO [org.jboss.deployment.MainDeployer] Successfully completed deployment of package: file:/C:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/account.jar

                and doesn't report any errors.

                As for the finderException yes, it is missing.

                Shaun

                • 5. Re: BMP Examples?

                  My server.log file gives:


                  2002-07-15 13:24:27,750 DEBUG [org.jboss.ejb.plugins.local.BaseLocalContainerInvoker] Bound EJBLocalHome of Account to local/Account
                  ...
                  2002-07-15 13:24:27,781 INFO [org.jboss.deployment.MainDeployer] Successfully completed deployment of package: file:/C:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/account.jar


                  for my simple ejb-jar.xml file:

                  <?xml version="1.0"?>

                  <ejb-jar>
                  <enterprise-beans>

                  <ejb-name>Account</ejb-name>
                  examples.AccountHome
                  examples.Account
                  <local-home>examples.AccountLocalHome</local-home>
                  examples.AccountLocal
                  <ejb-class>examples.AccountBean</ejb-class>
                  <persistence-type>Bean</persistence-type>
                  <prim-key-class>examples.AccountPK</prim-key-class>
                  False
                  <resource-ref>
                  <res-ref-name>jdbc/DefaultDS</res-ref-name>
                  <res-type>javax.sql.DataSource</res-type>
                  <res-auth>Container</res-auth>
                  </resource-ref>

                  </enterprise-beans>

                  <assembly-descriptor>
                  <container-transaction>

                  <ejb-name>Account</ejb-name>
                  <method-intf>Local</method-intf>
                  <method-name>*</method-name>


                  <ejb-name>Account</ejb-name>
                  <method-intf>Remote</method-intf>
                  <method-name>*</method-name>

                  <trans-attribute>Required</trans-attribute>
                  </container-transaction>
                  </assembly-descriptor>
                  </ejb-jar>


                  Is this default behaviour?
                  And why is my AccountHome not bound?

                  Thanks in advance,

                  Shaun