Weblogic Session Management in a Cluster
As per web logic documentation here
http://e-docs.bea.com/wls/docs81/cluster/failover.html
There is best practice to "Control Frame Access to Session Data".
Control Frame Access to Session Data
If you are designing a Web application that utilizes multiple frames, keep in mind that there is no synchronization of requests made by frames in a given frameset. For example, it is possible for multiple frames in a frameset to create multiple sessions on behalf of the client application, even though the client should logically create only a single session.
In a clustered environment, poor coordination of frame requests can cause unexpected application behavior. For example, multiple frame requests can "reset" the application's association with a clustered instance, because the proxy plug-in treats each request independently. It is also possible for an application to corrupt session data by modifying the same session attribute via multiple frames in a frameset.
To avoid unexpected application behavior, carefully plan how you access session data with frames. You can apply one of the following general rules to avoid common problems:
In a given frameset, ensure that only one frame creates and modifies session data.
Always create the session in a frame of the first frameset your application uses (for example, create the session in the first HTML page that is visited). After the session has been created, access the session data only in framesets other than the first frameset.
Can anyone help with the code snippet for the same ..
I'm not overly familar with Weblogic clustering, but I assume it is similar in concept to OC4J clustering. The thing that you need to be aware of is that any object stored in HttpSession needs to be completely serializable. The LibrarySession that you create/obtain for a user cannot be serialized. Thus you need to come up with a technique that allows a user to obtain the same librarysession instance from whatever store it may be across multiple requests.
CM SDK, Files, Content Services typically achieve high availability through use of multiple midtiers with Big IP in front. Our out-of-box applications do not make use of OC4J clustering.
thanks,
matt.
Similar Messages
-
Coherence integration with oracle weblogic portal for Session management
Could you please let me know how to configure coherence integration with oracle weblogic portal for Session management. Its very urgent. please help.
Please take a look at the following web page -
http://coherence.oracle.com/display/COH35UG/Coherence*Web+Session+Management+Module
-Luk -
WebLogic interrupts in two box cluster
News group: weblogic.developer.interest.clustering
Subject: WebLogic interrupts in two box cluster
Hi,
We have a production environment configured as a single cluster of four WebLogic
servers using the Apache Proxy plugin. Two of the servers are located here and
two are located across town (primary and backup) on Sun e10K boxes.
In our testing environment we have a single cluster of two WebLogic servers running
on a single box.
For some reason when we are running in the production environment processing just
stops (for about 33 seconds but sometimes over 2 minutes) and causes JTA timeouts.
I have observed this during the create() of a stateless session bean, but I have
been "told" that it happens randomly. This has NEVER happend in the test environment.
Some of the session EJB create() methods are calling 4 other EJBs. I know that
JNDI look ups are costly (average between 320ms and 550ms) but that doesn't get
us to 33 seconds.
Now for the constraints:
We are not allowed to have an initial pool of EJBs (don't ask).
We are not allowed to have local interfaces on the EJBs (don't ask).
I am not allowed to see the source code (don't ask) to find out if a UserTransaction
has been set.
Some questions:
If a UserTransaction has not been set, will WebLogic ALWAYS create the the other
EJBs that the stateless session bean calls on the same server (collocated) instance
or will they go across the wire to the next available server (because of the remote
interfaces and the home objects having the load balancing logic)? (Note: the
EJB descriptor may have transaction delineation defined on the EJBs participating
in the transaction and the configuration we are using only provides round robin
load balancing).
Will the home objects requested by the session bean be created on the server the
code is currently running (collocated) on or will any server with the distributed
JNDI tree be allowed to provide the home object?
If the above could happen, then paragraph 2 on page 4-10 of "Understanding Object
Clustering" (Bea WebLogic Server 6.0) might come in to play where we have remote
replicas adding to network overhead for the duration of the transaction. Since
the processors on all the boxes appear to be more or less idle and there is loads
of RAM available... Also I was "told" this only happens under load (100 simultaneous
hits).
Could we be falling into a convoying condition? Does the whole cluster stop when
this condition happens or does just the single instance stop? If we have one
server participating in the same transaction as another server would that stop
the whole cluster? If we have 4 EJBs and load balancing decides all servers are
participating in the same transaction (round robin on 4 servers gets all of them
in the game), would that stop the whole cluster while data I/O flows across the
wire?
When an initial instance of an EJB is created (initial pool size), does the entire
cluster get informed or does each server independantly manage its own pool? What
about EJB instances when replica-aware EJBObject stubs are used. Documentation
states that the stub is free to route any call to any server that hosts the bean,
could this also bring more than one server into the same transaction?
Other groups are looking into HTTP Session replication as a possible cause...
Thanks for any thoughts,
Ian
Some results:
The script directly targeted a single weblogic instance within the OT cluster,
presumably taking the Alteon switch and (perhaps? probably?) the clustering out
of the equation.
The test was the bro regle script with 1 concurrent user (same test run in OT
on October 14 overnight). The results below show weblogic.transaction.internal.TimedOutException
caught by this application.
2003-10-15 17:35:52,859
2003-10-15 18:02:00,433
2003-10-15 18:27:42,110
2003-10-15 19:02:22,767
2003-10-15 19:28:05,193
2003-10-15 20:28:28,584
2003-10-15 21:03:07,879
2003-10-15 21:28:50,622
2003-10-15 22:03:29,683
2003-10-15 22:28:51,065
these timeouts are falling roughly 25 minutes apart.
Does this help at all?
Ian
"Ian Douglas" <[email protected]> wrote:
>
>Thanks,
>
>Will do.
>
>This may be OS related as we have found, that with a single automated
>user, that
>it interrupts every 60 minutes for the duration of some process.
>
>Ian
>
>"Sree Bodapati" <[email protected]> wrote:
>>Take multiple threaddumps when server appears to have stopped processing.
>>Threaddumps would tell you whats happening.
>>
>>
>>
>>
>>"Ian Douglas" <[email protected]> wrote in message
>>news:[email protected]...
>>>
>>> Any news on this one? A 30 second time out is pretty long...
>>>
>>> Ian
>>>
>>> "Ian Douglas" <[email protected]> wrote:
>>> >
>>> >News group: weblogic.developer.interest.clustering
>>> >
>>> >Subject: WebLogic interrupts in two box cluster
>>> >
>>> >Hi,
>>> >
>>> >We have a production environment configured as a single cluster of
>>four
>>> >WebLogic
>>> >servers using the Apache Proxy plugin. Two of the servers are located
>>> >here and
>>> >two are located across town (primary and backup) on Sun e10K boxes.
>>> >
>>> >
>>> >In our testing environment we have a single cluster of two WebLogic
>>servers
>>> >running
>>> >on a single box.
>>> >
>>> >For some reason when we are running in the production environment
>>processing
>>> >just
>>> >stops (for about 33 seconds but sometimes over 2 minutes) and causes
>>> >JTA timeouts.
>>> > I have observed this during the create() of a stateless session
>bean,
>>> >but I have
>>> >been "told" that it happens randomly. This has NEVER happend in
>the
>>> >test environment.
>>> >
>>> >Some of the session EJB create() methods are calling 4 other EJBs.
>> I
>>> >know that
>>> >JNDI look ups are costly (average between 320ms and 550ms) but that
>>doesn't
>>> >get
>>> >us to 33 seconds.
>>> >
>>> >Now for the constraints:
>>> >We are not allowed to have an initial pool of EJBs (don't ask).
>>> >We are not allowed to have local interfaces on the EJBs (don't ask).
>>> >
>>> >I am not allowed to see the source code (don't ask) to find out if
>>a
>>> >UserTransaction
>>> >has been set.
>>> >
>>> >Some questions:
>>> >If a UserTransaction has not been set, will WebLogic ALWAYS create
>>the
>>> >the other
>>> >EJBs that the stateless session bean calls on the same server
>>(collocated)
>>> >instance
>>> >or will they go across the wire to the next available server (because
>>> >of the remote
>>> >interfaces and the home objects having the load balancing logic)?
>> (Note:
>>> >the
>>> >EJB descriptor may have transaction delineation defined on the EJBs
>>participating
>>> >in the transaction and the configuration we are using only provides
>>round
>>> >robin
>>> >load balancing).
>>> >
>>> >Will the home objects requested by the session bean be created on
>>the
>>> >server the
>>> >code is currently running (collocated) on or will any server with
>>the
>>> >distributed
>>> >JNDI tree be allowed to provide the home object?
>>> >
>>> >If the above could happen, then paragraph 2 on page 4-10 of
>>"Understanding
>>> >Object
>>> >Clustering" (Bea WebLogic Server 6.0) might come in to play where
>>we
>>> >have remote
>>> >replicas adding to network overhead for the duration of the transaction.
>>> > Since
>>> >the processors on all the boxes appear to be more or less idle and
>>there
>>> >is loads
>>> >of RAM available... Also I was "told" this only happens under load
>>(100
>>> >simultaneous
>>> >hits).
>>> >
>>> >Could we be falling into a convoying condition? Does the whole cluster
>>> >stop when
>>> >this condition happens or does just the single instance stop? If
>>we
>>> >have one
>>> >server participating in the same transaction as another server would
>>> >that stop
>>> >the whole cluster? If we have 4 EJBs and load balancing decides
>all
>>> >servers are
>>> >participating in the same transaction (round robin on 4 servers gets
>>> >all of them
>>> >in the game), would that stop the whole cluster while data I/O flows
>>> >across the
>>> >wire?
>>> >
>>> >When an initial instance of an EJB is created (initial pool size),
>>does
>>> >the entire
>>> >cluster get informed or does each server independantly manage its
>>own
>>> >pool? What
>>> >about EJB instances when replica-aware EJBObject stubs are used.
>>Documentation
>>> >states that the stub is free to route any call to any server that
>>hosts
>>> >the bean,
>>> >could this also bring more than one server into the same transaction?
>>> >
>>> >Other groups are looking into HTTP Session replication as a possible
>>> >cause...
>>> >
>>> >Thanks for any thoughts,
>>> >Ian
>>>
>>
>>
>
-
Connecting managed server to cluster's administration server
Hello,
I have a problem when trying to connect managed server to cluster's
administration server.
When starting the managed server I get a security exception:
[javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: Administrators must log in over admin port with
admin protocol.]]
weblogic.management.configuration.ConfigurationException: admin URL:
t3://192.168.14.15:7001 - with nested exception:
[javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: Administrators must log in over admin port with
admin protocol.]]
at
weblogic.management.Admin.initializeRemoteAdminHome(Admin.java:893)
at weblogic.management.Admin.start(Admin.java:303)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:331)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169)
at weblogic.Server.main(Server.java:35)
I get the same result when testing the connection setup with
java weblogic.Admin -url 192.168.14.15:7001 -username system -password xyz
CONNECT 1
Background for this problem:
I'm trying to evaluate WLS6.0 clustering for my RMI services. I have two
machines setup with my test domain (DEdomain) and one cluster (DECluster)
within it.
In administration server (machine A) I defined two servers to be run in
machine A and machine B:
DEserver2 in machine B (to be started as managed server) and DEserver3
in machine A
I'm going to bind a same service into these above servers of my DECluster.
In machine B's startManagedWeblogic.sh I have:
java -ms64m -mx64m -classpath
$CLASSPATH -Dweblogic.Domain=DEdomain -Dweblogic.Name=$SERVER_NAME -Dweblogi
c.management.server=$ADMIN_URL -Djava.security.policy==$WL_HOME/lib/weblogic
.policy -Dweblogic.management.username=system -Dweblogic.management.password
=$WLS_PW weblogic.Server
In machine A I have administration server DEserver1 listening port 7001.
And for the domain and cluster building I followed all relevant e-docs
manual pages. It's still somewhat blurry what kind of preparations I have to
make in managed server side to join the domain; for example do I have to
have identical domain directory structure within machine B and do I have to
configure something with admin console or is everything handled by
connecting to the administation server and reading the domain's config.xml
from machine A.
I'm sure I have missed some fundamental idea for building clustered services
and would greatly appreciate if someone had any good tips or ideas.
Best regards,
HarriHi Kumar,
and thank you. That fixed my problem
Best regards,
Harri
"Kumar Allamraju" <[email protected]> wrote in message
news:[email protected]...
It appears you had set the administration port & listen port on the admin
server.
Logging onto admin server via admin port is broken currently. I wouldsuggest
you to set only listen port
and see how that goes.
Kumar
"Harri Töhönen" wrote:
Hello,
I have a problem when trying to connect managed server to cluster's
administration server.
When starting the managed server I get a security exception:
[javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: Administrators must log in over admin portwith> > admin protocol.]
weblogic.management.configuration.ConfigurationException: admin URL:
t3://192.168.14.15:7001 - with nested exception:
[javax.naming.AuthenticationException [Root exception is
java.lang.SecurityException: Administrators must log in over admin portwith> > admin protocol.]
at
weblogic.management.Admin.initializeRemoteAdminHome(Admin.java:893)
at weblogic.management.Admin.start(Admin.java:303)
at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:331)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:169)
at weblogic.Server.main(Server.java:35)
I get the same result when testing the connection setup with
java weblogic.Admin -url 192.168.14.15:7001 -username system -password
xyz
CONNECT 1
Background for this problem:
I'm trying to evaluate WLS6.0 clustering for my RMI services. I have two
machines setup with my test domain (DEdomain) and one cluster(DECluster)
within it.
In administration server (machine A) I defined two servers to be run in
machine A and machine B:
DEserver2 in machine B (to be started as managed server) andDEserver3
in machine A
I'm going to bind a same service into these above servers of myDECluster.
>>
In machine B's startManagedWeblogic.sh I have:
java -ms64m -mx64m -classpath
$CLASSPATH -Dweblogic.Domain=DEdomain -Dweblogic.Name=$SERVER_NAME -Dweblogi
>>
c.management.server=$ADMIN_URL -Djava.security.policy==$WL_HOME/lib/weblogic
>>
.policy -Dweblogic.management.username=system -Dweblogic.management.password
=$WLS_PW weblogic.Server
In machine A I have administration server DEserver1 listening port 7001.
And for the domain and cluster building I followed all relevant e-docs
manual pages. It's still somewhat blurry what kind of preparations Ihave to
make in managed server side to join the domain; for example do I have to
have identical domain directory structure within machine B and do I haveto
configure something with admin console or is everything handled by
connecting to the administation server and reading the domain'sconfig.xml
from machine A.
I'm sure I have missed some fundamental idea for building clusteredservices
and would greatly appreciate if someone had any good tips or ideas.
Best regards,
Harri -
Problem starting managed server in Cluster
Hi,
I'm using cluster with 2 managed server. other managed server2 is runing ok in the cluster now when I am starting managed server1 in a cluster this error is coming
The WebLogic Server encountered a critical failure
Reason: Assertion violated
Exception in thread "main" java.lang.NoClassDefFoundError
at weblogic.protocol.ServerIdentityManager.findServerIdentity(ServerIdentityManager.java:65)
at weblogic.protocol.URLManager.findAdministrationURL(URLManager.java:170)
at weblogic.server.ServerLifeCycleRuntime.getLifeCycleOperationsRemote(ServerLifeCycleRuntime.java:677)
at weblogic.t3.srvr.ServerRuntime.sendStateToAdminServer(ServerRuntime.java:406)
at weblogic.t3.srvr.ServerRuntime.updateRunState(ServerRuntime.java:392)
at weblogic.t3.srvr.T3Srvr.setState(T3Srvr.java:172)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:373)
at weblogic.Server.main(Server.java:67)
Could you pl tell the reason of this error?
Thanks in advance
Hi,
Can anybody help?
Edited by: user10680571 on Dec 4, 2008 4:42 AMThanks David.
During starting this managed server in cluster when I do tail -f <log_file_name> I can see this error message. But this message I can't see in log however ending log details- Is this something related with CLASSPATH problem?
<04-Dec-2008 10:11:18 o'clock GMT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to t
he end of the classpath:
/software/bea/wls/920/weblogic92/platform/lib/p13n/p13n-schemas.jar:/software/bea/wls/920/weblogic92/platform/lib/p13n/p13n_c
ommon.jar:/software/bea/wls/920/weblogic92/platform/lib/p13n/p13n_system.jar:/software/bea/wls/920/weblogic92/platform/lib/wl
p/netuix_common.jar:/software/bea/wls/920/weblogic92/platform/lib/wlp/netuix_schemas.jar:/software/bea/wls/920/weblogic92/pla
tform/lib/wlp/netuix_system.jar:/software/bea/wls/920/weblogic92/platform/lib/wlp/wsrp-common.jar>
<04-Dec-2008 10:11:21 o'clock GMT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Serve
r VM Version 1.5.0_07-b03 from Sun Microsystems Inc.>
<04-Dec-2008 10:11:33 o'clock GMT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 Fri Jun 23 20:47:26 EDT 20
06 783464 >
<04-Dec-2008 10:12:06 o'clock GMT> <Info> <WebLogicServer> <BEA-000215> <Loaded License : /software/bea/wls/920/license.bea>
<04-Dec-2008 10:12:06 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<04-Dec-2008 10:12:06 o'clock GMT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<04-Dec-2008 12:12:26 o'clock GMT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to t
he end of the classpath:
/software/bea/wls/920/weblogic92/platform/lib/p13n/p13n-schemas.jar:/software/bea/wls/920/weblogic92/platform/lib/p13n/p13n_c
ommon.jar:/software/bea/wls/920/weblogic92/platform/lib/p13n/p13n_system.jar:/software/bea/wls/920/weblogic92/platform/lib/wl
p/netuix_common.jar:/software/bea/wls/920/weblogic92/platform/lib/wlp/netuix_schemas.jar:/software/bea/wls/920/weblogic92/pla
tform/lib/wlp/netuix_system.jar:/software/bea/wls/920/weblogic92/platform/lib/wlp/wsrp-common.jar>
<04-Dec-2008 12:12:35 o'clock GMT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Serve
r VM Version 1.5.0_07-b03 from Sun Microsystems Inc.>
<04-Dec-2008 12:13:03 o'clock GMT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 Fri Jun 23 20:47:26 EDT 20
06 783464 >
<04-Dec-2008 12:13:56 o'clock GMT> <Info> <WebLogicServer> <BEA-000215> <Loaded License : /software/bea/wls/920/license.bea>
<04-Dec-2008 12:13:58 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<04-Dec-2008 12:14:00 o'clock GMT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<05-Dec-2008 06:21:55 o'clock GMT> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to t
he end of the classpath:
/software/bea/wls/920/weblogic92/platform/lib/p13n/p13n-schemas.jar:/software/bea/wls/920/weblogic92/platform/lib/p13n/p13n_c
ommon.jar:/software/bea/wls/920/weblogic92/platform/lib/p13n/p13n_system.jar:/software/bea/wls/920/weblogic92/platform/lib/wl
p/netuix_common.jar:/software/bea/wls/920/weblogic92/platform/lib/wlp/netuix_schemas.jar:/software/bea/wls/920/weblogic92/pla
tform/lib/wlp/netuix_system.jar:/software/bea/wls/920/weblogic92/platform/lib/wlp/wsrp-common.jar>
<05-Dec-2008 06:21:57 o'clock GMT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Serve
r VM Version 1.5.0_07-b03 from Sun Microsystems Inc.>
<05-Dec-2008 06:22:04 o'clock GMT> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 Fri Jun 23 20:47:26 EDT 20
06 783464 >
<05-Dec-2008 06:22:23 o'clock GMT> <Info> <WebLogicServer> <BEA-000215> <Loaded License : /software/bea/wls/920/license.bea>
<05-Dec-2008 06:22:23 o'clock GMT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<05-Dec-2008 06:22:23 o'clock GMT> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
Thanks for your help..... -
What's the role of jsessionids in ADF session management?
Hi all,
I'm fairly new to ADF and I've had a client ask me if ADF is using jsessionid consistently for sessionization.
From a quick google search it sounds like all J2EE applications will be using jsessionids as part of their session management, and it doesn't look too difficult to access this information programmatically. Can anyone elaborate for me on what exactly jessionids are and whether they are guaranteed to exist if a session of an ADF application has been instantiated? Basically I think I know the answer to my client's question is yes, but can anyone help me understand the role of jsessionids in ADF apps and other J2EE apps?Hi.
This is a basic behavior in all Java application servers, as it is mandated by the Java Enterprise Edition specification. The ID is used to match the HTTP request to its session object. Basically, the web container will add jsessionid to the URL when the session id cannot be saved in a cookie. This behavior can also be enforced through settings in weblogic.xml, for example, if you are using WLS.
ADF is built on the top of JEE; consequently, it uses jsessionid in exactly the same way as any other Java application.
Best Regards,
Frédéric. -
Session management thru SOAP services
Hi I am trying to deploy our application in a clsutered environment. Previsouly
I had some problems with http session replication. That problems were solved but
now I have another problem.
Our application has multiple clients, some are browser based and some are swing
based that use our SOAP services.
all browser based clients use httpsession for session management, since weblogic
replicates the httpsession, we have no problem clustering http webapps. But SOAP
services has no access to httpsession.
We have implemented our own session management (we cache the app specific session
objects) so that SOAP services works fine (SOAP services doesn't have access to
httpsession, so we could not use httpsession for session management). Each method
in our soap services takes a sessionid and we get the session objects (not http
session objects but our app specific session objects) based on the sessionid.
But now that our application is clustered, the session cache mechanism doesn't
work since its not replicated thru out the clusters.
I thought I could use stateful session beans to cache the sessions, but how do
I cache the SFSB thru out the session w/o sending any references to the SFSB to
the client. I know I can send the Handle reference to the client but We cannot
change the SOAP API now. The only information client has is the session id.
My question is: How do I use SFSB w/o changing my soap services method paramaters.
My SOAP method looks like methodName(String sessionid, ..............)
I could use a clustered cache but we can't buy anything in the current situation.
Any help would be appreciated.
Praveen
Well, does the DSM log have any details? (see [Note 529924|https://service.sap.com/sap/support/notes/529924] on how to view the logs)
My guess is that you are using different protocols between the dispatcher and a backend system: they both have to use HTTP or both use HTTPS (as described in the same note). That would also explain why the URL for the direct connection to the portal doesn't present the error, if that URL has the same protocol as the backend.
Regards,
Sean -
I have a requirement to prevent multiple sessions per user id. So, when a
user logs in to our app, any existing sessions he has must be invalidated.
Does anyone know the correct WebLogic API call to use to locate a session
object for a given user id? I need to call this so that I can invalidate the
existing session.
Thanks,
Rob.Hi Rob,
Using Servlet 2.3 features this can be done using the sessionCreated and
sessionDestroyed API (chapter 10 of the servlet 2.3 Spec). This Spec has been
implemented in WLS 61.
These methods are provided by the HttpSessionListener interface and they are
called by the container whenever a session is created or destryed as their name
suggests. These methods take in HttpSessionEvent as their parameter which can be
use to get a handle of the corresponding Session object. Once you get this
handle you can store it in a Hashtable with userID as the key.
You can use this Hashtable to verify if the session for a particular user
already exists or not. Once the session is invalidated, the sessionDestroyed
method will be called and this allows you to remove the session handle from the
Hashtable. The Hashtable thus, maintains a list of active sessions in an web
application.
A sample impl:
public void sessionCreated(HttpSessionEvent evt){
sess = evt.getSession();
/* have code to populate the sesion Attributes */
log("\nsession created " + sess.getId() );
log("Session id: " + sess.getAttribute("userID") );
synchronized(this) {
h.put(sess.getAttribute("userID"), sess);
public void sessionDestroyed(HttpSessionEvent evt){
sess = evt.getSession();
log("\nsession destroyed: " + sess.getId() );
synchronized(this) {
h.remove(sess.getAttribute("userID"));
hope this helps,
mihir
Rob Worsnop wrote:
OK. I posted the original message after speaking to BEA tech support. They
had told me there was an API for getting hold of the session. Now they tell
me there is not.
It looks like I have to implement this particular aspect of session
management myself.
It's a pretty simple task - provided you expect no more than a few hundred
users logged on at a particular time.
Anyone got any tips about how to implement this in scalable manner?
Thanks,
Rob.
"Rob Worsnop" <[email protected]> wrote in message
news:[email protected]...
I have a requirement to prevent multiple sessions per user id. So, when a
user logs in to our app, any existing sessions he has must be invalidated.
Does anyone know the correct WebLogic API call to use to locate a session
object for a given user id? I need to call this so that I can invalidatethe
existing session.
Thanks,
Rob. -
LCDS Session Management using an Extension Panel
We have an app that executes in an extension panel(InDesign) using both amf and rtmp calls. The lcds server then makes rpc calls to an app which returns the data to InDesign. How do you manage the sessions so that each individual user gets their own session per instance of the app. All of the examples I have found are using javascript to call the disconnects etc. Since the app is using an extension panel and not a webpage/browser those examples won't work.
correct session management is configured at the web-app level in web.xml and
weblogic.xml
http://e-docs.bea.com/wls/docs81/webapp/sessions.html#session-persistence
cheers
mbg
"Sai S Prasad" <[email protected]> wrote in message
news:[email protected]..
>
I think a Session is tied to a web application and not the enterpriseapplication.
"newsgroups.bea.com" <[email protected]> wrote:
war files in an EAR file
is session management at the EAR level or each war file equate to
a
session
please help with this
I am using WLS 7.0 [ no SP ] -
Http session replication fails in cluster
Hello everybody.
I have some problems with HTTP session replication in WebLlogic cluster environment. I have a cluster with 2 nodes and application deployed there. Application is configured with:
<session-param>
<param-name>PersistentStoreType</param-name>
<param-value>replicated</param-value>
</session-param>
in weblogic.xml
WebLogic plug-in for Apache webserver is configured properly as described in documentation.
But when I try to make experiment to enter the application, make some activities, look in console where I was redirected by apache proxy and manually shut down the node where request was sent, I loose my HTTP session with all data there (all the beans stored in session are Serializable). Replication doesn't work correctly. May be I've missed something in configuration? How can I configure my application to provide correctness session replication?
Thanks for advice.
ThanksThanks for response!
I'm using WebLogic 8.1 SP 4 and configured Apache proxy as described in documentation for load balancing. The only section I have in httpd.conf is next:
<Location /HTTPClnt>
SetHandler weblogic-handler
</Location>
<IfModule mod_weblogic.c>
WebLogicCluster serv1:7541,serv2:7541
MatchExpression *.*
Debug ON
WLLogFile /www/tmp/global_proxy.log
WLTempDir "/www/tmp"
DebugConfigInfo On
KeepAliveEnabled ON
KeepAliveSecs 15
</IfModule>
<Location /myApp>
SetHandler weblogic-handler
WebLogicCluster serv1:7541,serv2:7541
</Location>and the string to include weblogic proxy module for apache:
LoadModule weblogic_module modules/mod_wl_20.soI've configured CookiesEnabled=true in weblogic.xml, but it didn't help. About session specification in httpd.conf - where can I read about that? I've just configured apache according to manual from here:
[url http://e-docs.bea.com/wls/docs92/plugins/apache.html]http://e-docs.bea.com/wls/docs92/plugins/apache.html
Thanks -
I'm looking for some way to query the weblogic container about servlet sessions
by id. I'd like to create a management program that is supplied a session id,
performs a lookup against WL session manager, and dumps the data in that session.
Is there such an API or interfaces? Any docs, examples, etc. in that direction
would be appreciated.Such API is not provided since it would constitute a security
hole.
James wrote:
I'm looking for some way to query the weblogic container about servlet sessions
by id. I'd like to create a management program that is supplied a session id,
performs a lookup against WL session manager, and dumps the data in that session.
Is there such an API or interfaces? Any docs, examples, etc. in that direction
would be appreciated. -
JMStudio Error "Can not create session manager"
Hi,
I'm trying to transmit an mpg file through a simple pc to pc network, using the transmission wizard in the JMStudio, and everytime it causes a "can not create session manager" error, even when I try to transmit .mp3 file
I'm using an ip like 100.100.0.1 for the sender machine, and 100.100.0.2 for the receiver machine, and I don't know where is the problem
thanks in advanceUm,maybe the port that you use for transmission is already occupied.
Make sure that you are not using JMStudio to transmit streams while trying to receive streams from the same port. -
What is new with MAX 2.0 and is it compatible with Session Manager?
We added non-IVI instrument information in, basically the same structure as for IVI instruments,
into the ivi.ini file to keep all instrument information in the same place. Using MAX Version 1.1 caused no problems whatsoever and the system worked fine. With the advent of MAX 2.0 you seem to use ivi.ini as well as config.mxs to store instrument information. What we have found now is that given a working ivi.ini file from MAX 1.1, we end up with 2 or 3 copies of all the devices in the IVI Instruments->Devices section! When the duplicate entries are deleted and the application exited, the
ivi.ini file is updated minus the [Hardware->] sections which contain the resource descriptors that our appl
ications look for. As an added complication, under MAX 2.1 (From an evaluation of the Switch Executive) It behaves the same, except that it almost always crashes with one of the following errors. 'OLEChannelWnd Fatal Error', or 'Error#26 window.cpp line 10028 Labview Version 6.0.2' Once opened and closed MAX 2.1 will not open again! (Note we do not have LabVIEW on the system.) What is the relationship between the config.mxs and ivi.ini now? Also, your Session Manager application (for use with TestStand) extracts information from ivi.ini and may expect entries to be manually entered into ivi.ini (e.g. NISessionManager_Reset = True) i.e. Is the TestStand Session Manager compatible with MAX 2.0?Brian,
The primary difference between MAX 1.1 and 2.x is that there is a new internal architecture. MAX 2.x synchronizes data between the config.mxs and the ivi.ini. The reason you're having trouble is that user-editing of the ivi.ini file is not supported with MAX 2.x.
Some better solutions to accomplish what you want:
1. Do as Mark Ireton suggested in his answer
2. Use the IVI Run-Time Configuration functions. They will allow you to dynamically configure your Logical Names, Virtual Instruments, Instrument Drivers, and Devices. You can then use your own format for storing and retrieving that information, and use the relevant pieces for each execution. You can find information on these functions in the IVI CVI Help file located in Start >> National I
nstruments >> IVI Driver Toolset folder. Go to the chapter on Run-time Initialization Configuration.
I strongly suggest #2, because those functions will continue to be supported in the future, while other mechanisms may not be.
--Bankim
Bankim Tejani
National Instruments -
Session management problems with SSO
Hi all-
I've been getting an Apex app tied to SSO as a partner app (per http://www.oracle.com/technology/products/database/application_express/howtos/sso_partner_app.html). So far, it sort of works. If I go to my apex app, it redirects me to SSO, where I authenticate and end up back in the apex app. Great. Here are two problems I've run into:
1. If I am already authenticated to SSO, and I go to my apex app (url like: http://host/pls/apex/f?p=101:1), my browser goes into an infinite redirect (url like: http://host/pls/apex/f?p=101:1:::::FSP_AFTER_LOGIN_URL:\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|||||FSP_AFTER_LOGIN_URL|\f?p=101|1|||||FSP_AFTER_LOGIN_URL|\f? p=101|1|\\\\\\\\\\\\\\\\\\\). To resolve, I have to clear cookies.
2. If I am using my apex app, then log out of SSO (in another browser window), I can still click around in my apex app (i.e., apex thinks I'm still authenticated).
Anyone have any thoughts? I'm wondering if I need to do something in page session management (under authentication schemes) to fix #2, but I have no clue about #1.
Thanks
RobHi Scott-
Thanks for the info on #2 - I'll work on that after I get #1 sorted out, since it's the more dire problem. Here's some more info:
Apex version = 3.0.1.00.08
SSO SDK = ssosdk902.zip
I set it up as "My Application as Partner App." I used "MY_PARTNER_NAME" as SSO Partner Application Name. In the list of SSO Partner Apps on the SSO Admin page, my partner app name is also MY_PARTNER_NAME. It gives the following info:
Login URL: https://sso_host/pls/orasso/orasso.wwsso_app_admin.ls_login
Single Sign-Off URL: https://sso_host/pls/orasso/orasso.wwsso_app_admin.ls_logout
Home URL: http://apex_host/pls/apex
Success URL: http://apex_host/pls/apex/RBLICK.YOUR_PACKAGE.PROCESS_SUCCESS
Logout URL: http://apex_host/pls/apex
RBLICK is the schema owning the apex app. In there, I created a package called YOUR_PACKAGE:
create package YOUR_PACKAGE as
procedure process_success(urlc in varchar2);
end YOUR_PACKAGE;
CREATE PACKAGE BODY YOUR_PACKAGE AS
procedure process_success(urlc in varchar2) as
begin
wwv_flow_custom_auth_sso.process_success(
urlc=>urlc,
p_partner_app_name=>'MY_PARTNER_NAME');
end process_success;
END YOUR_PACKAGE;
Anything look obviously wrong to you?
Thanks!
Rob -
Under Excel Service Application --> session management; what is the difference between Session timeout and Short Session timeout?
Any call made from the API will automatically be set to the “Session Timeout” period, no matter
what. Calls made from EWA (Excel Web Access) will get the “Short Session Timeout” period assigned to it initially.
Short Session Timeout and Session Timeout in Excel Services
Short Session Timeout and Session Timeout in Excel Services - Part 2
Sessions and session time-outs in Excel Services
above links are from old version but still applies to all.
Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog
Maybe you are looking for
-
Illustrator CC Quits Unexpectedly When Moving Paths
It works fine until I try to move a path, any path, that I've drawn with the pen tool. It happens on any file I work in When I do, it quits and gives me the message below. I haven't a clue how to interpret any of that. Suggestions, please? Proces
-
WEBUTIL problems importing a file with the HOST command.
We are investigating a problem where the users are trying to import a file in from the webserver to be used by the application. The users have successfully moved the file from their local PC to the application server. But, when we perform a HOST comm
-
MY PIXMA iP4000 not printing--paper feeds and steps through but only blank pages
The printer sounds like it is printing----you can hear the print head moving---but nothing prints.... pages are completely blank. Reseated the connections, no effect. Took out all the cartridges, reseated them, no effect. Still only prints blank page
-
I will thank a lot the person who can solve my problem pleas thakns!!
-
ATTRIBUTE7 in OKC_K_LINES_B table not seen in lease contract
Hi, When i enable the ATTRIBUTE7 in the context Global Data Elements for Application- Lease management and Title - Contract Line Additional Information, I expect the DFF to be visible in the lease contract from lease center administrator or Lease sup