2 Replies Latest reply on Mar 28, 2002 9:57 AM by shailesh_dangi

    CMP and Hierarchical queries

    shailesh_dangi

      Before I begin, I would like to mention that I had absolutely no problems downloading/configuring JBoss 3.0 with Tomcat 4.0 using a database resource (Oracle) at the back-end. I also have written my first BMP entity bean which works just fine.

      The query is basically hiearchical as shown below:

      select ftb_tab_id from fwk_tabs start with ftb_tab_id and org_id = ? connect by prior
      ftb_parent_id = ftb_tab_id and
      org_id = ? order by ftb_level asc

      Q1. Can this be done CMP 2.0/JBoss/Jaws?
      Q2. If I use BMP, is there any thing as Entity Cache as I seem to hit the DB everytime even if the entity state hasn't changed. Is there some thing I can configure?

      Thanks for your time guys.

        • 1. Re: CMP and Hierarchical queries
          earlgrey

          > Q1. Can this be done CMP 2.0/JBoss/Jaws?
          i´m not familiar with cmp 2.0

          > Q2. If I use BMP, is there any thing as Entity Cache
          > as I seem to hit the DB everytime even if the entity
          > state hasn't changed. Is there some thing I can
          > configure?

          hmm, with commit-option A, you should not hit the db twice. the entity cache works for bmp entities as well. did you consider
          a) only findByPrimaryKey() returns instances from cache
          b) the instances do not expire (tune container config/cache settings)?

          lars

          • 2. Re: CMP and Hierarchical queries
            shailesh_dangi

            Using custom finders with CMP, it is possible to frame an hierarchical query. Please contact if you need more info at shailesh_dangi@yahoo.com