1 Reply Latest reply on Mar 20, 2003 9:39 AM by Rafal Kedziorski

    caching question

    Rafal Kedziorski Novice

      hi,

      I have following problem.

      my client calls session facade for ceating a new user. this session facate check permissions and call other session bean which calls:

      - create new group
      - create new user
      - get permissions id's
      - add permission to user

      get permissions is read only entity bean:

      jboss.xml:


      <ejb-name>Acl_EntryBean</ejb-name>
      <local-jndi-name>access/Acl_EntryBean</local-jndi-name>
      <read-only>true</read-only>
      <configuration-name>Standard CMP 2.x EntityBean</configuration-name>



      jbosscmp-jdbc.xml:


      <ejb-name>Acl_EntryBean</ejb-name>
      <table-name>acl_entry</table-name>
      <cmp-field>
      <field-name>acl_entry_id</field-name>
      <read-only>true</read-only>
      <read-time-out>-1</read-time-out>
      <column-name>acl_entry_id</column-name>
      </cmp-field>
      ...



      ejb-jar.xml:


      <query-method>
      <method-name>findByAclNameAndPermissionName</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      <method-param>java.lang.String</method-param>
      </method-params>
      </query-method>
      <ejb-ql><![CDATA[SELECT OBJECT(o) FROM acl_entry o, acl a, permission p WHERE a.name = ?1 AND p.name = ?2 AND o.acl_id = a.acl_id AND o.permission_id = p.permission_id]]></ejb-ql>


      on each call the query will be sent to the db. why JBoss dasn't cache the data. in this table are about 10 entries.

      I'm working with JBoss 3.0.6 and CMP.


      Regards,
      Rafal