Senthil B Kumar

Ranch Hand
+ Follow
since Feb 09, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Senthil B Kumar

We have a Zuul Pre-Filter (Filter1) which will inspect the incoming HTTPServletRequest and make some changes to the query parameters in it to embed it to a custom created request (wrapping HttpServletRequestWrapper).

Now, i want to pass this custom wrapped request to the next Zuul Pre-Filter (Filter2). How can i do that ?

Earlier when using regular Servlet Filters, we use as following in my Filter1

but, in Zuul Filter, the Zuul framework takes care of invoking the subsequent filters and passing the request/response objects. How can i over-ride that ?
I created a cookie in a java filter and added back to the response using response.addCookie() before returning to the client node.js application. This web application is accessed using a localhost URL in the browser. After reading about cookie domain issue while using 'localhost', i did not set any domain or path in the cookie, while creating it.

Now the Chrome or Firefox browsers don't show-up the cookie in the browser. All my URLs are http://localhost but, each page having different path.

Step 1: During a request to http://localhost/app/login cookie is created and set in the response
Step 2: When the page loads after response, no cookies are shown in Chrome
Step 3: During the next request http://localhost/app/customer the previously created cookie is not recieved when trying request.getCookies().
Step 4: Before returning back to client application, a cookie is created
Step 5: Now the cookie created in Step 4 is shown in Chrome
Step 6: The next request is also sent to http://localhost/app/customer , now the cookie created in step 4 is recieved in the server as well

If cookie creation for localhost is an issue, how does it work for Steps 4-6 only ?

How can i make the created cookie available to all paths under the localhost domain ? I tried using cookie.addPath("/") as mentioned in this post but, no change.

Note: Due to admin privilege issues in my development machine, i am not able to set-up a domain name to my localhost IP in etc/hosts file.

3 years ago
In a multi-channel supporting web application,

how can we detect and differentiate the user channel from which user request is coming from ?

By user channel, i mean it could be a thin client (web application) or thick client (native mobile app).

If it is a thin client, i can use 'user-agent' to identify and differentiate the browser from where the request was placed. But, how to distinguish between Thin and Thick client ?

Note: One approach we thought about is to use a custom Request Header but, then it could be easily faked by browser tools like firebug.
I am looking for a simple example/scenario explaining Buffer Overflow happening in JEE Web Application and how this specific scenario is prevented.

There could be N number of ways this could happen, I am just looking for any one example to help me to understand.

Note: I am having problem in visualizing a buffer overflow error in JEE based web application, that is the reason I am looking for a specific example.
3 years ago
While trying to understand the purpose of 'Spring Data' i came across this article and tried few examples with Gemfire/ Redis repositories and their corresponding Spring-Data components. Could someone help me with the following questions.

Scenario: When GemFire was my datastore, i had to use methods create, get and remove on the GemFireTemplate to perform the CRUD operations. When Redis was my datastore, I had to use methods .opsForHash().put , .opsForHash().get and .opsForHash().delete on the RedisTemplate to perform the same CRUD operations.


Isn't Spring-Data supposed to provide a level of abstraction to the underlying data store ? If i am expected to know the respective CRUD methods and have different APIs based on the underlying data store, what kind of abstraction does Spring-Data components bring in ? Can't I directly use a Jedis or Java client for Gemfire to perform these datatstore specific CRUD operations ?

This Article seems to explain that but, looks like i need some help in understanding it.

>> there is no general API to all the persistence stores. The differences are too fundamental. But the Spring Data project does provide a common programming model to access your data <<
3 years ago
I am trying to run this Spring Session example available here but, I've used Maven instead of Gradle. I get the following error both while a) Running the WAR file and b) Deploying the WAR in an WildFly8.2 server

A quick search suggests that the problem could be conflicting versions among various dependencies quoted in the pom.xml.

What is the root cause & solution for this error ?

Error while Running or Deploying the WAR


Here is my complete POM.xml

3 years ago
The source code of the project is available @

I haven't set-up Redis or written any detailed code for Redis. As per Spring Boot+Spring Session, an embedded Redis instance should have been started to which the Spring Session should have been persisted. but when i am running, the embedded Redis instance is not getting created.
3 years ago
I was trying to set-up this Spring-Session example using Spring Boot + Maven (the source in the GIT link is using Gradle).
There were no compilation error, the deploy-able WAR file also got generated using the repackage goal.

When trying to deploy the WAR file in my WildFly server, i get the following error related to Redis.
I do not have Redis server running in my machine (since i assume that an embedded Redis instance will be created as part of the application, even in an deployed WAR file)


Caused by:

Environment: WildFly8.2 running in Domain Mode (3 nodes running in Full-HA profile) Application: Spring Boot + Spring Session + Maven

Question: Is this error because an embedded Redis instance cannot be created while the WAR file is deployed to a container ?
I haven't tried running this as executable WAR file yet.

Complete Error Stack:

3 years ago
Can i manage the complete HTTPSession lifecycle (Creation, Update, Destroy and Expiry) only with Spring Session and without using Spring Security ?

Reason i got this question is that, Spring Security states that it provides 'Session Auto-Expiry' & 'Concurrent Session' features. Wouldn't 'Session Auto-Expiry' be available in 'Spring Session' itself ?
3 years ago
Spring documentation says that Spring Session can transparently leverage Redis to back a web application’s HttpSession when using REST endpoints.

Does anyone know if Spring supports GemFire in this place instead of Redis to back a web application's HttpSession ? I know there is a Spring-Data-Gemfire component that help us to use Spring Data to write to GemFire but, i want to write my SpringSession to GemFire.

3 years ago
One last question on this line, are there any differences between the Scala implementation & Java implementation in terms of the following attributes ?

1) Ease of adoption & learning curve.
2) Scalability & performance
3) Resiliency
4) Industry feedback and adoption rate.
5) Modularity and cloud readiness.
3 years ago
my recent read is all about building web applications with technologies moving away from monolithic architecture to micro-service based reactive & scalable applications.

With too many 'Jargons-Overload' and to bring some sanity to my thinking, I am trying to think out aloud by documenting my understandings and raising questions (however trivial/stupid it could be).

Please do share your thoughts/feedback/comments/amswers around these. Feel free to correct any of my incorrect understanding.

  • Spring MVC - to build RESTfull services (which will contain different business functionality implemented as multiple services
  • API Gateway - to validate calls to these RESTfull services (aka API calls) and to Orchestrate across multiple services/APIs
  • Servlet 3 (Async) - to build Asynchronous Server side (especially Servlets) code
  • RxJava - to build Asynchronous Server side code (can be tied with Spring MVC to provide Async feature)
  • Futures , Observables - No clarity yet. I am still reading
  • Play , Akka & Scala - A web framework, message driven run-time and programming language to develop reactive applications (meaning high performance, scalable & event driven)
  • WebSockets - to send messages to a server and receive event-driven responses without having to keep continuously polling the server for a reply
  • Node.js/Backbone.js - a) to utilize the RESTfull services built as Microservices b) Redirect updated Model/Data to multiple views for multiple user channels c) API gateway could also be built using this server side javascript

  • Question # 1 Could somebody help in putting together complete architecture picture of where, how all these technologies fit and/or compliment each other ? I will give a shot and update a picture later.

    Question # 2 Is the combination of Play, Akka & Scala equivalent and replacement to the combination of Spring MVC + Servlet 3 Async + RxJava ?

    Question # 3 If i use Node.js/Backbone.js , do they support the WebSockets functionality, or do i have to use a another library that could support it ? If so, for what purpose will i use WebSockets for ?

    Question # 4 How do I use Servlet 3 (Async) to build my micro-services ? Instead of writing plain Servlets in Servlet3.0 spec, should I use RxJava along with SpringMVC for this asynchronous feature ?

    Question # 5 If I can bring concurrency in Controler layer (Servlet/SpringMVC), how can I bring it in rest of the layers after it ? Else, would it truly give me the due advantage ?

    Question #6 What are Java Futures, Observables ? Are they components or Libraries used to implement the Message/Event driven architecture in my other layers ?

    Question #7 Where would Client-Side-MVC fit in this whole picture ? and what advantage it could offer in such a scenario ?
    Are there version of Play & Akka which supports plain Java programming language as well?
    3 years ago
    I understand that Typeface is a company that provides support for both Scala and Akka framework. Are these 2 different flavors of the Play framework or each are totally different framework for different purposes ?

    3 years ago
    Is Scala another scripting language or another framework like Struts/Spring.. etc ?

    What is the use case for Scala ?
    3 years ago