Question 1. What Is Ibatis ?
- A JDBC Framework
o Developers write SQL, iBATIS executes it using JDBC.
o No more try/catch/finally/try/catch.
- An SQL Mapper
o Automatically maps object properties to prepared statement parameters.
o Automatically maps result sets to objects.
o Support for getting rid of N+1 queries.
- A Transaction Manager
o iBATIS will provide transaction management for database operations if no other transaction manager is available.
o iBATIS will use external transaction management (Spring, EJB CMT, etc.) if available.
- Great integration with Spring, but can also be used without Spring (the Spring folks were early supporters of iBATIS).
- A JDBC Framework
Question 2. What Isn’t Ibatis ?
- An ORM
o Does not generate SQL
o Does not have a proprietary query language
o Does not know about object identity
o Does not transparently persist objects
o Does not build an object cache
Essentially, iBatis is a very lightweight persistence solution that gives you most of the semantics of an O/R Mapping toolkit, without all the drama. In other words ,iBATIS strives to ease the development of data-driven applications by abstracting the low-level details involved in database communication (loading a database driver, obtaining and managing connections, managing transaction semantics, etc.), as well as providing higher-level ORM capabilities (automated and configurable mapping of objects to SQL calls, data type conversion management, support for static queries as well as dynamic queries based upon an object’s state, mapping of complex joins to complex object graphs, etc.). iBATIS simply maps JavaBeans to SQL statements using a very simple XML descriptor. Simplicity is the key advantage of iBATIS over other frameworks and object relational mapping tools.
- An ORM
Question 3. What Is Orm?
ORM stands for Object Relations Mapping.
Question 4. Is Hibernate And Ibatis Can Be Used On One Application?
Yes, But it is called as complete Hybrid model. If application is already developed in Hiberante and if you want to achieve reporting moduels we can go for ibatis.But such things never exists in JAVA persistence world.
Question 5. What Is The Difference Between Hibernate And Ibatis In Java?
Hibernate and Ibatis both are the persistance frameworks.
Hibernate will support for procedure invocations and to run normal sql but it is very difficult to make it possible with a normal developer. Where as iBatis is easy to develop and easy to call procedures and functions, no need to struggle for mapping and other things.
When we have multiple joins and complex queries in the application it will be difficult achieve with Hibernate. But it is very easy to handle in Ibatis.
Hibernate works if we have very well data model is well in sync with object model, because ORM solutions like Hibernate map objects to tables. If Object model is not in sync with the data model, in this case we have to do lot of additional coding and complexities are entering into your application.
When application becoming huge and complex our model starts breaking down.
One size does not fit all. In such cases i like to use iBatis.
Ibatis maps maps results sets to objects. so no need to care about table structures. We can retrive the data the way we want. This solution words very well for stored procedures and works effectively for reporting applications etc…
Hibernate for every query result we should have a corrosponding mapping object. Ibatis we can use Collection objects like Map, List or ArrayList.
Use Hibernate : Your environment is driven by object model which is sync with data model and object model wants to generate queries automatially. It is bit complex to implement.
Use Ibatis: You have freedom to write your own queries and easy to maintain. Your environment is driven by relational model. You can work on existing and complex scemas. Easy to implement.
Question 6. Is Ibatis The Best Choice For My Project?
iBATIS is a Data Mapping tool. Its role is to map the columns of a database query (including a stored procedure) to the properties of an object. If your application is based on business objects (including Maps or IDictionary objects), then iBATIS can be a good choice. iBATIS is an even better choice when your application is layered, so that that the business layer is distinct from the userinterface layer.
Under these circumstances, another good choice would be an Object/Relational Mapping tool (OR/M tool), like Hibernate or NHibernate. (Other products in this category are Apache ObjectRelationalBridge and Gentle.NET.) An OR/M tool generates all or most of the SQL for you, either beforehand or at runtime. These products are called OR/M tools because they try to map an object graph to a relational schema.
iBATIS is not an OR/M tool. iBATIS helps you map objects to stored procedures or SQL statements. The underlying schema is irrelevant. An OR/M tool is great if you can map your objects to tables. But they are not so great if your objects are stored as a relational view rather than as a table. If you can write a statement or procedure that exposes the columns for your object, regardless of how they are stored, iBATIS can do the rest.
So, how do you decide whether to OR/M to DataMap? As always, the best advice is to implement a representative part of your project using either approach, and then decide.
But, in general, OR/M is a good thing when you
- Have complete control over your database implementation
- Do not have a Database Administrator or SQL guru on the team
- Need to model the problem domain outside the database as an object graph.
Likewise, the best time to use a Data Mapper, like IBATIS, is when:
- You do not have complete control over the database implementation, or want to continue to access a legacy database as it is being refactored.
- You have database administrators or SQL gurus on the team.
- The database is being used to model the problem domain, and the application’s primary role is help the client use the database model.
In the end, you have to decide what’s best for your project. If a OR/M tool works better for you, that’s great! If your next project has different needs, then we hope you give iBATIS another look.
Question 7. What Is A Business Process?
By definition, a business process is a sequence of tasks that takes place in a repeatable order, executed by humans and/or systems to achieve a business goal. It describes the order (using a flowchart) in which a series of steps needs to be executed. A business process can significantly improve the visibility and agility of a business logic.
Question 8. What Are The Features Of Jbpm?
jBPM is a lightweight, open source, fully embeddable process engine written in Java. Its most notable features are listed below −
- jBPM executes business processes which are designed using the BPMN 2.0 specifications.
- jBPM can be fully integrated with Eclipse and similar IDEs to provide drag and drop support to create a workflow.
- jBPM has UI tools available to involve business analysts and users right from the design phase.
- jBPM supports persistence and transaction management with the help of JPA and JTA.
- One can define custom work item handlers to create a user-defined task which can be used as a component later on for other workflows.
Question 9. What Are The Prerequisites To Install Jbpm Plugin?
The following are the Prerequisites to install jBPM Plugin −
- Java 1.5 (or higher) SE JDK
- Eclipse 4.2 or any version and the jBPM plugin
As jBPM is written in Java, we will be covering how to add the desired plugins.
Question 10. What Are Jbpm5 Components?
BPMS core is the heart of the BPM. The illustration depicts the BPMS core and its components.
The Semantic Module
The semantic module defines the language semantic (what each word means) and how it will be translated for the process engine’s internal structures that are ready to be executed. This module basically contains the essentials to understand the BPMN2 language.
The Process Engine
The process engine is the one responsible for actually executing our business processes. The process engine is in charge of creating new process instances and keeping the state for each of them. Inside the process engine code, the internal structures are defined to represent each activity that is in our process definitions. All the mechanisms that are being used to instantiate these process definitions will execute them as defined in the process engine.
Persistence and Transactions
In most enterprise applications, all the interactions must run inside a transaction boundary, and we must deal with different systems, APIs, and designs. Also, we must have a flexible mechanism to define −
- How to handle long-running processes
- How and when we can we store information about the process status and the information that the process is handling
- How and when we need to create, commit, or roll back the process engine transactions
- Which business exceptions can roll back or compensate already executed business actions
All the above points are covered by persistance and transactions component inside the jBPM.
This module is in charge of giving the user a way to query about how our processes are being executed. This information includes historic information about processes that have already ended and the latest information about the processes that are being executed.
XML Interview Questions
Core Java Interview Questions
Core Java Tutorial
SQL Database Interview Questions
JSP Interview Questions
SQL Database Tutorial