That is no excuse.  The exceptional case is the MBeanServer is having 
issues.  So to quote you "get off your fat ass".  This code is 
confusing, and just plane wrong.  Fix it.

-dain

Andreas Schaefer wrote:
> Hi Dain
> 
> When you call queryNames() on a MBeanServer you have to catch
> (JMX) exceptions anyway. Whenever you call create/destroy on
> a JSR-77 instance then we assume that the server is available otherwise
> it is an exception (no server rep. when JBoss server is running).
> 
> Have fun - Andy
> 
> ----- Original Message ----- 
> From: "Dain Sundstrom" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, August 16, 2002 2:45 PM
> Subject: Re: [JBoss-dev] JCAConnectionFactory undeployment bug and patch
> 
> 
> 
>>Alex Loubyansky wrote:
>>
>>>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 );
>>>}
>>
>>Who wrote this code?  Use isEmpty()!
>>
>>EXCEPTIONS ARE FOR EXCEPTIONAL CASES
>>
>>-dain
>>
>>
>>
>>-------------------------------------------------------
>>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


-- 
xxxxxxxxxxxxxxxxxxxxxxxx
Dain Sundstrom
Chief Architect JBossCMP
JBoss Group, LLC
xxxxxxxxxxxxxxxxxxxxxxxx



-------------------------------------------------------
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