Questions tagged [sessioncontext]

The `SessionContext` interface as a part of the `javax.ejb` package provides access to the run-time session context that the EJB container provides for a session bean instance.

The SessionContext interface as a part of the javax.ejb package provides access to the run-time session context that the EJB container provides for a session bean instance. The container passes the SessionContext interface to an EJB instance after the instance has been created. The session context remains associated with the EJB instance for the lifetime of the instance.

26 questions
0
votes
2 answers

Read current NLS_NUMERIC_CHARACTERS session setting

I have to run a report with numeric decimals as parameters in different territories with different NLS_NUMERIC_CHARACTERS, aka comma separators. NLS_NUMERIC_CHARACTERS is set on the session level eg. with ALTER SESSION SET NLS_NUMERIC_CHARACTERS =…
olippuner
  • 394
  • 4
  • 16
0
votes
1 answer

How to set shared-session-context true by default

I've a Maven EAR with some modules that need to share the session context. So when I run it on Liberty Server (on Eclipse) I've to add in the "Server Configuration" the application extension and set the shared-session-context flag to true. I guess…
Alessandro
  • 4,382
  • 8
  • 36
  • 70
0
votes
0 answers

Java EE can't complete SessionContext

To rollback when have error, I use javax.ejb.SessionContext to do that, first I mark a point to rollback by sessionContext.getUserTransaction().begin() Then I use sessionContext.getUserTransaction().rollback() to rollback and use…
Fes Nguyen
  • 580
  • 5
  • 18
0
votes
1 answer

Session context is null JBOSS 7.1

UPDATE QUESTION: I used JBOSS Develper Studio 8, JBOS server 7.1 based on jre 1.7 I have one J2EE project with ejb and web projects. In ejb project I have two identical ejb 3.1 In web project I have only one servlet. This servlet call simple test…
Dragan
  • 3
  • 2
0
votes
1 answer

Different SessionContexts for WCF and unit tests

I run my application on IIS to test if my services are working as expected. Also, I run unit tests of my other internal classes' operations. The following is my session factory configuration: Fluently.Configure() …
Th3B0Y
  • 884
  • 1
  • 12
  • 30
0
votes
1 answer

SessionContext.getCallerPrincipal.getName() returns "ANONYMOUS"

In my Java EE application, I declare the following restful class @Path("userProfile") @Stateless public class UserProfileRestful { @Resource private SessionContext sessionContext; @Path("userName") @GET …
Samir
  • 111
  • 1
  • 1
  • 6
0
votes
1 answer

Jboss EJB and Shiro

I have a CDI -> EJB App. I do the security in the past with JBoss j_security. My security with Shiro works. But my only problem is how can I get SessionContext in my EJB? With Jboss Security I got the username, who login in the location…
internet
  • 385
  • 1
  • 8
  • 27
0
votes
1 answer

Shiro and SessionContext CDI => "anonymous"

I want to get my current loggin User in my EJB Container. I built an CDI - EJB Webapplication with Shiro for Security. My problem is now, in my EJB Class the sessionContext is everytime "anonymous" @Resource private SessionContext…
internet
  • 385
  • 1
  • 8
  • 27
0
votes
3 answers

How to get the logged user in JAVA with WEBLOGIC?

I found a code, which should reach the logged user: InitialContext ic = new InitialContext(); SessionContext sessionContext = (SessionContext)ic.lookup("java:comp/EJBContext"); System.out.println("look up injected sctx: " + sessionContext);…
victorio
  • 6,224
  • 24
  • 77
  • 113
0
votes
2 answers

Null Pointer Exception in JSFUtils.resolveExpression("#{sessioncontext}") in a Servlet

I am working with Servlets and I am trying to retrieve Session Context using the JSFUtils.resolveExpression("#{sessioncontext}") method in ADF but it is giving me a Null Pointer Exception. What is wrong with the above used method and Is there…
Nishant
  • 222
  • 6
  • 21
0
votes
1 answer

The value 'hibernate.current_session_context_class' is invalid according to its datatype 'String'

I have an app that uses Nhibernate. This is my first app using it so I am newbie. I am trying to test my first get method. protected void Button1_Click(object sender, EventArgs e) { IList persons = SessionManager .SessionFactory …
user742102
  • 1,335
  • 8
  • 32
  • 51
1
2