These question are the basic questions for Interview based on Java language. These questions are able to crack the interview based on java language
Learn more at blog : --
https://solutionbyexpert.blogspot.com/2020/08/become-expert-secret-of-success-ii.html
#coding
#coding development skill program
#java
Se trata de dar una visión general del uso de iCloud, Amazon Web Services y Microsoft Azure, desde el punto de vista del desarrollador de apps para IOS independiente o pequeñas startups. La presentación hace tiene una introducción de cloud, y después una descripción de cada plataforma con un ejemplo sencillo de uso.
These question are the basic questions for Interview based on Java language. These questions are able to crack the interview based on java language
Learn more at blog : --
https://solutionbyexpert.blogspot.com/2020/08/become-expert-secret-of-success-ii.html
#coding
#coding development skill program
#java
Se trata de dar una visión general del uso de iCloud, Amazon Web Services y Microsoft Azure, desde el punto de vista del desarrollador de apps para IOS independiente o pequeñas startups. La presentación hace tiene una introducción de cloud, y después una descripción de cada plataforma con un ejemplo sencillo de uso.
Designing Java EE Applications in the Age of CDIMichel Graciano
Even though CDI has been available since the end of 2009, most people still do not realize its full power and the possibilities it brings. Attend this session to understand which CDI features make it excel in comparison with other dependency-injection-based solutions and see how they can be used to design flexible applications and frameworks that will stand the test of time.
Dependency injection design pattern is introduced in order to solve some common issues due to explicit wiring between a component and its collaborator or service.
Spring Framework and AngularJS are involved to show how dependency injection could simplify the way of writing code but above all testing.
Clean and concise code is obtained using DI. Real example are provided on Github and Plunkr.
CDI Best Practices with Real-Life Examples - TUT3287Ahmad Gohar
As the adoption of Contexts and Dependency Injection (CDI) for Java EE API grows, it is important to understand how to use CDI effectively to maximize the benefits of using a loosely coupled, type-safe, annotation-driven dependency injection solution. This session outlines the best practices for using CDI, such as annotations versus XML, @Named as a qualifier, qualifier type safety versus verbosity, effective use of producers/disposers, using scopes properly, best practices for using conversations, defining effective stereotypes, interceptors versus decorators, static versus dynamic injection/lookup, CDI versus Java EE resource injection, using CDI with EJB 3.1, CDI/JSF 2 integration patterns, and CDI/JPA 2 usage patterns.
The future of enterprise dependency injection: Contexts & Dependency Injectio...Paul Bakker
Talk about the Contexts & Dependency Injection specification introduced in Java EE 6. It's a basic introduction to the most important concepts of the specification.
The slide were made for a 50 minute talk at the NL-JUG conference in November 2009.
SpringOne Platform 2017
Juergen Hoeller, Pivotal
"Spring Framework 5.0 brings a lot of refinements all across the framework: some of rather obvious elements of our major programming model themes (functional & reactive)... but also some less prominent and less commonly presented features.
This brief session highlights a few personal favorites beyond the major themes."
Since late 2009 there is Spring 3 published. Some things are new, something keep and something was removed.
Thos talk discuss the changes of the 3rd edition of Spring and introduce Spring Roo, Grails and the SpringSource Toolsuite.
This is a talk I gave recently to the department of Computer Science at University of Illinois at Chicago on Apache Maven. Hope it's useful.
http://www.cs.uic.edu/Main/NewsItem?audience=public&ind=498
Beans and Java! We hear those buzz words all the time, but our XPages applications seem to work fine with Server Side JavaScript. Why should we use Java and managed beans? Come learn about one long-time Notes developer's journey using a Java Managed Bean and why. Discover how a Bean allowed the data to be cached in memory allowing for quick access to user-selected data subsets. Learn how different Java collections like HashMaps, ArrayLists and TreeSets can be used to build in-memory objects of your data. See how using a Managed Bean can simplify and greatly speed up your XPage! A comparison will be made of the performance savings before and after the implementation of the Managed Bean. Come get gently led down the path to the pot of Java waiting at the end of the rainbow!
Click here to download the sample application used in the webinar: http://www.tlcc.com/admin/tlccsite.nsf/pages/feb-java-webinar?opendocument
Design patterns are not only cool but represent the collective wisdom of many developers. Since the publication of Design Patterns: Elements of Reusable Object-Oriented Software by GoF many new concepts have extended the coverage of these design patterns, and now Java EE provide out of the box implementations of many of the most well known patterns. This talk will show how, by taking advantage of Java EE features such as CDI and the smart use of annotations, traditional design patterns can be implemented in a much cleaner and quicker way. Among the design patterns discuss there will be Singleton, Façade, Observer, Factory, Dependency Injection, Decorator and more.
В обществения сектор (или иначе казано - държавата) се създава много софтуер, от който зависят милиони левове и са концентрирани големи интереси. Наивно е да се смята, че просто защото нещо е електронно, то корупцията е елиминирана. Напротив, ако не бъде направен както трябва, софтуерът може включително да създаде нов вид, "електронна" корупция. Именно затова трябва да приложим няколко не толкова прости принципа и техники, за да получим аниткорупционен софтуер.
A talk that discusses two topics regarding Elasticsearch - multitenancy and scalability and what are the technical details to achieving them efficiently
Encryption is widely used by companies to secure sensitive data. It comes in different varieties and purposes. There's symmetric vs asymmetric encryption, there's encryption at rest, in transit and in use, there's TDE vs record-level encryption vs column/field level encryption, and then there's key-encryption (wrapping). All of these varieties serve different purposes and use-cases that we review - from the point of view of an infosec person, a sysadmin, a developer and an architect.
Blockchain overview - types, use-cases, security and usabiltyBozhidar Bozhanov
We review blockchain implementations, their components, how they work and how they can be used for solving real world problems with comparison to existing solutions.
Какви са проблемите със сигурността на електронното управление, и как би помогнал отворените код, електронната идентификация и общите правила за достъп
MUTUAL FUNDS (ICICI Prudential Mutual Fund) BY JAMES RODRIGUESWilliamRodrigues148
Mutual funds are investment vehicles that pool money from multiple investors to purchase a diversified portfolio of stocks, bonds, or other securities. They are managed by professional portfolio managers or investment companies who make investment decisions on behalf of the fund's investors.
Snam 2023-27 Industrial Plan - Financial Presentation
Contexts and Dependency Injection for the JavaEE platform
1. CDI – Contexts andCDI – Contexts and
Dependency Injection for theDependency Injection for the
JavaEE platform (JSR299)JavaEE platform (JSR299)
Bozhidar Bozhanov
Bulgarian Association of Software Developers
www.devbg.org
2. About meAbout me
• Senior Java Developer at Fish4
• 3+ years experience with Spring and
dependency injection
• Implementor of JSR-299 as a university
project
• Committer at Hector (Java Cassandra API)
• http://techblog.bozho.net
3. Dependency injection?Dependency injection?
• Classes define what are their dependencies,
not how they obtain them
• Object dependencies are set externally
• Unit-test and mocking friendly
• DI frameworks - objects are managed and
have a lifecycle
4. HistoryHistory
• Theoretical basis - GoF Hollywood principle;
Steffano Mazzocchi
• Spring – 2002/2003, Rod Johnson
• Pico Container - 2003
• Martin Fowler popularized the term - 2004
• JBoss Seam, Google Guice, EJB 3.0
• Contexts and Dependency Injection (JSR-
299, JavaEE 6) - 2006-2009
5. Current problemsCurrent problems
• Problematic integration between JavaEE
components
• „Crippled“ dependency-injection in EJB
• No standard – only propriatary DI
frameworks (spring, guice, seam)
• Extended reliance on string qualifiers (no
compile-time safety)
6. JSR-299JSR-299
• What's a JSR?
• CDI Initially named „Web Beans“
• Expert Group formed in June 2006, spec-lead
is Gavin King
• Early draft (2007), Public review (2008), Final
draft (mid-2009), Ralease (Dec 2009)
• Bob Lee (Guice) left the expert group
• IBM voted „No“, Google voted „Yes“,
VMware (SpringSource) and Eclipse didn't
vote.
7. What is CDIWhat is CDI
• Type-safe DI framework (based on Seam,
Guice and Spring)
• Uses JSR-330 (Dependency Injection for
Java), lead by Rod Johnson (Spring) and Bob
Lee (Guice), which defines only DI
annotations (for JavaSE)
• DI JavaEE-wide – JSF managed beans, EJB,
JavaEE Resources
8. Implementations; web profileImplementations; web profile
• Three implementations: JBoss Weld, Apache
OpenWebBeans and Resin CanDI
• Only one stable at the moment – Weld, used
in Glassfish v3 and JBoss AS (5.2, 6)
• JavaEE 6 has the so-called „profiles“. CDI is
part of the „Web profile“
• CDI implementations are not limited to
application servers (with the help of
extensions)
10. Beans and bean archivesBeans and bean archives
• A bean archive has META-INF/beans.xml
• All classes within a bean archive are beans,
and eligible for injection
• All classes in outside bean archives are not
beans
• Beans can have type(s), scope, EL name,
qualifiers, interceptors.
• Beans can be JSF beans, EJBs, JavaEE
resources
11. • @javax.inject.Inject is used:@javax.inject.Inject is used:
InjectionInjection
publicpublic classclass OrdersBean {OrdersBean {
@Inject@Inject privateprivate OrdersDaoOrdersDao daodao;;
}}
• The „dao“ field is called „injection point“.The „dao“ field is called „injection point“.
Injection point types are:Injection point types are:
• FieldField
• ConstructorConstructor
• SetterSetter
• InitializerInitializer
14. Bean scopesBean scopes
• Built-in scopes (normal vs pseudo):
• @ApplicationScoped – i.e. Singleton
• @RequestScoped – created on http request
• @SessionScoped – within a HttpSession
• @ConversationScoped – between request
and session
• @Dependent (default, pseudo) – the object
lives as long as the object it is injected into
• Custom scopes
15. • @Named(@Named(""beanNamebeanName"")). Defaults to the. Defaults to the
decapitalized, simple name of the classdecapitalized, simple name of the class
• Used in EL expressions:Used in EL expressions:
Bean nameBean name
<<h:outputTexth:outputText
valuevalue=="#{orderBean.order.price}""#{orderBean.order.price}" />/>
• Used in injections (discouraged)Used in injections (discouraged)
@Inject@Inject @Named@Named(("ordersBean""ordersBean"))
privateprivate OrdersBeanOrdersBean orderBeanorderBean;;
16. • Qualifiers are annotations (unlike in spring):Qualifiers are annotations (unlike in spring):
QualifiersQualifiers
@Qualifier //retention & target ommitted@Qualifier //retention & target ommitted
publicpublic @interface@interface SynchronousSynchronous {}{}
• Qualifiers are used to differentiate beans with the sameQualifiers are used to differentiate beans with the same
type:type:
@@InjectInject @@SynchronousSynchronous
privateprivate CreditCardProcessor processor;CreditCardProcessor processor;
@@SynchronousSynchronous
publicpublic classclass SynchronousCreditCardProcessorSynchronousCreditCardProcessor
implementsimplements CreditCardProcessor {..}CreditCardProcessor {..}
@@AsynchronousAsynchronous
publicpublic classclass AsyncCreditCardProcessorAsyncCreditCardProcessor
implementsimplements CreditCardPRocessor {..}CreditCardPRocessor {..}
17. • @Any@Any – all beans have this, unless they have– all beans have this, unless they have @New@New
• @Default, @Named@Default, @Named
• @New@New –– forces the container to return a new beanforces the container to return a new bean
instance each timeinstance each time
Built-in qualifiersBuilt-in qualifiers
@@NewNew publicpublic classclass SomeBean {..}SomeBean {..}
publicpublic classclass AnotherBean {AnotherBean {
@@Inject SomeBean bean1;Inject SomeBean bean1;
@@Inject SomeBean bean2;Inject SomeBean bean2;
@@PostConstructPostConstruct voidvoid init() {init() {
// false// false
System.out.println(bean1 == bean2);System.out.println(bean1 == bean2);
}}
}}
18. • Stereotypes are used to reduce the amountStereotypes are used to reduce the amount
of boilerplate code:of boilerplate code:
StereotypesStereotypes
@@StereotypeStereotype //denoting a stereotype//denoting a stereotype
@@NamedNamed // built-in qualifier// built-in qualifier
@@RequestScopedRequestScoped // scope// scope
publicpublic @interface@interface
RequestScopedSecureBean {}RequestScopedSecureBean {}
@@RequestScopedNamedRequestScopedNamed BeanBean
publicpublic classclass OrdersBean {..}OrdersBean {..}
20. • A way to utilize complex constructionA way to utilize complex construction
• Allow non-beans to be injected (i.e. 3Allow non-beans to be injected (i.e. 3rdrd
partyparty
classes outside a bean-archive)classes outside a bean-archive)
• Handles object disposalHandles object disposal
ProducersProducers
//this class is within a bean archive//this class is within a bean archive
classclass ConnectionProducer {ConnectionProducer {
@Produces@Produces Connection createConnection() {Connection createConnection() {
// create and return jdbc connection// create and return jdbc connection
}}
// when the object gets out of scope// when the object gets out of scope
voidvoid dispose(dispose(@Disposes@Disposes Connection con) {Connection con) {
con.close();con.close();
}}
}}
22. • Gives information about the injection pointGives information about the injection point
Injection point metadataInjection point metadata
@@Produces Logger createLogger(InjectionPointProduces Logger createLogger(InjectionPoint
injectionPoint) {injectionPoint) {
returnreturn Logger.getLogger(injectionPointLogger.getLogger(injectionPoint
.getMember().getDeclaringClass());.getMember().getDeclaringClass());
}}
@Produces@Produces @@HttpParam(HttpParam(""""))
String getParamValue(ServletRequest request,String getParamValue(ServletRequest request,
InjectionPoint ip) {InjectionPoint ip) {
returnreturn request.getParameter(iprequest.getParameter(ip
.getAnnotation(HttpParam..getAnnotation(HttpParam.class)class).value());.value());
}}
}}
23. • Decorators decorate all interfaces theyDecorators decorate all interfaces they
implementimplement
• @Delegate@Delegate is used to inject the originalis used to inject the original
objectobject
• Decorators must be explicitly listed inDecorators must be explicitly listed in
beans.xml, in their respective orderbeans.xml, in their respective order
• Decorators can be abstractDecorators can be abstract
DecoratorsDecorators
@@DecoratorDecorator
publicpublic classclass LogDecoratorLogDecorator implementsimplements Logger {Logger {
@@DelegateDelegate @@AnyAny privateprivate LoggerLogger loggerlogger;;
@Override@Override
publicpublic voidvoid log(String msg) {log(String msg) {
loggerlogger.log(timestamp() +.log(timestamp() + ":"":" + msg);+ msg);
}}
}}
24. • Interceptor bindings (can be nested or includedInterceptor bindings (can be nested or included
in stereotypes)in stereotypes)
InterceptorsInterceptors
@@InterceptorBindingInterceptorBinding // + retention & target// + retention & target
publicpublic @interface@interface TransactionalTransactional{}{}
@@InterceptorBindings @TransactionalInterceptorBindings @Transactional
publicpublic @interface@interface DataAccessDataAccess {}{}
• Declaring the actual interceptor:Declaring the actual interceptor:
@@TransactionalTransactional @@InterceptorInterceptor
publicpublic classclass TransactionInterceptor {TransactionInterceptor {
@@AroundInvokeAroundInvoke
publicpublic Object manage(InvocationContext ctx)Object manage(InvocationContext ctx)
throwsthrows Exception { .. }Exception { .. }
}}
25. • Declaring the interceptor on the target beanDeclaring the interceptor on the target bean
Interceptors (2)Interceptors (2)
@@TransactionalTransactional //all methods are transactional//all methods are transactional
public classpublic class OrderService { .. }OrderService { .. }
• Like decorators, must be enabled in beans.xmlLike decorators, must be enabled in beans.xml
• Interceptors-to-intercepted targets: many-to-Interceptors-to-intercepted targets: many-to-
manymany
• Interceptors-to-interceptor bindings: many-to-Interceptors-to-interceptor bindings: many-to-
manymany
• Binding vsBinding vs @NonBinding@NonBinding interceptor attributesinterceptor attributes
32. Portable extensionsPortable extensions
• CDI allows plugable extensions that can
access the context, hook to context events
• Providing its own beans, interceptors and
decorators to the container
• Injecting dependencies into its own objects
using the dependency injection service
• Providing a context implementation for a
custom scope
• Augmenting or overriding the annotation-
based metadata with metadata from some
other source
33. Portable extensions (2)Portable extensions (2)
• http://seamframework.org/Weld/PortableExte
nsionsPackage
• XML configuration
• Wicket integration
• JavaSE and Servlet container support
34. ConcernsConcerns
• Lack of standardized XML configuration
• Not many „extras“ available yet
• Annotation mess
• CDI interceptors might not be sufficient,
compared to Spring AOP (AspectJ syntax)
• (un)portable extensions may become exactly
what spring is being critized for – size and
complexity
• Complex
• Being a standard?