Blog

Simple JCache Example (JSR-107)

May 31, 2017. | By: digvijayb

JCache is a common API for using caching in Java. Specifies API and semantics for temporary, in memory caching of Java objects, including object creation, shared access, spooling, invalidation, and consistency across JVM’s.

Caching is something that everyone has implemented in there app. There are n numbers of services and system available from just a simple Concurrent Map implementation to all the way to caching servers like Redis and memcache. Each cache provider have distinct api to use. JCache provide a standard set of API to implement caching in your app. JCache is based on JSR-107, JSR was submitted in year 2001 and finally released on 18 Mar 2014.

JCache is just like Jdbc but for caching provider rather then database. Jdbc is comman api interact with any database, JCache is to interact with caching providers.

List of JCache Providers

  • Apache Ignite
  • Blazing Cache
  • cache2k
  • Caffeine
  • Coherence
  • Ehcache

[Read More]

Building Server with Undertow

Jan 11, 2017. | By: digvijayb

Undertow is a flexible performant web server written in java, provid blocking and non-blocking api. It can also embeded in your app can ship it prod with no problem. Now it is also becoming the hot choice for mircoservice deployment.

Undertow is extremely lightweight, with the Undertow core jar coming in at under 1Mb. It is lightweight at runtime too, with a simple embedded server using less than 4Mb of heap space

Key Feature

  • Lightweight
  • Support HTTP Upgrade (multiplexed over the HTTP port)
  • Support Web Socket
  • Servlet 3.1
  • Embeddable

[Read More]

Create Minimal Jetty Server

Jan 9, 2017. | By: digvijayb

Jetty is java servlet container developed by Eclipse Foundation and it has such small footprint that you can embedded it in you java app or can use as test server alternative to any web server like tomcat. All by writting small main class of just over of 10 line.

Jetty is used in a wide variety of projects and products, both in development and production. Jetty can be easily embedded in devices, tools, frameworks, application servers, and clusters.

[Read More]

Spring REST OAuth with Stormpath

Dec 2, 2016. | By: digvijayb

User or Identity management is most important and critical part of an application any minor loophole can be exploited by Hacker. Its big challenge and hassle for a developer to secure and maintain his application. Stormpath provides an ecosystem for user management, authentication and authorization for your application. As their tagline says “Never Build Auth Again” that mean developer don’t have to worry to build auth system to secure and maintain.

This post shows you how to use Stormpath Auth system with Spring Boot app. To get started we need put all the following dependency in our pom.xml

[Read More]

Increase JVM Size In WebSphere Application Server (WAS)

Nov 6, 2016. | By: digvijayb

How to increase JVM Memory Size in WebSphere Application Server (WAS).

Server getting very slow and hanging up a lot sometime ending up by “java.lang.OutOfMemory” error frequently while deploying or republishing J2EE Web application in WebSphere Application Server.

Today, I’ll telling how to set initial heap size and maximum heap size of JVM. that can solve these issues So to do so start your WAS first. then After the server has been started run the admin console from the IDE I am using IBM RSA(Rational Software Architect for WebSphere) you could be use whatever you like.

[Read More]

Web Service Jargon (JAX-WS)

Sep 17, 2016. | By: digvijayb

Web Service is web app which offer intersystem commutation between one electronic device to another electronic device over World Wide Web by using HTTP (Hyper Text Transfer Protocol). Web Service can be written in enterprise and high level language like Java and C#. And other hand client of this web service could be embedded program written in C or any other embedded language of your house hold refrigerator connected to internet.

Web services may use SOAP over HTTP protocol, allowing less costly interactions over the Internet than via proprietary solutions like EDI/B2B

The Java API for XML Web Services (JAX-WS) is a Java programming language API for creating web services, particularly SOAP services. JAX-WS is one of the Java XML programming APIs. It is part of the Java EE platform.

[Read More]

Spring Annotations

Aug 15, 2016. | By: digvijayb

The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform. A key element of Spring is infrastructural support at the application level: Spring focuses on the “plumbing” of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.

Features

  • Dependency Injection
  • Aspect-Oriented Programming including Spring’s declarative transaction management
  • Spring MVC web application and RESTful web service framework-
  • Foundational support for JDBC, JPA, JMS

Spring app is generally configured by XML based file but with release of spring 2.5 we saw the introduction of annotation in spring framework. Now spring app can be configured by annotation, no need to have a spring-context.xml (the XML file used by bean factory for initialisation of beans).

[Read More]

7 Easy Steps to Moving Wordpress site to live server from Local

Jul 15, 2016. | By: digvijayb

How to move a wordpress blog from localhost to live server (or web server).

Install or Move your wordpress blog to live host in 7 Easy Step

It always had been a pain for a developer to migrate project from one environment to another and with php and static web site which can’t be bundle it like war, dll and exe.

3 years back I use to be a freelance web developer, primarily working with wordpress. When I use complete project and hand it over to client I have sit long hour and support them over remote and phone to make there site live and client don’t want to share there live credential with a freelance(why would they anyway). Then wrote this post and use to give them this doc.

Now there are better way to do this like docker and other. But with small business manually migrating website is the only way.

Step 1. At your hosting server install wordpress. I am using my cpanel godady.

Click on wordpress and follow simple steps to installs

Now wordpress ready with default theme and with Hello Post.

[Read More]

Python3 vs Python2

Jul 15, 2016. | By: digvijayb

Python is general-purpose dynamic programming language desgined by Guido van Rossum. Which support multiple programming paradigm like object oriented, imperative, functional and others but it considered as one of the main stream functional programming language as it extensive use in functional world. If you are new to python you find people working of different version of python which parallely maintanied. As now 15 july 2016 there are two different stable vision of python are avaliable. 3.5.2 and 2.7.12. 3.5.2 is not at all compatible with 2.7.12 there are even minor syntax differences. So this we will focus on find the differences between the two favour of python.

[Read More]

Era of JVM language

May 22, 2016. | By: digvijayb

Java is computer programming language with multi-paradigm of programming Object-oriented, structured, imperative, concurrent and others desgined and created by James Glosling and his team at Sun microsystems. Released in 1995 with its promised “Write Once, Run Anywhere” now after 21 years of initial reslease in 2016 Java is one of the most popular programming languages in use particularly for client-server web applications, with a reported 9 million developers.

[Read More]

Subscribe & Social

Subscribe to this blog via RSS.

Recent Posts

Categories

Java 13

Python 2

Wordpress 1

Ops 3

Shared 3

Angular 1

Web 1

Popular Tags

Java (13) Python (2) Wordpress (1) Ops (3) Angular (1) Web (1)

About

DGStack is web blog by digvijay bhakuni. This blog is about computer programming tips and trick. And some short tutorial and gettings started post about the framework, libriay, api and much more. The blog target mostly open source stuff like java, j2ee, nodeJs, angularJs, spring, struts, mongodb, mean, etc

Disclamer

This website claims no credit for any images posted on this site unless otherwise noted. Images on this blog are copyright to its respectful owners. If there is an image appearing on this blog that belongs to you and do not wish for it appear on this site, please E-mail with a link to said image and it will be promptly removed. And the information is best of my knowledge one can always write comment or mail regarding information is this blog.