Date: 2004-06-24T09:21:33
   Editor: 200.69.248.193 <>
   Wiki: Jakarta HiveMind Wiki
   Page: FrequentlyAskedQuestions
   URL: http://wiki.apache.org/jakarta-hivemind/FrequentlyAskedQuestions

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -11,3 +11,8 @@
 '''Question:''' '''["UsingJNDIToObtainHiveMindServices"]''' (DanielFeist 
24/06/2004)  
 
 I have been experimenting with the use of JNDI as a facade to !HiveMind by 
implementing a simple JNDI SPI.  The ''lookup'' method of a JNDI ''Context'' 
takes just a ''Name'', yet to obtain a !HiveMind service i need to be able to 
specifiy the interface expected.  What i have found is that i can, in place of 
the interface expected put {{{Object.class}}} and everything works ok.  
''Object'' is not an interface so i'm not quite sure why this works.  Is this 
intentional?  Will !HiveMind continue to support this?
+
+'''Accepted Answer:'''
+
+HowardLewisShip: Yes, passing {{{Object.class}} will continue work although 
but it is not recommended in ''normal'' cirmcumstaces.  The idea of passing in 
the expected (assignable) type is to allow HiveMind to do a check that the 
service object or proxy returned is assignable. Better a good message from 
inside HiveMind than a bad ClassCastException. Using java.lang.Object is 
acceptible if you don't care about that test. 
+

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to