Questions tagged [stateless]

Stateless apps don't expose any information about what has happened or changed since it started running

Stateless apps don't expose any information about what has happened or changed since it started running. They give the same response to the same request, function or method call, every time. HTTP is stateless in its raw form - if you do a GET to a particular URL, you get (theoretically) the same response every time. The exception of course is when we start adding statefulness on top, e.g. with ASP.NET web apps :) But if you think of a static website with only HTML files and images, you'll know what I mean.

521 questions
0
votes
1 answer

React DropdownList - stateful or stateless children?

According to React's documentation: A common pattern is to create several stateless components that just render data, and have a stateful component above them in the hierarchy that passes its state to its children via props. Let's take for…
user1341217
0
votes
1 answer

how to get persisted object's Id before ending a transactional web service in ejb web services?

I am developing an SOA application with EJB and web services that are annotated as @stateless and @Webservice. In one of my web methods, my action gets a DTO object from client and returns it after persisting it. Actually I need to return the…
Hamid Adldoost
  • 149
  • 1
  • 15
0
votes
1 answer

Stateless and Stateful confusing definitions and outputs (contradicting to my view)

From what I understand @Stateless means that the state of every encountering of a client to a server is starting from scratch, and @Stateful means that the server saves in his memory the client's data. ("stateless means there is no memory of the…
Achi Even-dar
  • 427
  • 1
  • 10
  • 20
0
votes
1 answer

OAuth2 and Token-based authentication - can it work with sticky sessions or similar mechanism

I have created application starting with JHipster and at that point implemented Token-based authentication provided by JHipster. Even though I implemented Server Side Controller as RESTful services - I had to keep User Context on server in Custom…
0
votes
1 answer

Change from "Session" to "StatelessSession" and I can fetch my Class complete

I use a stateless session and the follow HQL. CreateQuery("select a from Address a") My Address Class has many BankDetails but i can't access. If i use a normal session it works. What can I do?
0
votes
1 answer

Wicket why page expires when opening link in new tab?

I'm building a wicket bootsrap web application with the following specs (from pom.xml): wicket version: 6.15.0 wicket-bootstrap-core.version: 0.9.3-SNAPSHOT I have a base page which is the father of my other pages and adds to mark up a horizontal…
SoulMagnet
  • 173
  • 1
  • 4
  • 18
0
votes
3 answers

Statelessness of REST

I am creating a REST service that has two methods one is GetAll and other is GetById.In my scenario, database request is very costly so i want to store output of GetAll somewhere (Cache) and use it for subsequent request GetById. One of the…
F11
  • 3,703
  • 12
  • 49
  • 83
0
votes
1 answer

how to share the token between classes

I have having a design issue with asp.net web-api and would like to know how to solve this problem public abstract class BaseApiController : ApiController where TEntity : Entity { protected string GetUsername() { return…
harishr
  • 17,807
  • 9
  • 78
  • 125
0
votes
1 answer

Caching state with Grails controllers

I understand that Grails strives very hard to be stateless, however I have a need for one of my controllers to retain a particular fizz value that should be found inside every HTTP request: class MyController { List cachedFizzes = new…
smeeb
  • 27,777
  • 57
  • 250
  • 447
0
votes
1 answer

REST API - How to make logins via an API stateless and secure?

I'm struggling with an issue here. I've searched repeatedly for answers, but have been unable to find the exact answer I'm looking for. I'm attempting to build a secure authentication method for a REST api. My question is, how do we handle a login…
James Spence
  • 2,020
  • 1
  • 16
  • 23
0
votes
1 answer

how to deal with synchronizing 2 consecutive REST calls on the same object

I am having some UI problem that causes it to send 2 put requests one after the other at the same time. The problem is that the REST API, which does a PUT action compares an object from the database with the object sent by the UI, and updates…
Gleeb
  • 10,773
  • 26
  • 92
  • 135
0
votes
1 answer

How to prevent login credential sharing with stateless/token-based authentication?

I have this really neat token-based authentication scheme that does not require a session-store on the server. On every authenticated call, an encrypted JSON payload is sent in a header, which holds the session information. The server can just…
surj
  • 4,706
  • 2
  • 25
  • 34
0
votes
1 answer

WebServiceContext getting null in Stateless web service deployed on Weblogic

My JAX WS web service is deployed on weblogic server 12. Its a ear file which contains war archive. I used @Resource WebServiceContext wsContxt; to get client IP. When i deploy this WAR file on glassfish , WebServiceContext is working well. But it…
Kevin
  • 407
  • 2
  • 7
  • 22
0
votes
1 answer

How to store instances of the same object in PHP (stateless)?

I was looking at "Pimple", Fabien Potencier's "simple service container" for PHP, and I was intrigued by the following comment: By default, each time you get a service, Pimple returns the same instance of it. If you want a different instance to be…
Sam Levin
  • 3,326
  • 7
  • 30
  • 44
0
votes
1 answer

Multi-page site for predominantly static pages?

I am currently designing a website for a business. This website will have dynamic areas - such as an "admin" area in the future. But for now, there are going to be 14-16 static pages. Testimonials, products and services, typical corporate pages. I…
Sam Levin
  • 3,326
  • 7
  • 30
  • 44