David,

Maybe you can give me a hand with this; the deployment code is very 
confusing to me.  I currently have the following phases in deployment:

1) create: create the entities and resolves relationships (each side 
checks to see of the other side exists yet, so the second one to deploy 
resolves the relationship).  Part of the is step is to determine the 
exact db mapping, which means checking the DB metadata for naming rules.

2) start:  create the tables in the DB and compile the queries. We have 
to wait to the start phase for this because the queries may refer to the 
tables of other entities, which are not guaranteed to exists until start.

This works great for most cases, but violates the basic MBean startup 
rules, because I access the DataSource in create.  I think the simplest 
way to fix this (simplest to understand) is to use a 3 phase startup as 
follows:

MBean.create() calls create:  create the entities does not resolve the 
relationships or setup exact table mapping

MBean.start() calls new method init:  resolves relationships (all other 
entities exist) and sets exact table mapping using datasource

MBean.start() calls start:  finally we create the tables and compile the 
queries

Still with me?

Ok here is where I need your help David.  Can you add another sub phase 
inside of the EJB module (application) create to init the entities?  If 
you can do that I'll refractor the code into 3 separate phases.

-dain


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - 
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to