Bala Tilak

Ranch Hand
+ Follow
since Oct 07, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
7
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bala Tilak

I have 19 years of experience and I have done these certification at starting of my career. So Is it still make sense to keep these certifications ? Technically may not be.. but does the HR or Staffing guy may give some weight to it ? thats what my question is ?
Specifically in US market.

8 months ago
As part of my Springboot micro services project which is running behind Springboot Gateway.

I have different auth servers like our own Auth Server as well as using Google's and Facebook's Open Id authentication.

Once the user application acquired the token, its being passed as bearer token. And one header to denote which Auth Server's token it is .. like sso=oursso, sso=google, or sso=facebook etc.,

Now at Gateway, I need to authenticate the token based on sso header value.. if its google , invoke google token validation api, if its facebook invoke facebook's token validation api or if its oursso then our own authserver's token validation api..

How can I achieve it..

1. Can I do it  using Springboot Security
2. Should I write simple web filter and read the header value and invoke the validate token service ..
10 months ago
Hi All,

As part of our spring micro services API, I want to route the request to correct end point..

 /api1/v1/product
/api/v2/product
/api/v3/product

But the UI is invoking like

/api/product  -  to be mapped to v1 ( which is default)
/api/product?version=v2 (should be routed to /api/v3/product)
/api/product?version=v3 ( should be routed to /api/v3/product )

How to achieve this in Spring Cloud Gateway.. should I write the custom router or any predicate mapping example..

Thanks in advance

10 months ago
Hi I am working on a micro services project which will allow login with google and our own auth server login as well.

As part of API gateway, for every api call. when the client application passes the token either google token or token generated by our own auth server. The type of token is being mentioned by another header tag like "tokenSource" the value being "google-sso" incase the passed in token is google generated or "our-sso" in case the passed in token is our auth server.

Now I need to invoke specific token validation urls on either google or our auth server based on "tokenSource" header.

Tried manyways using OAuth2ResourceServer but could only configure either google or our auth server for introspection.

Not sure how to proceed with this requirement.. any clue please.

11 months ago
Hi All,

My application runs in Java and my Database is Mysql.

The application handles various sports results and scores across the world. My application converts everything to EST and stores in DB and while displaying converts the times to local timezones and shows it.

Till now I have a virtual machine where I set the timezone to EST and both my Java and Database running there.
And all my time calculations in Java used EST as the system zone.

I see the laptop timezone also to EST so that I can run the test cases and import the database from server for testing.

But now I want to move the infra.. and that new server does not support the EST timezone , both Java and MysQL servers. So I have to change my code to UDT also change the entire database entries to EDT.

I know I am doing something wrong.
So is there a way to write the code and store the data, where I can store the data and deploy the application in any server irrespective the servers timezone setup ?

Lets the I have the data and Java application ..
                    1. I should be able to deploy the application in IST (India Standard Time) laptop and connect to DB server which is running on UDT.
                   2. I should be able to dump the data into my laptop (again in IST) and run the application without any issues.
                   3. I should be able to deploy the application in a server which is running UDT and access the db which is running in UDT server without any issues..

Can someone please help suggesting the best way to handle this..


Regards,
Bala.
Thank you Tim Moores,Paul Clapham,Tim Holloway.

I got it now.
2 years ago
I have a Web Application for restaurant which is implemented using Struts2.0 and MYSQL as DB.

Now in case of Internet issue or other issues ,in cases where we can't access our Web Application, I want to write a offline (desktop) version for the web application to carry out POS related tasks and update the local DB. Once the connectivity restored the DB will be synced with online DB.

Can someone suggest me the design on how to achieve this.

1. How to have DB sync ? Should it be Local to --> Online DB sync or should it be two-way sync?
2. Is there any configuration I can do at DB level. Or should I write a Java program (typically a job) that keep both the DBs in sync.



Regards,
Bala.
2 years ago
Hi All,

I have a web application build using Struts2. For the website I am not using any extension ( .HTML or .do ) for pages. Its just mydaoman/pageName

Now I have usecase where user can download certain data as .pdf or .txt etc. I want to have a URL for something like mydomain/download/data.pdf and mydomain/download/data.txt etc

How can map .pdf in Struts2 ? I tried but its giving 404 error..

Regards,
Bala.
2 years ago
I have a web application which is running fine in embedded tomcat in eclipse with below struts tld declaration in JSP

<!doctype html>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html lang="en" dir="ltr">
<head>
.....

I had the struts2-core-2.5.26 jar in WEB-INF/lib and added it to the build path in Eclipse..

Now I uploaded the war to server VM, I just created the war file and copied it to tomcat WebApps root as ROOT. the pages which are not using struts tags are working fine.. but when I access the jsp pages which are using struts tags getting tld not find error..

2 years ago
Thank you. So my question is for eager fetching...Hibernate running multiple queries...Like three queries for each game loading...One for game and one for days and another for bonus info. It's taking time. Is there a way we can load all at once (including sub entities) using joins ??
Hi Tim Holloway,

Thanks for the reply. Yes its a big legacy code.. but I think EntityManager is just a wrapper around session if I am not wrong.

And I prefer XML to keep my java classes real POJOs without any annotations.

So using XML , is there any possibility that I can fetch the one to many in one query, I can't go with lazy load as I need these values to be in memory...
Hi All, hope you are doing good.

I have an application where a Game is Class which contains some properties along with a set called daysPlayed; and a list called bonusInfo..  which are from different tables..

Here is the piece of code..




and here is the snippet of XML for mapping..




When I load all the games using...



For bonus and days off Hibernate running multiple queries like two queries per Game .. Can't I load all the data at once.. like using Joins?


Regards,
Bala.
Yes. I have setter and getter for FileUpload. I restarted the Tomcat and Apache and it's started working now. Not sure how it was fixed.

Thanks a lot for your time and thought Tim.
2 years ago
Sorry for the confusion I created.

The file upload working fine with the Tomcat server. I am getting the fileUpload object if I tested it on my local system right localhost:8080/mywebapp/uploadfile

or Even its successful If I directly access the Tomcat via 8080 on server like https://myipaddress:8080/mywebapp/uploadfile.

But Its not working if I access the application via Apache 4 , that is is Apache 4 --> Tomcat 9 --> Struts. Means when I access the application like https://myipaddress:80/uploadfile the fileUpload is null.


2 years ago
Thanks for the reply Tim. Yes I am logging.

I mean the File object is null when I access the application through Apache. All the other request parameters are ok.. only the File object is null.

2 years ago