[I've been experimenting with other than plain text lately because it allows
for doing things like formatting stack traces in italics and not having them
word wrapped at 80 characters.  Having a word-wrapped stack trace is about as
worthless to me as HTML for someone that doesn't have an HTML email reader, I
guess.  Apologies regardless...]

I've been wanting to expose the necessary objects for
JaasSecurityManagerServiceMBean to be able to work in a standalone Tomcat for
a couple of weeks now, and it's starting to make sense, but not entirely yet.
My experience so far has been w/ web & EJB, so this is a newbie question of
sorts.

Scott's suggested that I generate remoted proxies for the
AuthenticationManager and RealmMapping interfaces.  I see where those fit
just fine and could use them in the client once I can generate them.  To get
them, it seems like I have the option of getting them through an MBean or
publishing them through JNDI.  Here's what I've come up with in both cases:

* JNDI:  I tried binding the javax.naming.Context that is created in
JaasSecurityManagerService.startService() into the global JNDI space.  When I
try to use it, I'm able to look up the name in the context okay, but the
object factory instantiation gets called on the client instead of the server.
I'm guessing I'm not modifying the Reference properly such that JNDI calls
the server-side object factory instead of serializing the Reference and
sending it back, in which case the ObjectFactory on the client gets called,
which is wrong.  Using org.jnp.interfaces.NamingContext in the reference
didn't seem to make a difference, I'm interested in the distinction between
these two when making a reference.

* MBean:  I've also tried adding a method to JaasSecurityManagerService that
will return the correct SecurityDomainContext when given the Realm name.
Returning the SecurityDomainContext isn't sufficient, it needs to be at least
a remoted proxy.  But it seems that the remoted SecurityDomainContext would
have to be a factory in itself since it would then have to generate the
RealmMapping and AuthenticationManager remote proxies.  This doesn't smell
right either.  

I found the reference for
http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg23231.html,
and this code is also in the latest reference manual.  This tells me how to
be a client to an MBean, and I know how to create one that is used from
within the same JVM (using NonSerializableFactory).  I understand the basic
semantics behind References and ObjectFactories, but I have been unable to
find an example of a server that creates remoted proxies.  I suspect that I
am looking at the problem wrong though, missing things simple, subtle or
both.  

Any thoughts are appreciated!!

-b


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to