Java articles, how-to's, examples and tutorials - byteslounge.com

Are you over 18 and want to see adult content?

4

More Annotations

B2B Marketing - Strategic Boutique - Content Agency - Renegade

B2B Marketing - Strategic Boutique - Content Agency - Renegade

renegade.com
Profile Image
Bella Mccoy
2020-05-31 08:11:01
B2B Marketing - Strategic Boutique - Content Agency - Renegade

B2B Marketing - Strategic Boutique - Content Agency - Renegade

renegade.com

Are you over 18 and want to see adult content?

七牛云 - 国内领先的企业级云服务商

七牛云 - 国内领先的企业级云服务商

qiniu.com
Profile Image
Bella Mccoy
2020-05-31 08:11:39
七牛云 - 国内领先的企业级云服务商

七牛云 - 国内领先的企业级云服务商

qiniu.com

Are you over 18 and want to see adult content?

Travel Kids - Znajdź idealną kolonię lub półkolonię dla swojego dziecka!

Travel Kids - Znajdź idealną kolonię lub półkolonię dla swojego dziecka!

travelkids.pl
Profile Image
Bella Mccoy
2020-05-31 08:11:55
Travel Kids - Znajdź idealną kolonię lub półkolonię dla swojego dziecka!

Travel Kids - Znajdź idealną kolonię lub półkolonię dla swojego dziecka!

travelkids.pl

Are you over 18 and want to see adult content?

«Враг Капитала» (1917.com)

«Враг Капитала» (1917.com)

1917.com
Profile Image
Bella Mccoy
2020-05-31 08:12:17
«Враг Капитала» (1917.com)

«Враг Капитала» (1917.com)

1917.com

Are you over 18 and want to see adult content?

climate4you welcome

climate4you welcome

climate4you.com
Profile Image
Bella Mccoy
2020-05-31 08:12:34
climate4you welcome

climate4you welcome

climate4you.com

Are you over 18 and want to see adult content?

Недвижимость в России на продажу и в аренду на Росриэлте

Недвижимость в России на продажу и в аренду на Росриэлте

rosrealt.ru
Profile Image
Bella Mccoy
2020-05-31 08:12:54
Недвижимость в России на продажу и в аренду на Росриэлте

Недвижимость в России на продажу и в аренду на Росриэлте

rosrealt.ru

Are you over 18 and want to see adult content?

4
Stupid Studio

Stupid Studio

stupid-studio.com
Profile Image
Bella Mccoy
2020-05-31 08:13:34
Stupid Studio

Stupid Studio

stupid-studio.com

Are you over 18 and want to see adult content?

Buy Dapoxetine 30mg, 60 Mg Tablets Online

Buy Dapoxetine 30mg, 60 Mg Tablets Online

dapoxetine2.com
Profile Image
Bella Mccoy
2020-05-31 08:13:58
Buy Dapoxetine 30mg, 60 Mg Tablets Online

Buy Dapoxetine 30mg, 60 Mg Tablets Online

dapoxetine2.com

Are you over 18 and want to see adult content?

The Web's Favorite Online Graphic Design Tool - Stencil

The Web's Favorite Online Graphic Design Tool - Stencil

getstencil.com
Profile Image
Bella Mccoy
2020-05-31 08:14:19
The Web's Favorite Online Graphic Design Tool - Stencil

The Web's Favorite Online Graphic Design Tool - Stencil

getstencil.com

Are you over 18 and want to see adult content?

Beanyblogger.com

Beanyblogger.com

beanyblogger.com
Profile Image
Bella Mccoy
2020-05-31 08:14:52
Beanyblogger.com

Beanyblogger.com

beanyblogger.com

Are you over 18 and want to see adult content?

Froum Mekol – Diskusi Informasi

Froum Mekol – Diskusi Informasi

forumekol.com
Profile Image
Bella Mccoy
2020-05-31 08:15:10
Froum Mekol – Diskusi Informasi

Froum Mekol – Diskusi Informasi

forumekol.com

Are you over 18 and want to see adult content?

Wisdom of the Heavens, Earth, Body, Mind & Soul

Wisdom of the Heavens, Earth, Body, Mind & Soul

wisdom-magazine.com
Profile Image
Bella Mccoy
2020-05-31 08:15:22
Wisdom of the Heavens, Earth, Body, Mind & Soul

Wisdom of the Heavens, Earth, Body, Mind & Soul

wisdom-magazine.com

Are you over 18 and want to see adult content?

5

Favourite Annotations

Royal Palm Properties - RPYCC Real Estate - Boca Raton

Royal Palm Properties - RPYCC Real Estate - Boca Raton

royalpalm.com
Profile Image
Bella Mccoy
2019-10-08 19:24:00
Royal Palm Properties - RPYCC Real Estate - Boca Raton

Royal Palm Properties - RPYCC Real Estate - Boca Raton

royalpalm.com

Are you over 18 and want to see adult content?

SNH48杨冰怡补档站

SNH48杨冰怡补档站

suisui.stream
Profile Image
Bella Mccoy
2019-10-08 19:24:05
SNH48杨冰怡补档站

SNH48杨冰怡补档站

suisui.stream

Are you over 18 and want to see adult content?

Weight Loss & Bodybuilding Supplements For Sale Online - TF Supplements

Weight Loss & Bodybuilding Supplements For Sale Online - TF Supplements

tfsupplements.com
Profile Image
Bella Mccoy
2019-10-08 19:24:30
Weight Loss & Bodybuilding Supplements For Sale Online - TF Supplements

Weight Loss & Bodybuilding Supplements For Sale Online - TF Supplements

tfsupplements.com

Are you over 18 and want to see adult content?

Foxwoods HighFlyer - Zip Lining in CT

Foxwoods HighFlyer - Zip Lining in CT

foxwoodshighflyer.com
Profile Image
Bella Mccoy
2019-10-08 19:24:47
Foxwoods HighFlyer - Zip Lining in CT

Foxwoods HighFlyer - Zip Lining in CT

foxwoodshighflyer.com

Are you over 18 and want to see adult content?

Maurizio Collection Store - Shop Online Fashion Designers

Maurizio Collection Store - Shop Online Fashion Designers

mauriziocollectionstore.com
Profile Image
Bella Mccoy
2019-10-08 19:24:57
Maurizio Collection Store - Shop Online Fashion Designers

Maurizio Collection Store - Shop Online Fashion Designers

mauriziocollectionstore.com

Are you over 18 and want to see adult content?

Deutsche Gesellschaft pro Naturheilkunde e.V.

Deutsche Gesellschaft pro Naturheilkunde e.V.

pronaturheilkunde.eu
Profile Image
Bella Mccoy
2019-10-08 19:25:12
Deutsche Gesellschaft pro Naturheilkunde e.V.

Deutsche Gesellschaft pro Naturheilkunde e.V.

pronaturheilkunde.eu

Are you over 18 and want to see adult content?

3
Онлайн магазин за оригинални парфюми и козметика за коса - angelcosmetics.bg

Онлайн магазин за оригинални парфюми и козметика за коса - angelcosmetics.bg

angelcosmetics.bg
Profile Image
Bella Mccoy
2019-10-08 19:25:29
Онлайн магазин за оригинални парфюми и козметика за коса - angelcosmetics.bg

Онлайн магазин за оригинални парфюми и козметика за коса - angelcosmetics.bg

angelcosmetics.bg

Are you over 18 and want to see adult content?

Value Plus i-Services - Υπηρεσίες Πληροφορικής - Ιστοσελίδες - Eshops - Γραφικά - Social

Value Plus i-Services - Υπηρεσίες Πληροφορικής - Ιστοσελίδες - Eshops - Γραφικά - Social

valueplusis.com
Profile Image
Bella Mccoy
2019-10-08 19:25:59
Value Plus i-Services - Υπηρεσίες Πληροφορικής - Ιστοσελίδες - Eshops - Γραφικά - Social

Value Plus i-Services - Υπηρεσίες Πληροφορικής - Ιστοσελίδες - Eshops - Γραφικά - Social

valueplusis.com

Are you over 18 and want to see adult content?

Real Spell Casting - Witches Coven

Real Spell Casting - Witches Coven

realspellcasting.com
Profile Image
Bella Mccoy
2019-10-08 19:26:15
Real Spell Casting - Witches Coven

Real Spell Casting - Witches Coven

realspellcasting.com

Are you over 18 and want to see adult content?

- Magyar Sportlövők Szövetsége

- Magyar Sportlövők Szövetsége

hunshooting.hu
Profile Image
Bella Mccoy
2019-10-08 19:26:59
- Magyar Sportlövők Szövetsége

- Magyar Sportlövők Szövetsége

hunshooting.hu

Are you over 18 and want to see adult content?

Распечатай и играй

Распечатай и играй

printgames.ru
Profile Image
Bella Mccoy
2019-10-08 19:27:10
Распечатай и играй

Распечатай и играй

printgames.ru

Are you over 18 and want to see adult content?

首页-锦皓旗舰店-天猫Tmall.com

首页-锦皓旗舰店-天猫Tmall.com

jinhao.tmall.com
Profile Image
Bella Mccoy
2019-10-08 19:27:30
首页-锦皓旗舰店-天猫Tmall.com

首页-锦皓旗舰店-天猫Tmall.com

jinhao.tmall.com

Are you over 18 and want to see adult content?

1

Text

JAVA EE CDI BEAN SCOPES The scope in which the bean is initialized will determine its lifecycle. CDI provides the following bean scopes: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean

the container will

LOCKING IN JPA (LOCKMODETYPE) Optimistic locking for writing operations is used implicitly by the JPA provider. When the provider is persisting an entity that has been optimistically locked, it will compare the current entity version (@Version entity field) with the version of that record that is stored

in the database.

JAVA SYNCHRONIZED EXAMPLE synchronized example. In this scenario we have a synchronized counter. Distinct threads will not execute any synchronized method at the same time so we make sure that the counter will remain consistent. Writes to the counter will never be executed concurrently by distinct threads so it will be kept in a consistent state. JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI Producer methods tutorial. 27 April 2013. By Gonçalo Marques. cdi java java-ee. In this tutorial you will learn how to use CDI Producer methods in order to provide a flexible bean initialization mechanism. Concepts like polymorphism, disambiguation and CDI scopes will also be discussed as we proceed in the tutorial. SPRING TRANSACTION ISOLATION LEVEL TUTORIAL Transaction isolation level is a concept that is not exclusive to the Spring framework. It is applied to transactions in general and is directly related with the ACID transaction properties. Isolation level defines how the changes made to some data repository by one transaction affect other simultaneous concurrent transactions, and

also how and

SPRING WITH HIBERNATE PERSISTENCE AND TRANSACTIONS EXAMPLE Introduction. After reading this tutorial you will be able to implement Hibernate persistence using Spring framework. Additionally you will also use Spring Hibernate transaction manager to manage all the transactional boilerplate code and wiring for you. ANDROID HEADER AND FOOTER LAYOUT EXAMPLE Components reuse is an essential concept when we design an application's User Interface. Android applications are no exception to this rule. In this tutorial we will create an Android activity composed by three major sections (or components): Header, Footer and

Content.

SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLE The @RequestMapping annotation is used to configure the rules that will determine which method will be chosen by Spring MVC to handle certain types of HTTP requests. The value parameter determines the request URL pattern that will be used to match and choose a certain method to handle the request. We define value as /test so this means

that

LOCK CONDITIONS IN JAVA One of the main advantages of using the Condition interface in favor of the traditional monitor methods is the ability of using multiple wait condition sets: Lock lock = new ReentrantLock(); Condition conditionA = this.lock.newCondition(); Condition conditionB = this.lock.newCondition(); This gives us the ability of waking up only

a single set

JSF COMPOSITE COMPONENT EXAMPLE JSF provides all the required infrastructure for creating composite components. These components may be defined using only XML, only Java, or a combination of both, depending on the complexity of the desired funcionality. Composite components may also be packaged in a library file (JAR) and be reused across multiple application if they are JAVA EE CDI BEAN SCOPES The scope in which the bean is initialized will determine its lifecycle. CDI provides the following bean scopes: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean

the container will

LOCKING IN JPA (LOCKMODETYPE) Optimistic locking for writing operations is used implicitly by the JPA provider. When the provider is persisting an entity that has been optimistically locked, it will compare the current entity version (@Version entity field) with the version of that record that is stored

in the database.

JAVA SYNCHRONIZED EXAMPLE synchronized example. In this scenario we have a synchronized counter. Distinct threads will not execute any synchronized method at the same time so we make sure that the counter will remain consistent. Writes to the counter will never be executed concurrently by distinct threads so it will be kept in a consistent state. JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI Producer methods tutorial. 27 April 2013. By Gonçalo Marques. cdi java java-ee. In this tutorial you will learn how to use CDI Producer methods in order to provide a flexible bean initialization mechanism. Concepts like polymorphism, disambiguation and CDI scopes will also be discussed as we proceed in the tutorial. SPRING TRANSACTION ISOLATION LEVEL TUTORIAL Transaction isolation level is a concept that is not exclusive to the Spring framework. It is applied to transactions in general and is directly related with the ACID transaction properties. Isolation level defines how the changes made to some data repository by one transaction affect other simultaneous concurrent transactions, and

also how and

SPRING WITH HIBERNATE PERSISTENCE AND TRANSACTIONS EXAMPLE Introduction. After reading this tutorial you will be able to implement Hibernate persistence using Spring framework. Additionally you will also use Spring Hibernate transaction manager to manage all the transactional boilerplate code and wiring for you. ANDROID HEADER AND FOOTER LAYOUT EXAMPLE Components reuse is an essential concept when we design an application's User Interface. Android applications are no exception to this rule. In this tutorial we will create an Android activity composed by three major sections (or components): Header, Footer and

Content.

SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLE The @RequestMapping annotation is used to configure the rules that will determine which method will be chosen by Spring MVC to handle certain types of HTTP requests. The value parameter determines the request URL pattern that will be used to match and choose a certain method to handle the request. We define value as /test so this means

that

LOCK CONDITIONS IN JAVA One of the main advantages of using the Condition interface in favor of the traditional monitor methods is the ability of using multiple wait condition sets: Lock lock = new ReentrantLock(); Condition conditionA = this.lock.newCondition(); Condition conditionB = this.lock.newCondition(); This gives us the ability of waking up only

a single set

JSF COMPOSITE COMPONENT EXAMPLE JSF provides all the required infrastructure for creating composite components. These components may be defined using only XML, only Java, or a combination of both, depending on the complexity of the desired funcionality. Composite components may also be packaged in a library file (JAR) and be reused across multiple application if they are SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLE The @RequestMapping annotation is used to configure the rules that will determine which method will be chosen by Spring MVC to handle certain types of HTTP requests. The value parameter determines the request URL pattern that will be used to match and choose a certain method to handle the request. We define value as /test so this means

that

JSF PANELGRID EXAMPLE This is done intentionally in this example in order to illustrate how you may nest any components you need inside a panelGrid facet (actually this is valid for any facet contained in any JSF component that supports facets). The result is the following: panelGrid with facets. JSF dataTable example. JSF panelGroup example. JSF commandButton example. ANDROID HEADER AND FOOTER LAYOUT EXAMPLE Components reuse is an essential concept when we design an application's User Interface. Android applications are no exception to this rule. In this tutorial we will create an Android activity composed by three major sections (or components): Header, Footer and

Content.

SPRING TRANSACTION ISOLATION LEVEL TUTORIAL Transaction isolation level is a concept that is not exclusive to the Spring framework. It is applied to transactions in general and is directly related with the ACID transaction properties. Isolation level defines how the changes made to some data repository by one transaction affect other simultaneous concurrent transactions, and

also how and

SPRING WITH HIBERNATE PERSISTENCE AND TRANSACTIONS EXAMPLE Introduction. After reading this tutorial you will be able to implement Hibernate persistence using Spring framework. Additionally you will also use Spring Hibernate transaction manager to manage all the transactional boilerplate code and wiring for you. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all JAVA EE EJB INTERCEPTORS TUTORIAL AND EXAMPLE Interceptors - as the name states - are components that intercepts calls to EJB methods. They may be used - for example - to implement an auditing / logging system around calls to EJB. Another usage example may be to check if the client is authorized to call a given EJB method. Interceptors may be configured to intercept specific EJB

method

JSF COMPOSITE COMPONENT EXAMPLE JSF provides all the required infrastructure for creating composite components. These components may be defined using only XML, only Java, or a combination of both, depending on the complexity of the desired funcionality. Composite components may also be packaged in a library file (JAR) and be reused across multiple application if they are HOW TO CONFIGURE JSF IN TOMCAT EXAMPLE Since Tomcat is not a fully fledged Java EE container we must do some additional configuration steps in order to run JSF applications. In this tutorial we will see how to do it. This tutorial considers the following environment: Ubuntu 12.04. JDK 1.7.0.21. JSF 2.2.4. POSTFIX MAIL SERVER CONFIGURATION TUTORIAL Postfix is an open source MTA or SMTP server. In this tutorial we will deploy a very simple configuration of Postfix. We will see in other tutorials how we can deploy more complex configuration including user authentication, SSL and message signing. SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLEREQUESTMAPPING CONSUMESSPRING MVC REQUESTMAPPINGREQUESTMAPPING METHODSPRING

REQUESTMAPPING

The @RequestMapping annotation is used to configure the rules that will determine which method will be chosen by Spring MVC to handle certain types of HTTP requests. The value parameter determines the request URL pattern that will be used to match and choose a certain method to handle the request. We define value as /test so this means

that

POSTFIX MAIL SERVER CONFIGURATION TUTORIAL Postfix is an open source MTA or SMTP server. In this tutorial we will deploy a very simple configuration of Postfix. We will see in other tutorials how we can deploy more complex configuration including user authentication, SSL and message signing. JAVA SYNCHRONIZED EXAMPLE synchronized example. In this scenario we have a synchronized counter. Distinct threads will not execute any synchronized method at the same time so we make sure that the counter will remain consistent. Writes to the counter will never be executed concurrently by distinct threads so it will be kept in a consistent state. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all JAVA EE CDI DEPENDENCY INJECTION (@INJECT) TUTORIAL Java EE CDI makes primarily use of the @Inject annotation in order to perform Dependency Injection of managed beans into other container managed resources. In this tutorial we will cover the different available strategies to perform dependency injection in a CDI environment. This tutorial considers the following environment: JAVA EE CDI BEAN SCOPES The scope in which the bean is initialized will determine its lifecycle. CDI provides the following bean scopes: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean

the container will

JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI Producer methods tutorial. 27 April 2013. By Gonçalo Marques. cdi java java-ee. In this tutorial you will learn how to use CDI Producer methods in order to provide a flexible bean initialization mechanism. Concepts like polymorphism, disambiguation and CDI scopes will also be discussed as we proceed in the tutorial. POSTFIX + OPENDKIM (DKIM) CONFIGURATION EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. HOW TO ADD DEPENDENCIES TO A MAVEN PROJECT In this tutorial we will be adding Apache Commons Email library as a dependency to our Maven project. Start by opening your pom.xml file and add the Commons email dependency to the project. The groupId, artifactId and version to be used in the dependency element can be easily found in the online Maven global repository or in the official webpage of the dependency provider, ie Apache SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLEREQUESTMAPPING CONSUMESSPRING MVC REQUESTMAPPINGREQUESTMAPPING METHODSPRING

REQUESTMAPPING

The @RequestMapping annotation is used to configure the rules that will determine which method will be chosen by Spring MVC to handle certain types of HTTP requests. The value parameter determines the request URL pattern that will be used to match and choose a certain method to handle the request. We define value as /test so this means

that

POSTFIX MAIL SERVER CONFIGURATION TUTORIAL Postfix is an open source MTA or SMTP server. In this tutorial we will deploy a very simple configuration of Postfix. We will see in other tutorials how we can deploy more complex configuration including user authentication, SSL and message signing. JAVA SYNCHRONIZED EXAMPLE synchronized example. In this scenario we have a synchronized counter. Distinct threads will not execute any synchronized method at the same time so we make sure that the counter will remain consistent. Writes to the counter will never be executed concurrently by distinct threads so it will be kept in a consistent state. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all JAVA EE CDI DEPENDENCY INJECTION (@INJECT) TUTORIAL Java EE CDI makes primarily use of the @Inject annotation in order to perform Dependency Injection of managed beans into other container managed resources. In this tutorial we will cover the different available strategies to perform dependency injection in a CDI environment. This tutorial considers the following environment: JAVA EE CDI BEAN SCOPES The scope in which the bean is initialized will determine its lifecycle. CDI provides the following bean scopes: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean

the container will

JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI Producer methods tutorial. 27 April 2013. By Gonçalo Marques. cdi java java-ee. In this tutorial you will learn how to use CDI Producer methods in order to provide a flexible bean initialization mechanism. Concepts like polymorphism, disambiguation and CDI scopes will also be discussed as we proceed in the tutorial. POSTFIX + OPENDKIM (DKIM) CONFIGURATION EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. HOW TO ADD DEPENDENCIES TO A MAVEN PROJECT In this tutorial we will be adding Apache Commons Email library as a dependency to our Maven project. Start by opening your pom.xml file and add the Commons email dependency to the project. The groupId, artifactId and version to be used in the dependency element can be easily found in the online Maven global repository or in the official webpage of the dependency provider, ie Apache CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all SPRING TRANSACTION ISOLATION LEVEL TUTORIAL Transaction isolation level is a concept that is not exclusive to the Spring framework. It is applied to transactions in general and is directly related with the ACID transaction properties. Isolation level defines how the changes made to some data repository by one transaction affect other simultaneous concurrent transactions, and

also how and

JAAS AUTHENTICATION IN TOMCAT EXAMPLE One of the core concepts of JAAS is the existence of users and roles (roles are similar to groups in UNIX systems). Authorization may be issued to specific users or to roles.In JAAS this is concept is translated to Principals: Principals may represent users or roles independently. Let's define User and Role Principals to be used in

this example:

JSF COMPOSITE COMPONENT EXAMPLE JSF provides all the required infrastructure for creating composite components. These components may be defined using only XML, only Java, or a combination of both, depending on the complexity of the desired funcionality. Composite components may also be packaged in a library file (JAR) and be reused across multiple application if they are LOCKING IN JPA (LOCKMODETYPE) Optimistic locking for writing operations is used implicitly by the JPA provider. When the provider is persisting an entity that has been optimistically locked, it will compare the current entity version (@Version entity field) with the version of that record that is stored

in the database.

SPRING WITH HIBERNATE PERSISTENCE AND TRANSACTIONS EXAMPLE Introduction. After reading this tutorial you will be able to implement Hibernate persistence using Spring framework. Additionally you will also use Spring Hibernate transaction manager to manage all the transactional boilerplate code and wiring for you. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. JAVA EE EJB TRANSACTION PROPAGATION (@TRANSACTIONATTRIBUTE The @TransactionAttribute annotation may be used both at the type level and method level. When defined at the type level it states that all methods in a given EJB should have the declared transaction propagation behaviour. When applied to a single method, only that method will have that propagation behaviour, overriding the type level definition (if any). SPRING DEPENDENCY INJECTION WITH XML EXAMPLE The goal of this tutorial will be exactly the same of the tutorial Spring dependency injection example with the difference that this time we will define dependency injection in the Spring XML configuration file. We will skip the details and go directly to the Java classes definition. Check the mentioned tutorial for details just in case you need to review something. LOCK CONDITIONS IN JAVA One of the main advantages of using the Condition interface in favor of the traditional monitor methods is the ability of using multiple wait condition sets: Lock lock = new ReentrantLock(); Condition conditionA = this.lock.newCondition(); Condition conditionB = this.lock.newCondition(); This gives us the ability of waking up only

a single set

SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLEREQUESTMAPPING CONSUMESSPRING MVC REQUESTMAPPINGREQUESTMAPPING METHODSPRING

REQUESTMAPPING

The @RequestMapping annotation is used to configure the rules that will determine which method will be chosen by Spring MVC to handle certain types of HTTP requests. The value parameter determines the request URL pattern that will be used to match and choose a certain method to handle the request. We define value as /test so this means

that

POSTFIX MAIL SERVER CONFIGURATION TUTORIAL Postfix is an open source MTA or SMTP server. In this tutorial we will deploy a very simple configuration of Postfix. We will see in other tutorials how we can deploy more complex configuration including user authentication, SSL and message signing. JAVA SYNCHRONIZED EXAMPLE synchronized example. In this scenario we have a synchronized counter. Distinct threads will not execute any synchronized method at the same time so we make sure that the counter will remain consistent. Writes to the counter will never be executed concurrently by distinct threads so it will be kept in a consistent state. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all JAVA EE CDI DEPENDENCY INJECTION (@INJECT) TUTORIAL Java EE CDI makes primarily use of the @Inject annotation in order to perform Dependency Injection of managed beans into other container managed resources. In this tutorial we will cover the different available strategies to perform dependency injection in a CDI environment. This tutorial considers the following environment: JAVA EE CDI BEAN SCOPES The scope in which the bean is initialized will determine its lifecycle. CDI provides the following bean scopes: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean

the container will

JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI Producer methods tutorial. 27 April 2013. By Gonçalo Marques. cdi java java-ee. In this tutorial you will learn how to use CDI Producer methods in order to provide a flexible bean initialization mechanism. Concepts like polymorphism, disambiguation and CDI scopes will also be discussed as we proceed in the tutorial. POSTFIX + OPENDKIM (DKIM) CONFIGURATION EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. HOW TO ADD DEPENDENCIES TO A MAVEN PROJECT In this tutorial we will be adding Apache Commons Email library as a dependency to our Maven project. Start by opening your pom.xml file and add the Commons email dependency to the project. The groupId, artifactId and version to be used in the dependency element can be easily found in the online Maven global repository or in the official webpage of the dependency provider, ie Apache SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLEREQUESTMAPPING CONSUMESSPRING MVC REQUESTMAPPINGREQUESTMAPPING METHODSPRING

REQUESTMAPPING

The @RequestMapping annotation is used to configure the rules that will determine which method will be chosen by Spring MVC to handle certain types of HTTP requests. The value parameter determines the request URL pattern that will be used to match and choose a certain method to handle the request. We define value as /test so this means

that

POSTFIX MAIL SERVER CONFIGURATION TUTORIAL Postfix is an open source MTA or SMTP server. In this tutorial we will deploy a very simple configuration of Postfix. We will see in other tutorials how we can deploy more complex configuration including user authentication, SSL and message signing. JAVA SYNCHRONIZED EXAMPLE synchronized example. In this scenario we have a synchronized counter. Distinct threads will not execute any synchronized method at the same time so we make sure that the counter will remain consistent. Writes to the counter will never be executed concurrently by distinct threads so it will be kept in a consistent state. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all JAVA EE CDI DEPENDENCY INJECTION (@INJECT) TUTORIAL Java EE CDI makes primarily use of the @Inject annotation in order to perform Dependency Injection of managed beans into other container managed resources. In this tutorial we will cover the different available strategies to perform dependency injection in a CDI environment. This tutorial considers the following environment: JAVA EE CDI BEAN SCOPES The scope in which the bean is initialized will determine its lifecycle. CDI provides the following bean scopes: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean

the container will

JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI Producer methods tutorial. 27 April 2013. By Gonçalo Marques. cdi java java-ee. In this tutorial you will learn how to use CDI Producer methods in order to provide a flexible bean initialization mechanism. Concepts like polymorphism, disambiguation and CDI scopes will also be discussed as we proceed in the tutorial. POSTFIX + OPENDKIM (DKIM) CONFIGURATION EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. HOW TO ADD DEPENDENCIES TO A MAVEN PROJECT In this tutorial we will be adding Apache Commons Email library as a dependency to our Maven project. Start by opening your pom.xml file and add the Commons email dependency to the project. The groupId, artifactId and version to be used in the dependency element can be easily found in the online Maven global repository or in the official webpage of the dependency provider, ie Apache SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all SPRING TRANSACTION ISOLATION LEVEL TUTORIAL Transaction isolation level is a concept that is not exclusive to the Spring framework. It is applied to transactions in general and is directly related with the ACID transaction properties. Isolation level defines how the changes made to some data repository by one transaction affect other simultaneous concurrent transactions, and

also how and

JAAS AUTHENTICATION IN TOMCAT EXAMPLE One of the core concepts of JAAS is the existence of users and roles (roles are similar to groups in UNIX systems). Authorization may be issued to specific users or to roles.In JAAS this is concept is translated to Principals: Principals may represent users or roles independently. Let's define User and Role Principals to be used in

this example:

JSF COMPOSITE COMPONENT EXAMPLE JSF provides all the required infrastructure for creating composite components. These components may be defined using only XML, only Java, or a combination of both, depending on the complexity of the desired funcionality. Composite components may also be packaged in a library file (JAR) and be reused across multiple application if they are LOCKING IN JPA (LOCKMODETYPE) Optimistic locking for writing operations is used implicitly by the JPA provider. When the provider is persisting an entity that has been optimistically locked, it will compare the current entity version (@Version entity field) with the version of that record that is stored

in the database.

SPRING WITH HIBERNATE PERSISTENCE AND TRANSACTIONS EXAMPLE Introduction. After reading this tutorial you will be able to implement Hibernate persistence using Spring framework. Additionally you will also use Spring Hibernate transaction manager to manage all the transactional boilerplate code and wiring for you. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. JAVA EE EJB TRANSACTION PROPAGATION (@TRANSACTIONATTRIBUTE The @TransactionAttribute annotation may be used both at the type level and method level. When defined at the type level it states that all methods in a given EJB should have the declared transaction propagation behaviour. When applied to a single method, only that method will have that propagation behaviour, overriding the type level definition (if any). SPRING DEPENDENCY INJECTION WITH XML EXAMPLE The goal of this tutorial will be exactly the same of the tutorial Spring dependency injection example with the difference that this time we will define dependency injection in the Spring XML configuration file. We will skip the details and go directly to the Java classes definition. Check the mentioned tutorial for details just in case you need to review something. LOCK CONDITIONS IN JAVA One of the main advantages of using the Condition interface in favor of the traditional monitor methods is the ability of using multiple wait condition sets: Lock lock = new ReentrantLock(); Condition conditionA = this.lock.newCondition(); Condition conditionB = this.lock.newCondition(); This gives us the ability of waking up only

a single set

SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLEREQUESTMAPPING CONSUMESSPRING MVC REQUESTMAPPINGREQUESTMAPPING METHODSPRING

REQUESTMAPPING

The @RequestMapping annotation is used to configure the rules that will determine which method will be chosen by Spring MVC to handle certain types of HTTP requests. The value parameter determines the request URL pattern that will be used to match and choose a certain method to handle the request. We define value as /test so this means

that

POSTFIX MAIL SERVER CONFIGURATION TUTORIAL Postfix is an open source MTA or SMTP server. In this tutorial we will deploy a very simple configuration of Postfix. We will see in other tutorials how we can deploy more complex configuration including user authentication, SSL and message signing. JAVA SYNCHRONIZED EXAMPLE synchronized example. In this scenario we have a synchronized counter. Distinct threads will not execute any synchronized method at the same time so we make sure that the counter will remain consistent. Writes to the counter will never be executed concurrently by distinct threads so it will be kept in a consistent state. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all JAVA EE CDI DEPENDENCY INJECTION (@INJECT) TUTORIAL Java EE CDI makes primarily use of the @Inject annotation in order to perform Dependency Injection of managed beans into other container managed resources. In this tutorial we will cover the different available strategies to perform dependency injection in a CDI environment. This tutorial considers the following environment: JAVA EE CDI BEAN SCOPES The scope in which the bean is initialized will determine its lifecycle. CDI provides the following bean scopes: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean

the container will

JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI Producer methods tutorial. 27 April 2013. By Gonçalo Marques. cdi java java-ee. In this tutorial you will learn how to use CDI Producer methods in order to provide a flexible bean initialization mechanism. Concepts like polymorphism, disambiguation and CDI scopes will also be discussed as we proceed in the tutorial. POSTFIX + OPENDKIM (DKIM) CONFIGURATION EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. HOW TO ADD DEPENDENCIES TO A MAVEN PROJECT In this tutorial we will be adding Apache Commons Email library as a dependency to our Maven project. Start by opening your pom.xml file and add the Commons email dependency to the project. The groupId, artifactId and version to be used in the dependency element can be easily found in the online Maven global repository or in the official webpage of the dependency provider, ie Apache SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLEREQUESTMAPPING CONSUMESSPRING MVC REQUESTMAPPINGREQUESTMAPPING METHODSPRING

REQUESTMAPPING

The @RequestMapping annotation is used to configure the rules that will determine which method will be chosen by Spring MVC to handle certain types of HTTP requests. The value parameter determines the request URL pattern that will be used to match and choose a certain method to handle the request. We define value as /test so this means

that

POSTFIX MAIL SERVER CONFIGURATION TUTORIAL Postfix is an open source MTA or SMTP server. In this tutorial we will deploy a very simple configuration of Postfix. We will see in other tutorials how we can deploy more complex configuration including user authentication, SSL and message signing. JAVA SYNCHRONIZED EXAMPLE synchronized example. In this scenario we have a synchronized counter. Distinct threads will not execute any synchronized method at the same time so we make sure that the counter will remain consistent. Writes to the counter will never be executed concurrently by distinct threads so it will be kept in a consistent state. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all JAVA EE CDI DEPENDENCY INJECTION (@INJECT) TUTORIAL Java EE CDI makes primarily use of the @Inject annotation in order to perform Dependency Injection of managed beans into other container managed resources. In this tutorial we will cover the different available strategies to perform dependency injection in a CDI environment. This tutorial considers the following environment: JAVA EE CDI BEAN SCOPES The scope in which the bean is initialized will determine its lifecycle. CDI provides the following bean scopes: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean

the container will

JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI Producer methods tutorial. 27 April 2013. By Gonçalo Marques. cdi java java-ee. In this tutorial you will learn how to use CDI Producer methods in order to provide a flexible bean initialization mechanism. Concepts like polymorphism, disambiguation and CDI scopes will also be discussed as we proceed in the tutorial. POSTFIX + OPENDKIM (DKIM) CONFIGURATION EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. HOW TO ADD DEPENDENCIES TO A MAVEN PROJECT In this tutorial we will be adding Apache Commons Email library as a dependency to our Maven project. Start by opening your pom.xml file and add the Commons email dependency to the project. The groupId, artifactId and version to be used in the dependency element can be easily found in the online Maven global repository or in the official webpage of the dependency provider, ie Apache SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all SPRING TRANSACTION ISOLATION LEVEL TUTORIAL Transaction isolation level is a concept that is not exclusive to the Spring framework. It is applied to transactions in general and is directly related with the ACID transaction properties. Isolation level defines how the changes made to some data repository by one transaction affect other simultaneous concurrent transactions, and

also how and

JAAS AUTHENTICATION IN TOMCAT EXAMPLE One of the core concepts of JAAS is the existence of users and roles (roles are similar to groups in UNIX systems). Authorization may be issued to specific users or to roles.In JAAS this is concept is translated to Principals: Principals may represent users or roles independently. Let's define User and Role Principals to be used in

this example:

JSF COMPOSITE COMPONENT EXAMPLE JSF provides all the required infrastructure for creating composite components. These components may be defined using only XML, only Java, or a combination of both, depending on the complexity of the desired funcionality. Composite components may also be packaged in a library file (JAR) and be reused across multiple application if they are LOCKING IN JPA (LOCKMODETYPE) Optimistic locking for writing operations is used implicitly by the JPA provider. When the provider is persisting an entity that has been optimistically locked, it will compare the current entity version (@Version entity field) with the version of that record that is stored

in the database.

SPRING WITH HIBERNATE PERSISTENCE AND TRANSACTIONS EXAMPLE Introduction. After reading this tutorial you will be able to implement Hibernate persistence using Spring framework. Additionally you will also use Spring Hibernate transaction manager to manage all the transactional boilerplate code and wiring for you. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. JAVA EE EJB TRANSACTION PROPAGATION (@TRANSACTIONATTRIBUTE The @TransactionAttribute annotation may be used both at the type level and method level. When defined at the type level it states that all methods in a given EJB should have the declared transaction propagation behaviour. When applied to a single method, only that method will have that propagation behaviour, overriding the type level definition (if any). SPRING DEPENDENCY INJECTION WITH XML EXAMPLE The goal of this tutorial will be exactly the same of the tutorial Spring dependency injection example with the difference that this time we will define dependency injection in the Spring XML configuration file. We will skip the details and go directly to the Java classes definition. Check the mentioned tutorial for details just in case you need to review something. LOCK CONDITIONS IN JAVA One of the main advantages of using the Condition interface in favor of the traditional monitor methods is the ability of using multiple wait condition sets: Lock lock = new ReentrantLock(); Condition conditionA = this.lock.newCondition(); Condition conditionB = this.lock.newCondition(); This gives us the ability of waking up only

a single set

SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLEREQUESTMAPPING CONSUMESSPRING MVC REQUESTMAPPINGREQUESTMAPPING METHODSPRING

REQUESTMAPPING

Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. JAVA EE CDI DEPENDENCY INJECTION (@INJECT) TUTORIAL This tutorial will not be complete of we didn't also cover the CDI proxying mechanism. When we inject a managed bean that is created in a scope different than @Dependent - into another managed resource - the CDI container does not inject a direct reference to the injected bean.. For CDI bean scopes please see Java EE CDI bean scopes.. Why does CDI uses proxies? POSTFIX MAIL SERVER CONFIGURATION TUTORIAL Postfix is an open source MTA or SMTP server. In this tutorial we will deploy a very simple configuration of Postfix. We will see in other tutorials how we can deploy more complex configuration including user authentication, SSL and message signing. JAVA SYNCHRONIZED EXAMPLE Synchronization plays a key role in applications where multiple threads tend to share the same resources, especially if these resources must keep some kind of sensitive state where manipulations done by multiple threads at the same time could lead the resource to become in an inconsistent state. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI introduced a concept called Producer.Producers may be used to create - or produce - bean instances to be consumed by an application. Producers are also able to provide specific interface implementations according to the consumer needs so they are a valid way to support polymorphism in a CDI application. JAVA EE CDI BEAN SCOPES Scope Description; ApplicationScoped: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean the POSTFIX + OPENDKIM (DKIM) CONFIGURATION EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. HOW TO ADD DEPENDENCIES TO A MAVEN PROJECT In this tutorial we will be adding Apache Commons Email library as a dependency to our Maven project. Start by opening your pom.xml file and add the Commons email dependency to the project. The groupId, artifactId and version to be used in the dependency element can be easily found in the online Maven global repository or in the official webpage of the dependency provider, ie Apache SPRING MVC REQUESTMAPPING CONSUMES CONDITION EXAMPLEREQUESTMAPPING CONSUMESSPRING MVC REQUESTMAPPINGREQUESTMAPPING METHODSPRING

REQUESTMAPPING

Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. JAVA EE CDI DEPENDENCY INJECTION (@INJECT) TUTORIAL This tutorial will not be complete of we didn't also cover the CDI proxying mechanism. When we inject a managed bean that is created in a scope different than @Dependent - into another managed resource - the CDI container does not inject a direct reference to the injected bean.. For CDI bean scopes please see Java EE CDI bean scopes.. Why does CDI uses proxies? POSTFIX MAIL SERVER CONFIGURATION TUTORIAL Postfix is an open source MTA or SMTP server. In this tutorial we will deploy a very simple configuration of Postfix. We will see in other tutorials how we can deploy more complex configuration including user authentication, SSL and message signing. JAVA SYNCHRONIZED EXAMPLE Synchronization plays a key role in applications where multiple threads tend to share the same resources, especially if these resources must keep some kind of sensitive state where manipulations done by multiple threads at the same time could lead the resource to become in an inconsistent state. SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all JAVA EE CDI PRODUCER METHODS TUTORIAL Java EE CDI introduced a concept called Producer.Producers may be used to create - or produce - bean instances to be consumed by an application. Producers are also able to provide specific interface implementations according to the consumer needs so they are a valid way to support polymorphism in a CDI application. JAVA EE CDI BEAN SCOPES Scope Description; ApplicationScoped: When a bean scope is defined as ApplicationScoped this means that only one instance of the bean will exist in the entire application. After bean initialization, every time a client requests an instance of this bean the POSTFIX + OPENDKIM (DKIM) CONFIGURATION EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. HOW TO ADD DEPENDENCIES TO A MAVEN PROJECT In this tutorial we will be adding Apache Commons Email library as a dependency to our Maven project. Start by opening your pom.xml file and add the Commons email dependency to the project. The groupId, artifactId and version to be used in the dependency element can be easily found in the online Maven global repository or in the official webpage of the dependency provider, ie Apache SPRING TRANSACTION PROPAGATION TUTORIAL Spring REQUIRED behavior means that the same transaction will be used if there is an already opened transaction in the current bean method execution context. If there is no existing transaction the Spring container will create a new one. If multiple methods configured as REQUIRED behavior are called in a nested way they will be assigned distinct logical transactions but they will all SPRING TRANSACTION ISOLATION LEVEL TUTORIAL SERIALIZABLE isolation level is the most restrictive of all isolation levels. Transactions are executed with locking at all levels (read, range and write locking) so they appear as if they were executed in a serialized way.This leads to a scenario where none of the issues mentioned above may occur, but in the other way we don't allow transaction concurrency and consequently introduce a JSF COMPOSITE COMPONENT EXAMPLE JSF provides all the required infrastructure for creating composite components. These components may be defined using only XML, only Java, or a combination of both, depending on the complexity of the desired

funcionality.

JAAS AUTHENTICATION IN TOMCAT EXAMPLE One of the core concepts of JAAS is the existence of users and roles (roles are similar to groups in UNIX systems). Authorization may be issued to specific users or to roles.In JAAS this is concept is translated to Principals: Principals may represent users or roles independently. Let's define User and Role Principals to be used in

this example:

CONFIGURING CDI WITH TOMCAT EXAMPLE Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. LOCKING IN JPA (LOCKMODETYPE) Optimistic locking for writing operations is used implicitly by the JPA provider. When the provider is persisting an entity that has been optimistically locked, it will compare the current entity version (@Version entity field) with the version of that record that is stored

in the database.

JAVA EE STATEFUL SESSION BEAN (EJB) EXAMPLE Stateful Session Beans - as the name states (and opposite to Stateless Session Beans) - are able to keep state across multiple calls from a given client during an established session. JAVA EE EJB TRANSACTION PROPAGATION (@TRANSACTIONATTRIBUTE The @TransactionAttribute annotation may be used both at the type level and method level. When defined at the type level it states that all methods in a given EJB should have the declared transaction propagation behaviour. When applied to a single method, only that method will have that propagation behaviour, overriding the type level definition (if any). SPRING WITH HIBERNATE PERSISTENCE AND TRANSACTIONS EXAMPLE After reading this tutorial you will be able to implement Hibernate persistence using Spring framework. Additionally you will also use Spring Hibernate transaction manager to manage all the transactional boilerplate code and wiring for you. LOCK CONDITIONS IN JAVA Note: If we had used a single waiting condition set in our producer/consumer example, and signaled the threads using the signal() method (signals a single waiting thread), we would be exposed to a deadlock scenario. In order to signal only a single thread in the producer/consumer example, we must absolutely use both waiting condition sets: dataCondition and noDataCondition (we are still not

bytes lounge

Java articles, how-to's, examples and tutorials Toggle navigation MENU

* JAVA

* Java Collections

* Java IO

* Design Patterns

* Java Concurrency

* Java Reflection

* Java 8

* JAVA EE

* CDI

* EJB

* JPA

* Web

* JSF

* JAVA SECURITY

* JAAS

* SPRING

* Spring Core

* Spring MVC

* OTHER

* Android

* Maven

* Postfix

* New Relic

* CONTACT

*

*

*

*

SOCIAL

Share

ABOUT

Gonçalo Marques

Java and Open Source enthusiast

GitHub profile

SUBSCRIBE

Receive the latest articles in your mailbox

POPULAR TAGS

mvc

jpa

cdi

java8

jsf

web

java

spring

java-ee

ARCHIVE

* ____2015 (10)

* ____2014 (32)

* ____2013 (55)

* ____2012 (9)

LATEST ARTICLES

Lock Conditions in Java

26 November 2015

This article covers lock waiting conditions in Java (java.util.concurrent.locks.Condition) Locking conditions provide the ability for a given thread to wait for some arbitrary condition to happen while executing a critical section of code. In this context, a critical section is a section of...   Read more

concurrency java

Read/Write Locks in Java (ReentrantReadWriteLock)

18 October 2015

This article covers Read/Write locks in Java (ReentrantReadWriteLock

implementation)

Read/Write locks - also known as Shared/Exclusive locks - are designed for use cases where an application allows simultaneous read access to some piece of data by multiple processes at the same time,

...   Read more

concurrency java

Locking in JPA (LockModeType)

30 August 2015

This article covers the optimistic and pessimistic locking mechanisms available in the Java Persistence API (using LockModeType) Locking plays an important role in concurrent applications. The Java Persistence API provides distinct types of locking mechanisms that may be classified in a couple of major groups: pessimistic and

o...   Read more

concurrency java-ee jpa JPA entity versioning (@Version and Optimistic Locking)

29 July 2015

This article covers database optimistic locking in general and also demonstrates how to implement optimistic locking in Java Persistence API (JPA) entities by using the @Version annotation Optimistic locking is a mechanism that prevents an application from being affected by the "lost update" phenomenon in a concurrent environment while allowing some high degree of concurrency

...   Read more

concurrency java-ee jpa JPA OneToOne generates additional queries

26 June 2015

This article explains why do the Java Persistence API (JPA) often generates additional queries while dealing with OneToOne relationships It's true that JPA may generate additional queries while dealing with OneToOne relationships, and this is a subject where users usually ask for help in online forums and Q&A websites. This article...   Read more

java-ee jpa

Java EE EJB concurrency (ConcurrencyManagement, Lock and LockType)

31 May 2015

This article will cover EJB concurrent access configuration (both container and bean managed) resorting to Lock, LockType and ConcurrencyManagement primitives. Even though Stateless EJB's may never be concurrently accessed by more than a single client call, this article would be otherwise incomplete if it did not mention this kind of EJB's. Stateless EJB's

a...   Read more

concurrency ejb java-ee JPA EXTENDED Persistence Context

19 April 2015

In this article we will cover the differences between TRANSACTION and EXTENDED Persistence Context (Entity Manager). A container managed Persistence Context is always associated with a specific scope among the following available scopes: TRANSACTION or EXTENDED. The more common scenario is the TRANSACTION scope, whi...   Read more

ejb java-ee jpa

Asynchronous Servlets in Java

18 February 2015

In this article we will cover Asynchronous Servlets in Java. We will also implement a use case that demonstrates the concrete advantages of asynchronous processing with servlets. An excessive number of threads running simultaneously in a Java application may consume a lot of resources. This is no exception for a web based Java application. Incoming requests are handled by dedi...   Read more async java-ee servlet

web

1 2 3

4

Next

About the author

Gonçalo Marques is a Software Engineer with several years of experience in software development and architecture definition. During this period his main focus was delivering software solutions in banking, telecommunications and governmental areas. He created the Bytes Lounge website with one ultimate goal: share his knowledge with the software development community. His main area of expertise is Java

and open source.

GitHub profile: https://github.com/gonmarques He is also the author of the WIFI FILE BROWSER Android application:

* Java Collections

* Java IO

* Design Patterns

* Java Concurrency

* Java Reflection

* Java 8

* CDI

* EJB

* JPA

* Web

* JSF

* JAAS

* Spring Core

* Spring MVC

* Android

* Maven

* Postfix

* New Relic

------------------------- Copyright © 2012 - 2019 byteslounge.com

Privacy Policy

Details

4

Copyright © 2023 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0