Tag Archives: J2EE

Session Timeout Handling on JSF AJAX request


via Programming Peacefully: Session Timeout Handling on JSF AJAX request.

When we develop JSF application with AJAX behaviour, we may experience the problem in handling timeout scenario of Ajax request. For example, if you are using J2EE Form-based authentication, a normal request should be redirected to the login page after session timeout. However, if your request is AJAX, the response could not be treated properly on the client-side. User will remain on the same page and does not aware that the session is expired.

Many people proposed solution for this issue. The followings are two of possible solutions involve the use of Spring security framework:
1. Oleg Varaksin’s post
2. Spring Security 3 and ICEfaces 3 Tutorial

Java Messaging – P1


In this topic, we will share with you some basic concept of java message (producer, consumer, topic, queue, administered object. When we talk about messaging, we mean loosely coupled (the provider doesn’t know who is at the other end) asynchronous communication between components. enables the exchange of messages asynchronously between heterogeneous system. It can be […]

https://ngthphat.wordpress.com/2015/05/24/java-messaging-p1/

How To Set up Cookies With Servlet


Talk is cheap. Show me the code. ~ Linus Torvalds A browser cookie is a small piece of data sent from website and stored in user’s web browser while the user is browsing a given website. Every time user loads the website, browser sends the cookie back to the server to notify the website of […]

http://henrymbuguakiarie.com/2015/07/22/how-to-set-up-cookies-with-servlet/

Available Resource: Technical Program Manager


Click to Download resume/ C.V

Pavan Kumar Vangala is a Technical Program Manager has 15 YEARS of IT Industry experience and 15 years of relevant experience. His current location is Gurgaon, India and he is willing to relocate anywhere in USA and Canada. His area of expertise are Program Management, Agile(scrum), Java, J2EE, Spring, Web Services (RESTFUL), eMatrix, Savvion. He is holding B1 Visa and looking out for sponsorship. He is available with in 2 Months. If interested please E-mail him at pvangala77@gmail.com or call him at +91-9866016250

Message Security Layer


.idea Add IntelliJ IDEA project files. 3 months ago
.settings Merge branch ‘BurpExtender’ 11 days ago
src Fixing bug in MslControl.js, SynchronizedClock#getTime. Now using thi… 2 days ago
.classpath Remove duplicate examples build path from Eclipse project. 8 days ago
.gitignore Add test-output to .gitignore. 12 days ago
.project Add Gradle build files and Eclipse Gradle integration. 20 days ago
README.md Add mention of external review. 23 hours ago
build.gradle Burp example requires the test classes to compile. 8 days ago
findbugs-exclude.xml Exclude charset findbugs from Burp code; there is no way to extract t… 8 days ago
java2js_regexes.rtf Initial commit of Java and JavaScript MSL stacks and unit tests. 4 months ago
msl.iml Integration Tests 18 days ago
overview-public.html Point Javadoc overview HTML to GitHub documentation. a month ago
overview.html Point Javadoc overview HTML to GitHub documentation. a month ago
settings.gradle Add Gradle build files and Eclipse Gradle integration. 20 days ago

Message Security Layer (MSL) is an extensible and flexible secure messaging protocol that can be used to transport data between two or more communicating entities. Data may also be associated with specific users, and treated as confidential or non-replayable if so desired.

Documentation

The MSL Protocol provides a complete description of the protocol and implementation requirements. TheConfiguration Guide presents some common client and server MSL configurations. The protocol and configuration guide were reviewed by an external security firm. No issues were identified.

The set of public interfaces and classes an application must implement and use is documented in thePublic Javadoc. Documentation on all of the code, including internal classes and private methods, can be found in the full Javadoc.

For questions and support please contact Wesley Miaw directly. Bugs and feature requests should be filed in the Issue Tracker.

Third-Party Libraries

The Java MSL code base requires the org.json and Bouncy Castle libraries. The unit tests require JUnit 4and the integration tests require TestNG.

The JavaScript MSL code base includes some third-party libraries within the lib/ directory, most notably the Clarinet parser. The jsrsasign and crypto-js libraries are currently included but are planned for removal.

All third-party libraries are subject to their respective license agreements.

Getting Started

To build an application that uses MSL for communication, you must read through and understand the MSL Protocol. This is necessary because unlike other security protocols and libraries, you must make choices about how to secure your communication and authenticate your entities and users. The Configuration Guide can help you make those decisions.

The application interface to the MSL stack is MslControl. The application configuration for a single MSL network is an instance of MslContext. Your application may participate in multiple MSL networks and therefore have multiple instances of MslContext but only one MslControl should be used. Message-specific configuration, such as the user or security properties of that message, are specified in individual instances of MessageContext.

Java

The Java MSL code base includes project files for Eclipse and IntelliJ IDEA.

An example server is provided under src/examples/java/server/. The Eclipse project is a web project that can be deployed onto a Tomcat server. The example server is a J2EE servlet that will respond to requests from the example JavaScript client. The example server MSL configuration is specific to this server and should not be used to configure your application, but it can be used as the basis for doing so.

You may need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files to use cryptographic keys above a certain size.

JavaScript

The JavaScript MSL code base assumes a JavaScript execution environment that supports the latestWeb Crypto API specification. If you are using a web browser you may need to enable experimental features or feature flags to enable Web Crypto.

  • Chrome Browser 37+
    For earlier versions: chrome://flags/#enable-experimental-web-platform-features
    On Linux libnss 3.16.2+ must be separately installed.
  • Firefox 34+
    For earlier versions: about:config dom.webcrypto.enabled
  • Internet Explorer 11+
  • Safari 8+

Your browser may not support all Web Crypto API algorithms, key sizes, and features. If you encounter a problem with a Web Crypto operation please check the release notes for your browser version to determine if it supports what you are trying to do.

To include the JavaScript MSL stack in your JavaScript application you must include all of the MSL JavaScript source files required by your MSL configuration. An example list of the required source files can be found in src/test/javascript/msltests.html.

An example client is provided under src/examples/javascript/client/. The example client is a web page that will send requests to the example Java server. The example client MSL configuration is specific to this client and should not be used to configure your appplication, but it can be used as the basis for doing so.

LICENSE

Copyright 2014 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Java Tech lead opening in Sacramento, CA.


Role     : Java Tech lead
Location: Sacramento, CA

Note: We can do CTC, W2 Contract or Full-Time. We can also do H1 Transfer.

About ProKarma
ProKarma delivers integrated technology and business process outsourcing solutions for over 150 global leaders in a wide range of industries and markets. ProKarma is co-headquartered in Portland, Oregon., and Omaha, Nebraska., with sales and delivery centers in the United States, India, Argentina and Peru. ProKarma was selected as a Global Services 100 Provider for 2012 and 2013 and ranked as the fastest-growing IT services company in America by Inc. 500. For more information, visit http://www.prokarma.com

Roles & Responsibilities:
• Experience utilizing Java J2EE platform to design, implement, and deploy scalable fault tolerant applications on JBoss Fuse Platform
• Experience developing a System Architecture Document.
• Experience developing design patterns for clustered high availability applications/reusable & scalable objects/optimized data retrieval and storage/efficient code and non-blocking multi-threaded applications.
• Experience providing Web Service design using Representational State Transfer (REST) and Simple Object Access Protocol (SOAP).
• Experience performing Audit Java Security, Authentication, and Authorization of application.
• Experience auditing Java performance a tuning of existing applications
• Experience providing JBoss Fuse Platform diagnostic and troubleshooting ability.
• Experience identifying existing issues and pro-actively recommend solutions for upcoming issues.
• Experience optimizing Hardware Load Balancing when integrated with JBoss Fuse clustering and load balancing.
• Experience providing subject matter expertise through a detailed knowledge of Java, UNIX/LINUX environment from a system administration and development point of view and may be in form of knowledge transfer or more formal training.
• Experience optimizing operating system for high performance multi-threaded applications that require high CPU and network usage and shall diagnose and triage issues with such systems.
• Experience in designing topology for Application Server cluster farm

Knowledge and skills needed:
• Good understanding of J2EE technologies
• Ability to balance multiple projects and priorities
• Innovative, independent, self-motivated, and able to work under tight deadlines
• Strong problem solving, troubleshooting, planning, and organizational skills
• Hands-on lead capable of executing strongly both as an individual contributor and a team lead
• Proven sense of high accountability and self-drive to take on and see through challenges

Skills Preferred:
• Knowledge with JBoss Application Server
• Certification with JBoss Fuse
• Unix shell scripting

Qualifications:
• B.S. degree in Information Technology or other technical discipline

ProKarma
Dinesh Ram Kali.
Human Resource Associate| National Staffing|
Direct: +1 (402) 905 9212
222 South 15th Street, Suite 505N, Omaha, NE 68102
E-Mail: kdinesh@prokarma.com
Follow: Dineshramitc.wordpress.com

Introducing SpringBoot


Introducing SpringBoot

SpringBoot…there is a lot of buzz about SpringBoot nowadays. So what is SpringBoot?

SpringBoot is a new spring portfolio project which takes opinionated view of building production-ready Spring applications by drastically reducing the amount of configuration required. Spring Boot is taking the convention over configuration style to the next level by registering the default configurations automatically based on the classpath libraries available at runtime.

Well.. you might have already read this kind of introduction to SpringBoot on many blogs. So let me elaborate on what SpringBoot is and how it helps developing Spring applications more quickly.

Spring framework was created by Rod Johnson when many of the Java developers are struggling with EJB 1.x/2.x for building enterprise applications. Spring framework makes developing the business components easy by using Dependency Injection and Aspect Oriented Programming concepts. Spring became very popular and many more Spring modules like SpringSecurity, Spring Batch, Spring Data etc become part of Spring portfolio. As more and more features added to Spring, configuring all the spring modules and their dependencies become a tedious task. Adding to that Spring provides atleast 3 ways of doing anything :-). Some people see it as flexibility and some others see it as confusing.

Slowly, configuring all the Spring modules to work together became a big challenge. Spring team came up with many approaches to reduce the amount of configuration needed by introducing Spring XML DSLs, Annotations and JavaConfig.

In the very beginning I remember configuring a big pile of jar version declarations in <properties> section and lot of <dependency> declarations. Then I learned creating maven archetypes with basic structure and minimum required configurations. This reduced lot of repetitive work, but not eliminated completely.

Whether you write the configuration by hand or generate by some automated ways, if there is code that you can see then you have to maintain it.

So whether you use XML or Annotations or JavaConfig, you still need to configure(copy-paste) the same infrastructure setup one more time.

On the other hand, J2EE (which is dead long time ago) emerged as JavaEE and since JavaEE6 it became easy (compared to J2EE and JavaEE5) to develop enterprise applications using JavaEE platform.

Also JavaEE7 released with all the cool CDI, WebSockets, Batch, JSON support etc things became even more simple and powerful as well. With JavaEE you don’t need so much XML configuration and your war file size will be in KBs (really??? for non-helloworld/non-stageshow apps also :-)).

Naturally this “convention over configuration” and “you no need to glue APIs together yourself, JavaEE appServer already did it” arguments became the main selling points for JavaEE over Spring. Then Spring team addresses this problem with SpringBoot :-).

Now its time to JavaEE to show whats the SpringBoot’s counterpart in JavaEE land 🙂 JBoss Forge?? I love this Spring vs JavaEE thing which leads to the birth of powerful tools which ultimately simplify the developers life 🙂.

Many times we need similar kind of infrastructure setup using same libraries. For example, take a web application where you map DispatcherServlet url-pattern to “/”, implement RESTFul webservices using Jackson JSON library with Spring Data JPA backend. Similarly there could be batch or spring integration applications which needs similar infrastructure configuration.

SpringBoot to the rescue. SpringBoot look at the jar files available to the runtime classpath and register the beans for you with sensible defaults which can be overridden with explicit settings. Also SpringBoot configure those beans only when the jars files available and you haven’t define any such type of bean. Altogether SpringBoot provides common infrastructure without requiring any explicit configuration but lets the developer overrides if needed.

To make things more simpler, SpringBoot team provides many starter projects which are pre-configured with commonly used dependencies. For example Spring Data JPA starter project comes with JPA 2.x with Hibernate implementation along with Spring Data JPA infrastructure setup. Spring Web starter comes with Spring WebMVC, Embedded Tomcat, Jackson JSON, Logback setup.

Aaah..enough theory..lets jump onto coding.

I am using latest STS-3.5.1 IDE which provides many more starter project options like Facebbok, Twitter, Solr etc than its earlier version.

Create a SpringBoot starter project by going to File -> New -> Spring Starter Project -> select Web and Actuator and provide the other required details and Finish.

This will create a Spring Starter Web project with the following pom.xml and Application.java – See more at: http://www.sivalabs.in/2014/07/springboot-introducing-springboot.html#sthash.nJv6abuU.dpuf