Hi Jeff,

Most of us were at ApacheCon until yesterday night and more or less off the radar.

Anyway, having a mutable JNDI context for local clients isn't a bad idea. It'd be something we could add to LocalInitialContextFactory but probably not something we'd add to the RemoteInitialContextFactory. With the LocalInitialContextFactory, it's your memory you are chewing on, so have at it. With the RemoteInitialContextFactory, you would be chewing on the server's memory and bandwidth.

I mention the RemoteInitialContextFactory as essentially the Local and the Remote InitialContextFactories are functionally equivalent from the client's perspective more or less and one can be swapped out for another. Something to consider.

An idea could be to make a new InitialContextFactory that wraps a Local or Remote InitialContextFactory and provides binding ability that is not distributed and only present on the client using the InitialContext. It would just delegate to the Local or Remote InitialContextFactory if the binding isn't found in it's list of entries. The thing to consider there is that you could potentially "overwrite" a binding in the Local or Remote InitialContextFactory.

Alright, so that's an initial brain dump on the feature. No real conclusion. How do you imagine the feature you need working? Some sort of use case on how it helps your testing would be great to make sure we are actually solving the problem. Also, any interest in helping to work on it?


Thanks,
David


On Dec 15, 2005, at 3:02 PM, Jeff Ramsdale wrote:

Hmmm...

Not having received an answer to this question, let me ask another. Is
it possible to use a different JNDI implementation than the one used
in OpenEJB? That is, there's no special magic in its JNDI
implementation that OpenEJB depends upon, is there? Do other
implementations allow for programatic bindings? I wouldn't have
thought this to be an unusual thing to try to do in a unit-testing
world? Set me straight, please, if I'm going about this wrong!

Thanks,

Jeff

________________________________

From: Jeff Ramsdale [mailto:[EMAIL PROTECTED]
Sent: Tue 12/13/2005 5:04 PM
To: [email protected]
Subject: [openejb-user] Modifiable context?



When running in embedded mode for purposes of unit testing I'd like to
be able to programatically add bindings to my context. Is this
possible? I'm running into OperationNotSupportedExceptions because I'm
receiving a ReadOnlyContext using LocalInitialContextFactory.

Thanks,

Jeff



Reply via email to