Shankar sanjay

Ranch Hand
+ Follow
since Sep 14, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Shankar sanjay


Hi Sir,

I have a doubt in jpa query criteria builder with path or expression.

//I want to find who are all entered first post comment with in an hour after their  account created
       Path<Date> accountCreatedTime = root.<Date> get("AccountCreatedTime");
Path<Date> FirstPostCreatedTime = root.<Date> get("FirstPostCreatedTime");

       final Predicate timeInHourPredicate = criteriaBuilder
               .greaterThanOrEqualTo(accountCreatedTime, FirstPostCreatedTime);
Example,
1. Account Created at: 2018-SEP-10 at 10am and First Post entered 2018-SEP-10 at 10.15 am  this recond should be fetched. (FALLS IN AN HOUR)
2. Account Created at: 2018-SEP-10 at 10am and First Post entered 2018-SEP-10 at 3.50 pm  this SHOULD NOT  be fetched.

Is there any  way to add or separate hours from Path<Date> accountCreatedTime? or can we get difference between   Path<Date> accountCreatedTime  and Path<Date> FirstPostCreatedTime  in hours and in criteriaBuilder
Hi,

I am very new to cloud environment, sorry for this simple questions. We have application which is using (Html 5 + Spring + JPA + Hibernate + MySql Database). I would like host this application on cloud. (Google App Engine).

I would like to do two things on this application, deploy the application in organization itself as Intra Application since we want to reduce Internet Access (considering internet connectivity and provide better performance to the users) and deploy the same application on Google App Engine for different set of users (here considering that not many people will access this application but still some people will access from different countries).

The following are my question.

1. Google App Engine supports (HTML 5 + Spring + JPA + Hibernate) Applications to host?
2. Can we keep database (mysql) on our organization itself? if yes, then how GAE hosted application can connect our database? can you please share if any example code for this?
3. is it Better to place database server in our organization itself or on GAE side?

can you please suggest?

Can you please share if any sample application/example/article found?
10 years ago
Can anyone please tell that which version spec to refer.

Java EE 6 Java Persistence API Developer Certified Expert Exam and Exam Number: 1Z0-898
In OCMJEA-6, UML Portion completed moved to part II exam.
Hello,

Can anyone explain what is self-first and parent-first classloader in java? with an example will be much better.

thanks.
10 years ago
Hi,

I had look on the OCMJEA 6 syllabus and Cade and Sheil book, found lot of differences in design pattern topic. you have to cover only few design patterns, at least exam point of view, to get rid of the exam in design pattern topic.



cmjea 6
======
• Demonstrate knowledge of Java EE design patterns including: Service Starter, Singleton, Bean Locator, Resource Binder, Dependency Inj ection, Payload Extractor, Context Holder, and Thread Tracker.
• Select an appropriate pattern for a given application challenge from the following: Facade, Strategy, Observer, Composite, and Abstract Factory.
• Identify a design pattern, using a description of its features, from the following: Facade, Strategy, Observer, Composite, and Abstract Factory.
• Identify the use of the law of leaky abstractions or a specific anti-pattern in a given scenario.





cmjea 5
======
From a list, select the most appropriate pattern for a given scenario. Patterns are limited to those documented in the book - Alur, Crupi and Malks (2003). Core J2EE Patterns: Best Practices and Design Strategies 2nd Edition and named using the names given in that book.
From a list, select the most appropriate pattern for a given scenario. Patterns are limited to those documented in the book - Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). Design Patterns: Elements of Reusable Object-Oriented Software and are named using the names given in that book.
Select from a list the benefits and drawbacks of a pattern drawn from the book - Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). Design Patterns: Elements of Reusable Object-Oriented Software.
Select from a list the benefits and drawbacks of a specified Core J2EE pattern drawn from the book - Alur, Crupi and Malks (2003). Core J2EE Patterns: Best Practices and Design Strategies 2nd Edition.



Hence my suggestion is go thru the exam topics and be clear on those rather covering few design pattern books :-)
Hi All,

is there any public web services with https (SSL) , this is require mainly for testing purpose.

Regards,

Sankar.S
10 years ago
Hi,

I am also facing the same problem in WebLogic Server. The message consumed successfully, but still lying on the queue.

Is there any way to configure in weblogic server that the message redelivery count more than one, then want to redirect to Error Queue (another queue in the same application server)? Can you please suggest?


thank you for the reply, can you please suggest some good books or good site which explain each pattern with either Real time or Real life example.
Hello Friends,

Is there any site/books which explain each design pattern with real time (Real life) example?

I have gone thru some sites and most of them giving explanation technical point of view (like Observer class etc).

In real time where are we using those patterns..
Hi,

We had the same kind of requirement, we use to print the server details in log file itself. However we were using WAS 6.1 App Server, and WAS 6.1 provide some lib to get the server details.

In simple way, you can add/print the server details in request listener itself, using request.getLocalName() or InetAddress.getLocalHost().getHostName()
11 years ago
Hi,

We have RestFul web application, where we are using GlobalApplicationSession HASHMAP from singleton class(SessionSingleTon) to maintain user's session.

Example, whenever users send first request, we will store userObjects(its an instance with xyz properties) in GlobalApplicationSession map

GlobalApplicationSession.put(userid,userObjects);


The same users send a request(2nd, 3rd time) again, we will check GlobalApplicationSession map whether the userid exists, if it exists then we will get some details (from the previous session) and process the curent request.

exmaple to get previous session details.

GlobalApplicationSession.get(userid)


The question is, how can we handle if the application deployed in more than one server(tomcat) using clustered and loadbalancer.


Example:

first time, user1 sends request1 and load balancer direct the request to server1. The userObjects(its an instance with xyz properties) will be stored in GlobalApplicationSession hashmap which is available in server1

2nd time, user1 sends request2 and LOAD BALANCER DIRECT THE REQUEST TO SERVER2, now GlobalApplicationSession (in server2) will not have any userObjects.

How to handle this? can anyone explain?
11 years ago
Hi,

I was going through Payload Extractor pattern in Real World Java EE Patterns Rethinking Best Practices Adam Bien Book, the following code found.

MDB Bean class:



PayLoad Extractor Class:



the question is Logic of Payload extractor (extracting messages and invoke consume method) can be done in onMessage method itself. What is the use of this pattern?, i dont find any value added using this approach, can anyone please explain better?
Have you tried with @XMLRootElement annotation in RequestData.java class?
11 years ago
Hi,

We require wlfullclient-10.x.jar file in our web application(deployed in Tomcat) to invoke some external services which deployed in web logic server.

The problem is wlfullclient jar has servlet related class, hence tomcat server excludes this jar while deploying the app, but we need this jar since we are using other classes available in wlfullclient jar.

How can resolve this issue?
11 years ago