Hello Andreas,

to my pity, I don't have it now and, probably, will see it next time on Monday.
But the only thing I changed is the way to construct search criteria in
JCAConnectionFactory.destroy(...) method. Please, look at the original post for
the details.
You're right I just added two properties J2EEServer=Local and JCAResource=JCA.
And it started to work.
I noted one more thing. The original query (without the changes) was executed
twice. ( At least I saw it twice in the log ) Probably, from another code
source.
It's still not clear for me too. I'll try to dig further.

Thank you for the comments.

alex


On Fri, 16 Aug 2002 20:05:22 -0700
 "Andreas Schaefer" <[EMAIL PROTECTED]> wrote:
> Hi Alex
> 
> Can you send me your changed JCAConnectionFactory because
> what you write doesn't make sense for me (except adding new
> parameters there is no differences AFAI see).
> 
> Thanx - Andy
> 
> ----- Original Message -----
> From: "Alex Loubyansky" <[EMAIL PROTECTED]>
> To: "JBoss-Dev" <[EMAIL PROTECTED]>
> Sent: Friday, August 16, 2002 12:54 PM
> Subject: [JBoss-dev] JCAConnectionFactory undeployment bug and patch
> 
> 
> > Hello guys,
> >
> > there is a bug in JCAConnectionFactory undeployment (I guess in all
> > 3.0 branches). Here are the details (I played with MySQL). When it is
> created the
> > J2EEManagedObject is created with a name like:
> >
> J2EEServer=Local,JCAResource=JCA,j2eeType=JCAConnectionFactory,name=MySqlDS-
> LocalTxCM
> >
> > But when it is undeployed, this object isn't removed and remains
> > registered. Thus redeployment will fail.
> >
> > The JCAConnectionFactory.destroy() method searches with criteria:
> > J2EEManagedObject.getDomainName() + ":" +
> > J2EEManagedObject.TYPE + "=" + JCAConnectionFactory.J2EE_TYPE + "," +
> > "name=" + pName + "," +
> > "*"
> > which results in
> >
> jboss.management.local:j2eeType=JCAConnectionFactory,name=MySqlDS-LocalTxCM,
> *
> >
> > Id it correct? I am still not good at it but it doesn't work.
> >
> > I changed the criteria to:
> > ObjectName lServer = null;
> > try {
> >    lServer = (ObjectName) pServer.queryNames(
> >       new ObjectName(
> >          J2EEManagedObject.getDomainName() + ":" +
> >          J2EEManagedObject.TYPE + "=" + J2EEServer.J2EE_TYPE + "," +
> >          "*"
> >       ),
> >       null
> >    ).iterator().next();
> > }
> > catch( Exception e ) {
> >    lLog.error( "Could not locate JSR-77 Server: " + pName, e );
> > }
> >
> > ObjectName lJCAResource = null;
> > try {
> >    // Check if the JCA Resource exists and if not create one
> >    Set lNames = pServer.queryNames(
> >       new ObjectName(
> >          J2EEManagedObject.getDomainName() + ":" +
> >          J2EEManagedObject.TYPE + "=" + JCAResource.J2EE_TYPE + "," +
> >          "*"
> >       ),
> >       null
> >    );
> >    if( lNames.isEmpty() ) {
> >       // Now create the JCA resource
> >       lJCAResource = JCAResource.create( pServer, "JCA" );
> >    } else {
> >       lJCAResource = (ObjectName) lNames.iterator().next();
> >    }
> > }
> > catch( Exception e ) {
> >    lLog.error( "Could not create JSR-77 JCA resource", e );
> > }
> >
> > String searchCriteria =
> >    J2EEManagedObject.getDomainName() + ":" +
> >    J2EEServer.J2EE_TYPE + "=" +
> >    lServer.getKeyProperty( "name" ) + "," +
> >    JCAResource.J2EE_TYPE + "=" +
> >    lJCAResource.getKeyProperty( "name" ) + "," +
> >    J2EEManagedObject.TYPE + "=" + JCAConnectionFactory.J2EE_TYPE + "," +
> >    "name=" + pName + "," +
> >    "*";
> >
> > This criteria is:
> >
> J2EEServer=Local,JCAResource=JCA,j2eeType=JCAConnectionFactory,name=MySqlDS-
> LocalTxCM,*
> >
> > And it works. I guess it's a weird way. Please, comment it.
> >
> > TIA!
> >
> > --
> > Best regards,
> >  Alex Loubyansky
> >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by: OSDN - Tired of that same old
> > cell phone?  Get a new here for FREE!
> > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> > _______________________________________________
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> >
> >
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development

~
Alex Loubyansky
----
http://mobila.net.ua
???


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to