Women in Technology

Hear us Roar

  JBoss Optimizations 101
Subject:   How to utilize this with a session facade
Date:   2003-06-10 01:19:49
From:   anonymous2
Response to: How to utilize this with a session facade

Just a little follow-up-question:

Do I have to make new RO relations as well?

Suppose I have a PersonEJB with a CMR (recursive, if that matters) collection Children.

So I make another deployment of PersonEJB, called PersonEJBRW, with <read-only>false</read-only> markup for the getChildren method, in ejb-jar.xml. I just copy the <entity>-section for PersonEJB and changed <entity-name> and <display-name>. In addition new <containser-transaction> specs for all methods are added (or could I "inherit" those somehow from PersonEJB?)

I update jbosscmp-jdbc.xml so that both beans uses the same table, and I have a special entry for PersonEJBRW in jboss.xml specifying that all getters _except_ getChildren is <read-only>true</read-only>

I suppose I must make new CMR-relations as well in ejb-jar.xml?

So, basically, my question is; what have I forgotten here? I can't believe I've figured it out on the first try, that'd be very much unlike me :-)

Jon Martin Solaas

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • How to utilize this with a session facade
    2003-06-10 01:34:16  anonymous2 [View]

    Hi, it's me again :-)

    Believe it or not, I have even more questions.

    I somehow think the method outlined in my previous posting is a bit overwhelming. I'd have to update three xml-files and provide separate lookup code for different versions.

    Wouldn't it be easier to just provide two getters for the same relation, and just alter the client code slightly, ie. when I just want to display a list of children I'd just call getChildrenRO(), while I'd call getChildrenRW() when I want to add or delete children in the collection.

    Still I'd have to provide a separate relation in ejb-jar.xml, but the amount of xml-configuration would still be significantly lower, which I think is a good thing.

    I don't know if this would work, but I'd like to get a hint here, I guess I could dream up one crazy scheme for implementing this kind of optimization after the other, and it's just end up as a horrible mess.

    Jon Martin Solaas