4 Replies Latest reply on Sep 25, 2002 11:06 PM by solidboy

    jboss3.0 cmp problem

    solidboy Newbie

      1.I write an entity bean,it has some attributes, one is:
      public abstract String[] getAllNames();
      public abstract void setAllNames(String[] all);

      2.I deploy it as cmp entity bean

      3.after deploy,it create a table in Database(ms sqlserver2000)

      4.but ,when I insert some data
      on the jboss console, said that set parameters error in AllNames,jdbc doesn't surpport this type

        • 1. Re: jboss3.0 cmp problem
          Felipe Saint-Jean Newbie

          It is not so clear what want to do. do you want a table composet of one atribute named allnames?
          in that case you need to define the signature as
          public abstract String getAllNames();
          public abstract void setAllNames(String name);
          and the table would look like
          +----------
          | allnames
          +----------
          | aaa
          | bbb
          | ccc
          +----------

          after a few setAllNames .... I dont think is possible
          to set an array as type for the signature. You may later
          make a finder thar returns a java.util.Collection that
          gets all names.

          • 2. Re: jboss3.0 cmp problem
            Felipe Saint-Jean Newbie

            It is not so clear what want to do. do you want a table composet of one atribute named allnames?
            in that case you need to define the signature as
            public abstract String getAllNames();
            public abstract void setAllNames(String name);
            and the table would look like
            +----------
            | allnames
            +----------
            | aaa
            | bbb
            | ccc
            +----------

            after a few setAllNames .... I dont think is possible
            to set an array as type for the signature. You may later
            make a finder thar returns a java.util.Collection that
            gets all names.

            • 3. Re: jboss3.0 cmp problem
              Felipe Saint-Jean Newbie

              It is not so clear what want to do. do you want a table composet of one atribute named allnames?
              in that case you need to define the signature as
              public abstract String getAllNames();
              public abstract void setAllNames(String name);
              and the table would look like
              +----------
              | allnames
              +----------
              | aaa
              | bbb
              | ccc
              +----------

              after a few setAllNames .... I dont think is possible
              to set an array as type for the signature. You may later
              make a finder thar returns a java.util.Collection that
              gets all names.

              • 4. Re: jboss3.0 cmp problem
                solidboy Newbie

                what you said is not my meaning!!!

                I just want to store a String array .
                I test it with jboss2.4.4+tomcat3.2.3 ,it successed!!

                Maybe,its jaws for EJB2.0 has bugs(jboss 3.0.0),for EJB1.1 no problem.