Read-mostly Pattern & EJB-QL question when using Weblogic 8.1 - Weblogic

This is a discussion on Read-mostly Pattern & EJB-QL question when using Weblogic 8.1 - Weblogic ; I want to use the same implementation of an CMP entity bean for the read-mostly pattern in BEA Weblogic 8.1 (means for the reader and the writer class). Therefore my ejb-jar.xml contains the following statements: : MyBeanReadOnly mypackage.MyBeanLocalHome : MyBean ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Read-mostly Pattern & EJB-QL question when using Weblogic 8.1

  1. Read-mostly Pattern & EJB-QL question when using Weblogic 8.1


    I want to use the same implementation of an CMP entity bean for the
    read-mostly pattern in BEA Weblogic 8.1 (means for the reader and the
    writer class).

    Therefore my ejb-jar.xml contains the following statements:
    :
    MyBeanReadOnly
    mypackage.MyBeanLocalHome
    :
    MyBean
    mypackage.MyBeanLocalHome
    :

    The weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml have the proper
    changes.

    I can deploy this bean & for the corresponding session bean binding
    and calling methods works for the (virtual) read-only and read-write
    entity beans.


    When we are using Xdoclet and ejb.finder methods e.g.
    @ejb.finder
    signature="java.util.Collection findAllValid(java.util.Date date)"
    result-type-mapping="Local"
    query="SELECT DISTINCT OBJECT(u) FROM MYTABLE AS u
    WHERE (?1 >= u.validFrom) AND ((u.validUntil IS NULL)
    OR (?1 <= u.validUntil))"
    the compilation and packaging runs well (as usual).

    During the deploy to Weblogic 8.1 we get errors, because the
    implementation of MyBeanReadOnly's findAllValid(...) should return
    objects of type MyBeanReadOnly instead of MyBean.

    Is there a way to solve this problem
    - and not write seperate reader and writer classes like
    the Weblogic 5.1 sample implementation?
    - and not use the CMP optimistic locking?

    Thanks for any further information.
    Wolfgang

  2. Re: Read-mostly Pattern & EJB-QL question when using Weblogic 8.1

    Hi.

    Can you post the error message that you are getting?

    Seth

    "Wolfgang Lugmayr" wrote in message
    news:3f71b03d$1@newsgroups.bea.com...
    >
    > I want to use the same implementation of an CMP entity bean for the
    > read-mostly pattern in BEA Weblogic 8.1 (means for the reader and the
    > writer class).
    >
    > Therefore my ejb-jar.xml contains the following statements:
    > :
    > MyBeanReadOnly
    > mypackage.MyBeanLocalHome
    > :
    > MyBean
    > mypackage.MyBeanLocalHome
    > :
    >
    > The weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml have the proper
    > changes.
    >
    > I can deploy this bean & for the corresponding session bean binding
    > and calling methods works for the (virtual) read-only and read-write
    > entity beans.
    >
    >
    > When we are using Xdoclet and ejb.finder methods e.g.
    > @ejb.finder
    > signature="java.util.Collection findAllValid(java.util.Date date)"
    > result-type-mapping="Local"
    > query="SELECT DISTINCT OBJECT(u) FROM MYTABLE AS u
    > WHERE (?1 >= u.validFrom) AND ((u.validUntil IS NULL)
    > OR (?1 <= u.validUntil))"
    > the compilation and packaging runs well (as usual).
    >
    > During the deploy to Weblogic 8.1 we get errors, because the
    > implementation of MyBeanReadOnly's findAllValid(...) should return
    > objects of type MyBeanReadOnly instead of MyBean.
    >
    > Is there a way to solve this problem
    > - and not write seperate reader and writer classes like
    > the Weblogic 5.1 sample implementation?
    > - and not use the CMP optimistic locking?
    >
    > Thanks for any further information.
    > Wolfgang




+ Reply to Thread