Tuesday, November 27, 2018

I’m now accepting students into my Java Programming Fundamentals for Absolute Beginners!

Wednesday, January 2, 2013

Life Cycles

In this post, I would be publishing the life cycles of various Java artifacts such as: Java Object, Threads, Applets, Servlets, Listeners, Filters, JSPs, EJBs, JMS (MDBs), Hibernate, JSF, Struts, WebServices, Spring Bean, Camel Routes.
Also the OSGi based artifacts such as Bundles, Services, Features and so on. I think this would help developers to refresh and refer them when they need them the most.
Struts 2 Life Cycle
OSGi Bundle Life Cycle
Thread Life Cycle
JSF Life Cycle
Servlet Life Cycle, Other one 
Spring Bean Life Cycle
Hibernate Object Life Cycle
iBatis 
JSP Life Cycle

Thursday, October 11, 2012

SOA

SOA the Service Oriented Architecture, is all over my mind. To me as a developer cum designer it means a lot. It is changing the paradigm of how we used to program vs how it is empowering us to design applications in a newer way; so there is shift in terms of writing lots of code to writing lesser code and more configuration.

About Service-oriented_architecture

Differences between SOA and ESB

Here is the new Jargon/terminology I am learning them, keeping abreast of the technology:

OSGi: Features is a collection of Bundles (.jar) but allows export and import of packages

OSGi framework implementations: Felix, Equinox, Knopflerfish, Concierge

Maven: Great support to build OSGi based artifacts

Enterprise Integration Patterns (EIP): 65 to date? Popular ones are listed here:? Read popular book by Gregor Hohpe and Bobby Woolf

Enterprise Service Bus (ESB): Supports communication mechanism between various protocols, file formats, languages. ServiceMix, Fuse, Mule.
Fuse ESB kernel is based on Karaf, an OSGi based run-time/container
Apache Felix: OSGi framework

Routing Engine: Apache Camel

Apache CXF: Supports to host webservices both SOAP, RESTful ways in Spring DM file or in the blueprint

End points: They could be any resource such as specific folder, Webservice, JMS Queues/Topics


Components: Components offer the interface to technologies. JMS, JDBC, FTP, HTTP and many more technologies such as from third parties like amazon cloud services. They need to be configured once in the application.

Processors:In this Java class need to implement Processor interface and override process(Exchange exchange) method. In the route, by default process() is called.

Beans: POJOs are referred to as Beans here. In the route you need to specify which method to invoke

JMS implementation: using Apache/Fuse MQ on the fly by declaring in the Spring file

Blueprint: ?

DSL: Domain specific language to wire Endpoints with/without Processors

Fuse IDE:  supporting canvas based drag and drop EIPs, wiring them

Fuse ESB:  kernel provides native OS integration, so the the application life cycle is bound to the OS

Apache Karaf: Powerful, light weight, OSGi based runtime container for deploying and managing bundles

Exchange: within the context of the Route, it is the message that flows in the route which could be processed by the Processor or to move it from one endpoint to other

Camel Architecture: from http://camel.apache.org/architecture.html


Camel's run-time system can be included anywhere in the JVM environment, including web container (e.g. Tomcat), JEE application server (e.g. IBM WebSphere AS), OSGi container, or even in the Cloud.

Sunday, August 26, 2012

JMS

JMS (specification) stands for Java Messaging Service, which enables Java applications to send and receive messages to and from MoM (Message Oriented Middleware) in an Asynchronous fashion. It means the Receiver at the other end does not need to be present for the Sender to send the message, does not need to wait/check for Receiver to be running. If Receiver is running it means it is listening to the Destination. Destination could be Queue or Topic based upon the messaging model configuration Point to Point(PtP) or Publish/Subscribe (Pub/Sub) models.

PtP model: Upon message being published to the Queue by the Sender, out of N Receivers, it will be consumed by only one Receiver. It is like a race condition for the Receivers to grab that message.

Pub/Sub model: Upon message being published to the Topic by the Sender, all of N Receivers receive the same message. You can visualize it as a message Broadcasting setup.

Note: in model models Sender and Receivers must be registered to the Destinations

Messages are of 5 types that could be sent over in both models: Text, Map, Stream, Object and Byte

Applications of JMS: CRM systems, Inventory control systems, Search applications







Java Class Loaders Notes

Class loaders are hierarchical. Child class loaders ask parent to load the class, if parent is not able to then child loads the class, there by maintaining uniqueness. All classes loaded by parent are accessible to child class loaders, but opposite is not true. Question arised in my mind: Child asked the parent to load the class, but due to some issue, parent was not able to load, so child loads it in the JVM. At some point later parent needs that class and obviously parent cannot see what child class loaders' classes are loaded in JVM, so would the parent too loads that class in the JVM? What happens to the uniqueness of the same class?

See NoClassDefFoundError which also occurs at run-time but was available at compile time, obviously forgot to specify it in run time classpath. ClassNotFoundException occurs also occurs at run-time, but you are loading it explicitly using Class.forName and it is not found in JVM, which you have mentioned it right. So in both cases the class is not found at run-time in JVM.

Monday, January 16, 2012

Technology Stack at the new job

Technology Stack at the new job: Enterprise based Insurance mgt. System. Portland, OR

The project is under development since about 2 yrs, then I joined the project, I am hired to fix the bugs related to the application, so I learn the system and technology involved. -Expectation: fix bugs and become aware of the system during fixes.

Obviously there is a lot of code involved which the other developers have implemented and has been moved on to other projects. Expectation -Just fix them.

Working with current developers, they have rich experience with the system. BSAs work on requirements awa with Quality. Expectation -Work with them

IBM Rational Application Developer 8.1
IBM Websphere 7.x (Cell=5HD0HM1Node01Cell, Profile=was70profile1)
Aqua Data Studio 7.5 (for querying database like toad)
Servlet 2.5
JSP: ??
Tools: hbm2java
Web framework: JSF 2.0??? (facelets included)
JEE 5 specification includes JSF
JSF: Sun Implementation version?
JSF component libraries: RichFaces 3.3.1 (does not includes Ajax4Jsf, but Richfaces 4.x does it)
Facelets
JBoss Seam 2.2 framework
JQuery
Hibernate: 3.1 (includes annotations)
Log4j
ehcache 2.2
Spring 2.5.6
Jconnect3 6.05
Code Repository: CVS
Junit 4.4
Database: Sybase

Maven not yet!! Hopefully they will ask for my help in later phase. Mavenize!!