Hi, Hiram,

The technique you mentioned should generally works for
most MBeans. But for ConnectionFactoryLoader, it's a
little  different. The
org.jboss.resource.ConnectionFactoryLoader uses some
kind of a two step initialization. The connection
specified in your XML file is created and bound to
JNDI only if the jboss-jdbc.rar is fully deployed.

The init logic in ConnectionFactoryLoader looks like
this:

initService:

- register itself as a deployment notification
listener for the resource adapter (jboss-jdbc.rar)
[it's a little bit more abstract that this, but you
get the idea]

startService:

- if RARDeployer is present (it should because that's
an explicit depends tag in the xml file), ask
RARDeployer if jboss-jdbc.rar has been deployed.

- if YES, continue to load the connection factory and
perform all necessary initialization including JNDI
name registration.

- if NO, wait until it is notified (recall
"initService").

To our dependency checker (AutoDeployer),
ConnectionFactoryLoader is already deployed even if it
has not fully initialize its internal connection
factory.

So, the deploy process continues and a JNDI
NameNotFoundException is thrown when
jbossmq-service.xml is deployed.

I have traced thru the initialization steps in:

http://www.jboss.org/forums/thread.jsp?forum=51&thread=3359

It looks similar to this in this particular case (in
sequence)

1. deploy/lib/jboss-jdbc.rar (don't deploy... wait
until RARDeployer is deployed)
2. deploy/j2eedeployment-service.xml (now RARDeployer
is deployed)
3. deploy/postgres-service.xml (deploy
ConnectionFactoryLoader but cannot initialize its
internal connection factory)
4. deploy/jbossmq-service.xml (NameNotFoundException)
5. deploy/lib/jboss-jdbc.rar (now, the JDBC resource
adapter is deployed, RARDeployer fires deployment
notification event to ConnectionFactoryLoader's
listener. The listener initializes the internal
connection factory and performs JNDI registration but
it's too late for jbossmq-service.xml)

I think the problem can be fixed if we can re-visit
jboss-jdbc.rar once the RARDeployer is ready. That is,
moving Step 5 up to Step 3.

This is my investigation so far. I cc
jboss-development to see if someone has a better idea.
:) And I don't know which (jboss-dev or spydermq)
mailing list is more appropriate.

Charles


--- Hiram Chirino <[EMAIL PROTECTED]> wrote:
> 
> >The problem with JDBC is because the jboss-jdbc.rar
> is
> >deployed AFTER jbossmq-service.xml. So, when the
> >PersistenceManager starts up, it complains about
> >NameNotBoundException (JNDI exception).
> >
> >To workaround this problem, you can first move
> >jbossmq-service.xml out of the deploy directory.
> After
> >JBoss successfully starts up, you put the file back
> >into the deploy directory. The PersistenceManager
> >should then be deployed properly.
> 
> 
> To solve that problem, you might want to look into
> adding the a
> <depends> tag to the jbossmq-service.xml file so
> that it waits for the 
>
JBOSS-SYSTEM:service=ConnectionFactoryLoader,name=DefaultDS
> 
> I think this will delay jbossmq deployment until the
> DefaultDS is deployed.
> 
> It would be WAY cool if we could get the jbossmq
> JDBC PM to work with the 
> Hypersonic SQL database that is included with the
> default JBoss dist.  What 
> do you think??
> 
> Regards,
> Hiram
> 
> >
> >I am using PostgreSQL which uses some wierd
> settings
> >for Blob. Obviously, the JDBC PersistenceManager is
> >not ready for this... So I cannot test if the
> actual
> >functionality of the PersistenceManager.
> >
> >Since there doesn't seem to be a real demand for
> >PostgreSQL persistence on JMS, I will try to get
> >another DB and try it out.
> >
> >Charles
> >
> >--- Hiram Chirino <[EMAIL PROTECTED]> wrote:
> > >
> > > Cool..  I assume you have sourceforge ID.  Send
> it
> > > to me, I'll have Mark F.
> > > get you RW access to the CVS.
> > >
> > > I forgot what the dependency problem was with
> JDBC.
> > > Could you refresh me??
> > >
> > > Regards,
> > > Hiram
> > >
> > > >From: Charles Chan <[EMAIL PROTECTED]>
> > > >Reply-To: [EMAIL PROTECTED]
> > > >To: [EMAIL PROTECTED]
> > > >Date: Fri, 2 Nov 2001 08:26:21 -0800 (PST)
> > > >
> > > >Hi, Hiram, I think I have found a solution to
> the
> > > port
> > > >scanning problem:
> > > >
> > >
> >
>
>http://www.jboss.org/forums/thread.jsp?forum=48&thread=3269
> > > >
> > > >Please take a look.
> > > >
> > > >As for the JDBC problem, can we assume that the
> > > MBean
> > > >dependency will be handled by someone else?
> > > >
> > > >Charles
> > > >
> > >
> >__________________________________________________
> > > >Do You Yahoo!?
> > > >Find a job, post your resume.
> > > >http://careers.yahoo.com
> > >
> > >
> > >
>
>_________________________________________________________________
> > > Get your FREE download of MSN Explorer at
> > > http://explorer.msn.com/intl.asp
> > >
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Find a job, post your resume.
> >http://careers.yahoo.com
> 
> 
>
_________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp
> 


__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

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

Reply via email to