Yes, thats about it, except I changed quite a few files below that too.
I'm sorting them all out.
Thanks
david jencks
On 2001.11.14 19:32:29 -0500 Dain Sundstrom wrote:
> David,
>
> I've done some reasearch on ContainerFactory, and I think I have a
> solution.
>
> From the logs I've seen that you removed the app.init() method, which
> should
> be ok. All we need to do is add back an init method to the Container
> class,
> which I think is below the level you care about. Then we change
> Application.start() to:
>
> public void start() throws Exception
> {
> Iterator enum = containers.values().iterator();
> while(enum.hasNext())
> {
> Container con = (Container)enum.next();
> con.init();
> }
>
> enum = containers.values().iterator();
> while(enum.hasNext())
> {
> Container con = (Container)enum.next();
> con.start();
> }
> }
>
> This change would assume that you don't care if Conatiner has an init
> method.
>
> -dain
>
> > -----Original Message-----
> > From: David Jencks [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, November 14, 2001 5:28 PM
> > To: Dain Sundstrom
> > Cc: 'David Jencks'; Dain Sundstrom;
> > [EMAIL PROTECTED]
> > Subject: Re: [JBoss-dev] MBean init/start change broke CMR
> >
> >
> > Ok, the ejb-jar should still be one deployment unit. The init/start
> > shouldn't affect anything except mbeans in a *service.xml
> > file. Almost
> > certainly I broke something like ContainerFactory. Could you
> > send me your
> > test cases and I will see if I can figure this out?
> >
> >
> > Thanks
> > david jencks
> >
> > On 2001.11.14 18:12:36 -0500 Dain Sundstrom wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: David Jencks [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, November 14, 2001 4:58 PM
> > > > To: Dain Sundstrom
> > > > Cc: [EMAIL PROTECTED]
> > > > Subject: Re: [JBoss-dev] MBean init/start change broke CMR
> > > >
> > > >
> > > > On 2001.11.14 17:11:52 -0500 Dain Sundstrom wrote:
> > > > > Hi all,
> > > > >
> > > > > I think that the merging of init and start has broken the
> > > > CMR code. The
> > > > > CMR
> > > > > code depends on having a complete two-phase startup.
> > In the phase 1
> > > > > (init)
> > > > > all of the relation ships are connected, and in phase 2
> > > > (start) these
> > > > > relationships are used to create the entity tables with
> > > > fks, relation
> > > > > tables, and parse ejb-ql queries. I think that merging
> > the two has
> > > > > changed
> > > > > the system to call init and then start for each bean
> > > > instead of init for
> > > > > each bean and then start for each bean.
> > > >
> > > > This is correct.
> > >
> > > Yep, I added some code to verify the order. I am getting:
> > > ejb1.init();
> > > ejb1.start();
> > >
> > > ejb2.init();
> > > ejb2.start();
> > >
> > > ejb3.init();
> > > ejb3.start();
> > >
> > > ejb4.init();
> > > ejb4.start();
> > >
> > > > >
> > > > > I wasn't following the discussion about this, because I
> > > > didn't think it
> > > > > applied to the CMR code (and the messages were very long).
> > > >
> > > > The first one wasn't, asking if it would break anything.
> > >
> > > I know, but I thought the ejb-jar was one unit. So the
> > order wouldn't
> > > change.
> > >
> > > > I'm going to
> > > > > go
> > > > > back and read the messages, but if anyone has a suggestion
> > > > or can tell me
> > > > > the resolution, I would appreciate it.
> > > >
> > > > How can I tell if it is broken? Is there a test case?
> > >
> > > I know. There are test cases. I just haven't added them to
> > the source
> > > tree.
> > >
> > > > What are the "beans"
> > > > you mention, mbeans from a *service.xml or ejbs or generated
> > > > mbeans from
> > > > ContainerFactory or what? What is calling the init and
> > start? I might
> > > > simply have done something stupid in ContainerFactory.
> > >
> > > I am talking about ejbs. And the container init() and
> > start methods,
> > > which
> > > are passed through to my JDBCStoreManager class.
> > >
> > > > If the problem is due to unexpressed dependencies between
> > > > mbeans, generally
> > > > the solution is to explicitly state those dependencies using
> > > > mbean-ref and
> > > > mbean-ref-list elements.
> > >
> > > It is an expressed dependency between entities, but it is
> > expressed in
> > > the
> > > ejb-jar.xml file.
> > >
> > > > For instance, if you have mbeans A and B that registered with
> > > > C on init,
> > > > and C did something with A and B in its start, put a
> > > > mbean-ref-list element
> > > > in C containing A and B's object names: in C's start, first
> > > > iterate through
> > > > the list, calling the new registerWithC(C) method (formerly
> > > > init()), and
> > > > then the previous start code.
> > >
> > > I don't have that level of control all the way down at the
> > StoreManager.
> > >
> > > > I'm happy to help with fixing this if you can give me some
> > > > clues about what
> > > > is going on and where.
> > > >
> > > > Thanks
> > > > david jencks
> > >
> > > I still putting all the pieces together my self.
> > >
> > > The way my code works is in the init each entity creates a
> > set of objects
> > > that represent the cmp-fields, cmr-fields, and queries for
> > that entity.
> > > As
> > > each cmr-field is created it checks to see if the related entity's
> > > cmr-field
> > > has been created. If it has not been created, it does
> > nothing. If it
> > > has
> > > then it creates a reference to the related cmr-field
> > object, and gives a
> > > reference to the related entity. Only at the end of the
> > init phase is it
> > > guaranteed that all relationships are full setup.
> > >
> > > In the start phase, tables are created for each entity,
> > that may contain
> > > fks
> > > for the related entity, or an additional table is created for the
> > > relationship. In this phase the ejb-ql is cross compiled
> > to SQL, and
> > > this
> > > process requires that any referenced relationships be fully
> > connected.
> > >
> > > Hope that helps.
> > >
> > > -dain
> > >
> > >
> >
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
>
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development