|
Home > Archive > EAserver > February 2006 > InitialContext question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
InitialContext question
|
|
| Peter Abbott 2006-02-13, 7:24 am |
| hi
we have an issue with an InitialContext lookup. We are getting lookup
failures between two beans with LWC turned on at the server but turned
off for all the beans used in the transaction we are having the issue
with. I have narrowed down the problem that if we use "new
InitialContext()" to do the lookup it fails, but if we add the
INITIAL_CONTEXT_FACT
ORY property it doesnt fail.
We have 3 beans that are called within the transaction and when the
first two are called the naming context used is
com.sybase.ejb.NamingContext but by the time the last is called it
changes to com.sybase.naming.server.NamingContext
Anybody have any ideas why the server NamingContext be used instead?
Pete
| |
| Jonathan Baker [Sybase] 2006-02-13, 9:24 am |
| Why did you turn of LWC for these beans? I have a feeling you are
running in to an architectural issue... but I can't pin it down until I
know how the application server is set up.
Jonathan
Peter Abbott wrote:
> hi
>
> we have an issue with an InitialContext lookup. We are getting lookup
> failures between two beans with LWC turned on at the server but turned
> off for all the beans used in the transaction we are having the issue
> with. I have narrowed down the problem that if we use "new
> InitialContext()" to do the lookup it fails, but if we add the
> INITIAL_CONTEXT_FACT
ORY property it doesnt fail.
> We have 3 beans that are called within the transaction and when the
> first two are called the naming context used is
> com.sybase.ejb.NamingContext but by the time the last is called it
> changes to com.sybase.naming.server.NamingContext
>
> Anybody have any ideas why the server NamingContext be used instead?
>
> Pete
| |
| Peter Abbott 2006-02-13, 8:25 pm |
| hi
We have turned on LWC at the server level to allow some of the
application on the server to take advantage of it, although it was a bit
of a headache getting there. The application in questions in fact does
not have any LWC turned on because it is not in a state to use LWC.
The error that I mentioned yesterday about the
com.sybase.naming.server.NamingContext, I dont think that is the actual
issue. After much debugging and using breakpoints, it turns out that the
default initial context when in the webcontainer returns
com.sybase.ejb.NamingContext version and once inside the ejb container
it com.sybase.naming.server.NamingContext. There is some caching going
on somewhere (verified by Evan a couple of months ago after a site
visit), but we are still trying to track down exactly what the problem
is in order to replicate the problem for support. It is only in the last
couple of days we have figured out specifying the property
INTIAL_CONTEXT_FACTO
RY make the problem go away, it would just be good
for once actually finding out why instead of just accepting that a work
around fix the problem :-)
The exception that is going on is after a user changes their password
they and other users are unable to access certain entity beans because
it throws a security exception. To fix it we have to either restart the
server or get the user to change their password back.
The work around to fix this can be one of the following,
- Turn off LWC at the server level
- Set the initial context property INITIAL_CONTEXT_FACT
ORY
com.sybase.ejb. InitialContextFactor
y
- Tell users not to change their password :-)
Pete
Jonathan Baker [Sybase] wrote:[color=darkred
]
> Why did you turn of LWC for these beans? I have a feeling you are
> running in to an architectural issue... but I can't pin it down until I
> know how the application server is set up.
>
>
> Jonathan
>
>
> Peter Abbott wrote:
>
|
|
|
|
|