Dependency injection in Java EE 6 allows injecting dependencies into classes through constructors, setters, and fields. It supports injecting various types of beans including EJBs and managed beans. Features of CDI include qualifiers to select specific implementations of interfaces to inject, producer methods to dynamically provide dependencies, and interceptors for cross-cutting concerns. Scopes determine when injected instances are created and destroyed. Events allow classes to observe and respond to occurrences in the system.
Spark IT 2011 - Context & Dependency Injection in the Java EE 6 EcosystemArun Gupta
CDI provides type-safe dependency injection and context management in Java EE applications. It allows injecting objects through fields, methods, and constructors using qualifiers to resolve dependencies. CDI manages bean scopes like request and conversation scope. It supports producer methods, interceptors, and custom scopes. CDI enables loose coupling between components through dependency injection.
CDI provides standards-based and typesafe dependency injection in Java EE 6. It integrates well with other Java EE 6 technologies like EJB, JPA, JSF, and JAX-WS. Portable extensions facilitate a richer programming model. Weld is the reference implementation of CDI and is integrated into application servers like GlassFish and JBoss.
This document provides release notes for Definiens XD 1.2, which includes new features, bug fixes, and information on moving from previous Definiens software. Key new features include advanced application building tools, TMA workflow enhancements, multi-user workflow support, enhanced ruleset development, wider connectivity, and usability improvements. It also details how Definiens XD provides backwards compatibility to allow customers to continue using existing Definiens Enterprise Image Intelligence applications and rulesets within the new software platform.
O hst-05 design-of_the_occupant_protection_system_mahindraAnand Kumar Chinni
This document describes how design of experiments was used to optimize an occupant protection system for front-loading vehicles at the conceptual design stage. A DOE model was developed in HyperStudy to simulate different restraint system designs and vehicle crash pulses. The study varied factors like pretensioners, load limiters, seat rotations, and pulse intensities. Over 384 simulations were run to analyze the effects on occupant injuries. Results showed the level of restraint system needed varies depending on the crash pulse intensity, and sensitivity of parameters can be assessed. The DOE approach helps identify optimal restraint systems early to reduce development time and costs.
Presentation on building a shopping cart using Java with XPages by Graham Acres and myself at the 2014 Midwest Lotus User Group Conference (MWLUG). We include the thinking behind the code to help with the Java journey.
Architecture Camp 2007 - Inversion Of ControlAlex Henderson
This presentation covers the principles of Inversion of Control and dependency injection, and was presented at the Architecture Camp in Auckland, which was held over 2 days on the 14th and 15th of April 2007.
The document discusses several common Java anti-patterns, including:
1) Approving a task by rejecting it in a method called "approve".
2) Avoiding the use of helper libraries to simplify tasks like file name parsing.
3) Using reflection when direct method calls would suffice.
Spark IT 2011 - Context & Dependency Injection in the Java EE 6 EcosystemArun Gupta
CDI provides type-safe dependency injection and context management in Java EE applications. It allows injecting objects through fields, methods, and constructors using qualifiers to resolve dependencies. CDI manages bean scopes like request and conversation scope. It supports producer methods, interceptors, and custom scopes. CDI enables loose coupling between components through dependency injection.
CDI provides standards-based and typesafe dependency injection in Java EE 6. It integrates well with other Java EE 6 technologies like EJB, JPA, JSF, and JAX-WS. Portable extensions facilitate a richer programming model. Weld is the reference implementation of CDI and is integrated into application servers like GlassFish and JBoss.
This document provides release notes for Definiens XD 1.2, which includes new features, bug fixes, and information on moving from previous Definiens software. Key new features include advanced application building tools, TMA workflow enhancements, multi-user workflow support, enhanced ruleset development, wider connectivity, and usability improvements. It also details how Definiens XD provides backwards compatibility to allow customers to continue using existing Definiens Enterprise Image Intelligence applications and rulesets within the new software platform.
O hst-05 design-of_the_occupant_protection_system_mahindraAnand Kumar Chinni
This document describes how design of experiments was used to optimize an occupant protection system for front-loading vehicles at the conceptual design stage. A DOE model was developed in HyperStudy to simulate different restraint system designs and vehicle crash pulses. The study varied factors like pretensioners, load limiters, seat rotations, and pulse intensities. Over 384 simulations were run to analyze the effects on occupant injuries. Results showed the level of restraint system needed varies depending on the crash pulse intensity, and sensitivity of parameters can be assessed. The DOE approach helps identify optimal restraint systems early to reduce development time and costs.
Presentation on building a shopping cart using Java with XPages by Graham Acres and myself at the 2014 Midwest Lotus User Group Conference (MWLUG). We include the thinking behind the code to help with the Java journey.
Architecture Camp 2007 - Inversion Of ControlAlex Henderson
This presentation covers the principles of Inversion of Control and dependency injection, and was presented at the Architecture Camp in Auckland, which was held over 2 days on the 14th and 15th of April 2007.
The document discusses several common Java anti-patterns, including:
1) Approving a task by rejecting it in a method called "approve".
2) Avoiding the use of helper libraries to simplify tasks like file name parsing.
3) Using reflection when direct method calls would suffice.
This document discusses using Google Web Toolkit (GWT) with Context and Dependency Injection (CDI). It covers use cases like invoking CDI beans from GWT clients, exposing domain models to GWT, and requirements like seamless integration and reduction of boilerplate. Key concepts discussed include beans, qualifiers, scopes, and how CDI fits into the build and runtime. Examples demonstrate conversation scoped beans and how clients can manage conversations. The document also mentions related technologies and that the Errai project uses the Weld implementation of CDI.
Семинары и тренинги по делопроизводству, документообороту и архиву предприятияProfi-Cariera
http://www.seminarna.ru/
Семинары по делопроизводству проводят ведущие специалисты ВНИИДАД ведущего центра подготовки специалистов в области документоведения.
ВНИИДАД Всероссийский научно-исследовательский институт документоведения и архивного дела.
ВНИИДАД является единственным в России учреждением, занимающимся вопросами документационного обеспечения управления.
Целевая аудитория
Сотрудники службы ДОУ, офис-менеджеры, делопроизводители, секретари, архивариус
Презентация на конференции Software People 2009. Предлагается простой и практичный метод оценки трудозатрат в проектах разработки ПО, позволяющий количественно учесть риски в сроках работ, оперировать прогнозами в условиях высокой неопределенности, а также дающий инструменты проверки достоверности прогноза при помощи метрик.
Презентация к моему докладу на конференции SWP'11
- Цель управления как выполнение скоординиваронного и целенаправленного командного действия
- Понятие "трения", как основного отличия плана на бумаге от практического действия.
- "Тактика миссии" (Auftragstaktik) как философия управления, необходимая для преодоления "трения".
- 5-paragraph order и процесс планирования корпуса морской пехоты США, как пример системы, реализующий принцип тактики миссии.
- "Трение" в различных типах оргструктур в компаниях разработчиках ПО, и их совместимость с "тактикой миссии"
Презентация семинаров по деловой переписке с клиентамиProfi-Cariera
Пройдите курс по деловой переписке и превратите всех клиентов в лояльных Вашей организации. Деловая переписка - это Ваш имидж. Как научиться аргументированно и структурированно писать, грамотно оформлять письма, пользоваться речевыми клише? Все это узнаете на наших курсах. 15 лет помогаем лучшим бизнесам России стать еще эффективнее.
PMBOK Extension for Software Projects (in Russian)IAMCP MENTORING
The content of this presentation deals with species of software projects' management. The Extension strikes the specific features of software projects, team management, motivation, main project phases.
One of the main features is an attempt to combine waterfall and adaptive project management techniques.
Лицензированный центр "Профи-Карьера" проводит корпоративное обучение по различным тематикам. для сотрудников российских и международных компаний. Курсы повышения квалификации, семинары и тренинги, дистанционное обучение по управлению персоналом, секретариату, делопроизводству, бизнес-процессам, сервису и обслуживанию клиентов, телефонному общению. Звоните: +7 495 150 18 17, info@seminarna.ru, www.seminarna.ru
A 30 slide CDI (Context and Dependency Injection for the Java EE Platform) presentation Jens Augustsson from Redpill Linpro did in Copenhagen March 23 2011
Tips for Building your First XPages Java ApplicationTeamstudio
XPages and Java go together like bicycles and great exercise. But much like you wouldn't attempt a hundred mile bicycle ride on your first day, Java is best learned by starting small and building on your accomplishments. Planning, preparation, and realistic goals are keys to becoming proficient at using Java in your XPages applications. Come learn as two long-time developers, Mike and Graham, share their experiences on their Java treks and demonstrate some of what they learned as they build a Java-based shopping cart in an XPages application.
This document discusses using Google Web Toolkit (GWT) with Context and Dependency Injection (CDI). It covers use cases like invoking CDI beans from GWT clients, exposing domain models to GWT, and requirements like seamless integration and reduction of boilerplate. Key concepts discussed include beans, qualifiers, scopes, and how CDI fits into the build and runtime. Examples demonstrate conversation scoped beans and how clients can manage conversations. The document also mentions related technologies and that the Errai project uses the Weld implementation of CDI.
Семинары и тренинги по делопроизводству, документообороту и архиву предприятияProfi-Cariera
http://www.seminarna.ru/
Семинары по делопроизводству проводят ведущие специалисты ВНИИДАД ведущего центра подготовки специалистов в области документоведения.
ВНИИДАД Всероссийский научно-исследовательский институт документоведения и архивного дела.
ВНИИДАД является единственным в России учреждением, занимающимся вопросами документационного обеспечения управления.
Целевая аудитория
Сотрудники службы ДОУ, офис-менеджеры, делопроизводители, секретари, архивариус
Презентация на конференции Software People 2009. Предлагается простой и практичный метод оценки трудозатрат в проектах разработки ПО, позволяющий количественно учесть риски в сроках работ, оперировать прогнозами в условиях высокой неопределенности, а также дающий инструменты проверки достоверности прогноза при помощи метрик.
Презентация к моему докладу на конференции SWP'11
- Цель управления как выполнение скоординиваронного и целенаправленного командного действия
- Понятие "трения", как основного отличия плана на бумаге от практического действия.
- "Тактика миссии" (Auftragstaktik) как философия управления, необходимая для преодоления "трения".
- 5-paragraph order и процесс планирования корпуса морской пехоты США, как пример системы, реализующий принцип тактики миссии.
- "Трение" в различных типах оргструктур в компаниях разработчиках ПО, и их совместимость с "тактикой миссии"
Презентация семинаров по деловой переписке с клиентамиProfi-Cariera
Пройдите курс по деловой переписке и превратите всех клиентов в лояльных Вашей организации. Деловая переписка - это Ваш имидж. Как научиться аргументированно и структурированно писать, грамотно оформлять письма, пользоваться речевыми клише? Все это узнаете на наших курсах. 15 лет помогаем лучшим бизнесам России стать еще эффективнее.
PMBOK Extension for Software Projects (in Russian)IAMCP MENTORING
The content of this presentation deals with species of software projects' management. The Extension strikes the specific features of software projects, team management, motivation, main project phases.
One of the main features is an attempt to combine waterfall and adaptive project management techniques.
Лицензированный центр "Профи-Карьера" проводит корпоративное обучение по различным тематикам. для сотрудников российских и международных компаний. Курсы повышения квалификации, семинары и тренинги, дистанционное обучение по управлению персоналом, секретариату, делопроизводству, бизнес-процессам, сервису и обслуживанию клиентов, телефонному общению. Звоните: +7 495 150 18 17, info@seminarna.ru, www.seminarna.ru
A 30 slide CDI (Context and Dependency Injection for the Java EE Platform) presentation Jens Augustsson from Redpill Linpro did in Copenhagen March 23 2011
Tips for Building your First XPages Java ApplicationTeamstudio
XPages and Java go together like bicycles and great exercise. But much like you wouldn't attempt a hundred mile bicycle ride on your first day, Java is best learned by starting small and building on your accomplishments. Planning, preparation, and realistic goals are keys to becoming proficient at using Java in your XPages applications. Come learn as two long-time developers, Mike and Graham, share their experiences on their Java treks and demonstrate some of what they learned as they build a Java-based shopping cart in an XPages application.
Service Oriented Architecture in Magento 2Max Pronko
During the Magento Meetup London I've had a chance to bring a very interesting for discussion. Service Oriented Architecture in Magento 2. Feel free to share, watch and ask questions if you would like to clarify the approach.
JSR-299 defines a unifying dependency injection and contextual lifecycle model for Java EE 6. It allows injection of various types of objects like classes, EJBs, producer methods, resources, etc. It also defines concepts like qualifiers, scopes, events, interceptors, and stereotypes to customize injections. Producers are used as sources of injectable objects and can be annotated with scopes and qualifiers.
Presentation from RedDotRubyConf 2011 in Singapore. It explains multi-tenancy and why it is increasingly required for Rails development. Four of the many approaches are covered in some detail (including what resources we have available for re-use) and I end with a naive question (& call to action?) .. "Isn't it about time there was a 'Rails Way'?"
Agile methodologies based on BDD and CI by Nikolai ShevchenkoMoldova ICT Summit
BDD is an agile methodology that focuses on describing an application from stakeholders' perspectives using scenarios written in a common language like Gherkin. It revolves around user stories made up of scenarios and executable steps. This ensures collaboration between business analysts, QA teams, and developers. CI integrates source code and runs tests after each commit for near-immediate feedback to catch errors early. BDD and CI provide benefits like lower barriers to entry, greater ROI, and predictability through automated tests that validate business needs are met.
The document summarizes an internship project creating a GUI reporting tool for a marketing analytics team. The tool extracts data from clients' databases, performs operations, and allows exporting filters, charts, and data to formats like PDF, Excel and images. Key technologies used include Java Swing, JDBC for database connectivity, and libraries like JideGrids, iText and JFreeChart for functionality like enhanced tables, PDF export and generating charts. The intern gained experience with database concepts, Java programming, and creating a graphical user interface application.
Relevance trilogy may dream be with you! (dec17)Woonsan Ko
Introducing new BloomReach Experience Plugins which changes the game of DREAM (Digital Relevance Experience & Agility Management), to increase productivity and business agility.
This document provides an overview of CDI (Contexts and Dependency Injection) and some portable CDI extensions, including Apache DeltaSpike. It discusses key CDI concepts like dependency injection, interceptors, events, and scopes. It introduces Apache OpenWebBeans as a fast and stable CDI container implementation. It then demonstrates how DeltaSpike extends CDI with additional features like transaction management, qualifiers, specialized configuration, and alternatives. The document encourages involvement to help shape the future of Apache DeltaSpike.
Simplify Feature Engineering in Your Data WarehouseFeatureByte
Feature Engineering is critical to successful delivery of AI solutions. Crafting relevant features from organization data requires business domain knowledge and creativity, powered by human capital in data science teams.
With growing adoption of machine learning and AI in organizations, there is a pressing need to develop processes around ML development and deployment to maximize productivity with limited resources. While there is no lack of tools for ML model management, solutions for feature engineering remains inadequate.
In this presentation, we outline our approach and design to make feature engineering efficient, repeatable and enjoyable for data science practitioners so they can experiment and iterate fast, without overlooking important issues such as scalability, deployment and auditability.
Through this presentation you will gain a good understanding of how the clean architecture pattern is implemented at Taxibeat. What issues the Android Taxibeat team has faced so far and what solutions we came up with. Of course, the benefits of clean architecture will also be discussed along with the way we managed to build two fast paced iterative apps that share functionality.
Domain Driven Design (DDD) is a topic that's been gaining a lot of popularity in both the Java and .NET camps recently. Entities, value types, repositories, bounded contexts and anti-corruption layers -- find out what all the buzz is about, and how establishing a domain model can help you combat complexity in your code.
Richard Dingwall is a .NET developer and blogger with a passion for architecture and maintainable code.
He is currently working at Provoke Solutions as lead developer on a six-month project introducing test-driven development (TDD) and domain-driven design (DDD) to a large ASP.NET ERP system.
An hour-long talk given at Wellington .NET user group, Sept 23 2009.
The document discusses 10 ways to improve code quality based on a presentation by Martin Cronje. It provides examples of refactoring code to remove switch/if statements, use polymorphism instead of switch statements, extract methods to improve readability, add comments appropriately, use frameworks instead of building your own, and avoid premature optimization. It also emphasizes fundamentals over cool technologies and understanding quality and purpose.
The document discusses the use of scripting in SQL Server Integration Services (SSIS). It covers how scripts allow extending package functionality beyond default tasks. Specific topics covered include using scripts to manage packages programmatically via the object model or command line utilities, configuring script tasks, using the log method and handling events from within a script task, and creating a data transformation script component. Demos are provided for various scripting features.
Open Source ERP Technologies for Java Developerscboecking
PowerPoint presentation from an Austin JUG (java user's group) event in June. The purpose of the presentation is to help Java developers learn, use and extent ADemipere, a popular open source ERP.
Expert Image allows querying transactions to view, print, or email attached images like invoices, reports, and documents. It includes methods for importing scanned images and converting files to PDF. Expert Image was originally called Quick Image and has a separate database from Expert that must reside on the same server. It includes modules that run periodically to process images via tasks scheduled in Microsoft Task Scheduler. Upgrading Expert Image is usually straightforward, involving backing up files and databases and copying new files.
SeedStack business framework aims to make implementing DDD easier by providing a set of ready-to-use tactical building blocks along with common tasks automation and helpers.
These slides have been shown at the Zenika DDD NightClazz, the 19th of May 2016, in Paris.
The document introduces Test Driven Development (TDD), Continuous Integration (CI), Inversion of Control (IoC), and Aspect Oriented Programming (AOP). It discusses TDD principles and tools for writing tests first before code. CI aims to integrate code changes frequently to prevent integration problems. IoC and dependency injection improve software design by reducing coupling between components. AOP allows cross-cutting concerns like logging to be coded separately from the main program logic.
How to add functionality to CMS Made Simple using Tags, User-Defined Tags, and Modules. Also includes some previews of how the module API will change with version 2.0
The document discusses aspect-oriented programming (AOP) and key AOP concepts like joinpoints, pointcuts, advice, and aspects. It explains how AOP addresses cross-cutting concerns in code through separation of concerns using pointcuts, advice, and aspects rather than scattering code throughout a system. The document also provides examples of how to configure AOP using Spring AOP through pointcuts, advice definitions, and proxies.
6. «but I've heard.....»
CDI
WebBeans
old name for... new name for...
Hibernate
JSR-299 standardized
implements...
Weld
part of... JPA
inspired...
includes... next project...
uses... Java EE 6
Seam 2
Seam 3 JSR-330 created by... Spring Core
name for... created by...
Guice
D4J
Consulting ● Development ● IT Operations ● Training ● Support ● Products
7. next...
2. CDI Features
Consulting ● Development ● IT Operations ● Training ● Support ● Products
8. Injection points.
Class constructor public class Checkout {
private final ShoppingCart cart;
@Inject
public Checkout(ShoppingCart cart) {
this.cart = cart;
}
}
Initializer method public class Checkout {
private ShoppingCart cart;
@Inject
void setShoppingCart(ShoppingCart cart) {
this.cart = cart;
}
}
Direct field public class Checkout {
private @Inject ShoppingCart cart;
}
Consulting ● Development ● IT Operations ● Training ● Support ● Products
9. Injectable bean types.
A user-defined class or interface
In a JEE module with a /META-INF/beans.xml
public class CreditCardPaymentService
declare implements PaymentService {
...
}
use
... ...
@Inject or? @Inject
CreditCardPaymentService ps; PaymentService ps;
... ...
...«there can be only one»...
Consulting ● Development ● IT Operations ● Training ● Support ● Products
10. Non-default qualifiers.
Your custom annotations...
CDI anno @Qualifier
@Retention(RUNTIME)
JavaSE annos @Target({TYPE, METHOD, FIELD, PARAMETER})
public @interface Preferred {}
...links a declared injection point...
...
Your anno @Inject @Preferred PaymentService ps;
...
...to a qualified bean
@Preferred
public class CreditCardPaymentService implements PaymentService {
public void process(Payment payment) { ... }
}
Consulting ● Development ● IT Operations ● Training ● Support ● Products
11. Producer methods.
Run time qualifier
public PaymentAction {
@Inject @Preferred PaymentService userPaymentService;
...
}
public AnyClass {
@Inject
User user;
@Produces @Preferred
public PaymentService getUserPaymentService() {
return user.getPaymentServices().get(0);
}
}
Consulting ● Development ● IT Operations ● Training ● Support ● Products
12. Scopes and Contexts.
Scope determines...
✔ When a new instance of any bean with that scope is created
✔ When an existing instance of any bean with that scope is destroyed
✔ Which injected references refer to any instance of a bean with that scope
✔ CDI features an extensible context model
Built-in scopes
✔ (@Dependent)
✔ @RequestScoped
✔ @SessionScoped JEE defined
✔ @ApplicationScoped
✔ @ConversationScoped Defined by you
Consulting ● Development ● IT Operations ● Training ● Support ● Products
15. Interceptors - 2.
Binding
@InterceptorBinding
@Target({METHOD, TYPE})
CDI anno @Retention(RUNTIME)
public @interface MySecurity {}
public class ShoppingCart {
Your anno @MySecurity public void checkout() { ... }
}
Consulting ● Development ● IT Operations ● Training ● Support ● Products
16. Interceptors - 3.
Implementation - business method:
@MySecurity @Interceptor
public class MySecurityInterceptor {
@AroundInvoke
public Object manageSecurity(InvocationContext ctx) throws Exception { ... }
}
Implementation - lifecycle: @PostConstruct, @PreDestroy...
Implementation - timeout: @AroundTimeout
Consulting ● Development ● IT Operations ● Training ● Support ● Products
17. Decorators .
Interceptors capture orthogonal application concerns
§
The reverse is true of decorators
@Decorator
public abstract class LargeTransactionDecorator implements Account {
@Inject @Delegate @Any Account account;
@PersistenceContext EntityManager em;
public void withdraw(BigDecimal amount) {
account.withdraw(amount);
if ( amount.compareTo(LARGE_AMOUNT)>0 ) {
em.persist( new LoggedWithdrawl(amount) );
}
}
public void deposit(BigDecimal amount);
account.deposit(amount);
if ( amount.compareTo(LARGE_AMOUNT)>0 ) {
em.persist( new LoggedDeposit(amount) );
}
}
} Consulting ● Development ● IT Operations ● Training ● Support ● Products
18. Events.
Become observable....
@Inject @Updated Event<Document> documentEvent;
...
document.setLastModified(new Date());
documentEvent.fire(document);
Optional qualifier
Become observer....
public void handleDocs(@Observes @Updated Document document) { ... }
Conditional observations...
public void handleDocs(@Observes(during = AFTER_SUCCESS) @Updated Document doc) {
..
}
Consulting ● Development ● IT Operations ● Training ● Support ● Products
19. Predefine scope and interceptors Stereotypes.
Declare Predefined by CDI:
@Model
EJB @Stateless
@Transactional(requiresNew=true) @Named
your @Secure @RequestScoped
CDI @Stereotype @Documented
@Target(TYPE) @Stereotype
JSE @Retention(RUNTIME) @Target(TYPE,METHOD,FIELD)
public @interface BusinessLogic {} @Retention(RUNTIME)
public @interface Model {}
Use
@BusinessLogic
public class UserService { ... }
Consulting ● Development ● IT Operations ● Training ● Support ● Products
20. next...
3. Advices
Consulting ● Development ● IT Operations ● Training ● Support ● Products
21. Personal experiences.
Good stuff
Seam improvement – no outjection, method-time injection etc.
Great for use with other frameworks – like jBPM
XML-hell is /actually/ gone
Be careful
Start off with managed beans – switch when needed
Annotations are adjectives (@Preferred), not nouns (@CreditCardPayment)
Avoid injection from ”thinner” context – use @Dependent
Weld documentation not finished
Avoid ”upgrade” JBoss AS 5.x
XML Configuration in Seam 3 Module
Annotation Frustration... IT Operations ● Training ● Support ● Products
Consulting ● Development ●
22. Get started!.
In JBoss 6.0.0.Final (Weld 1.1.0.Beta2)
In GlassFish Server 3.1 (Weld 1.1.0.Final)
Embed Weld in Tomcat, Jetty... Android almost :-)
Generate project using Seam Forge or M2Eclipse
And read more!
Dan Allens slideshare: Google ”Dan Allen slideshare cdi”
Gavin King and Bob Lee flamewar: Google ”Gavin King Bob Lee jsr"
Consulting ● Development ● IT Operations ● Training ● Support ● Products
23. End.
jens.augustsson@redpill-linpro.com
Consulting ● Development ● IT Operations ● Training ● Support ● Products