Monday, April 8, 2019
On April 08, 2019 by Kamlesh No comments
Since most of the spring boot configurations are done by annotations,it is better if we go through what annotations are first.
Annotation : provides information about the program that is annotated with and it is not part of the program itself.
These annotations can be run time or compile time annotations
Compile Time Annotations
Compile time annotations are checked by the compiler at compile time.
public interface Test {
public void add(int a,int b);
}
class Tester implements Test{
@Override
public void add(int a, int b) {
}
}
In the above code Annotation @Override is compile time,if you try to add or remove any parameter it will show an error in IDE itself.
Run Time Annotations
As the Compile time annotation,run time annotation checks for run time information about the program that is annotated with.
Annotation : provides information about the program that is annotated with and it is not part of the program itself.
These annotations can be run time or compile time annotations
Compile Time Annotations
Compile time annotations are checked by the compiler at compile time.
public interface Test {
public void add(int a,int b);
}
class Tester implements Test{
@Override
public void add(int a, int b) {
}
}
In the above code Annotation @Override is compile time,if you try to add or remove any parameter it will show an error in IDE itself.
Run Time Annotations
As the Compile time annotation,run time annotation checks for run time information about the program that is annotated with.
On April 08, 2019 by Kamlesh No comments
Setting up Spring Boot
Best way to set up a spring boot application is by Spring Intializer,Where you can add all the dependencies required ,download and import it in IDE.
OR
Create a new maven or gradle project and all the dependencies manually.
OR
Start a spring starter project from spring tools suite IDE
To start an application,just run Generated MainApplication.java file which starts the embedded server.
import org.springframework.boot.SpringApplication;
@SpringBootApplication
public class MainApplication {
public static void main(String[] args) {
SpringApplication.run(MainApplication.class, args);
}
}
Just run the MainApplication.java as classic java application, Once the server is up,you can request for resources.
Let's create some resources in coming chapters.
Best way to set up a spring boot application is by Spring Intializer,Where you can add all the dependencies required ,download and import it in IDE.
OR
Create a new maven or gradle project and all the dependencies manually.
OR
Start a spring starter project from spring tools suite IDE
To start an application,just run Generated MainApplication.java file which starts the embedded server.
import org.springframework.boot.SpringApplication;
@SpringBootApplication
public class MainApplication {
public static void main(String[] args) {
SpringApplication.run(MainApplication.class, args);
}
}
Just run the MainApplication.java as classic java application, Once the server is up,you can request for resources.
Let's create some resources in coming chapters.
On April 08, 2019 by Kamlesh No comments
Why spring boot was introduced when we had all the comforts of frameworks spring like mvc,hibernate etc
One main reason to remove all the configurations that would take plenty of time to just setup the framework.
Setting up the traditional Spring MVC framework includes
Adding Internal View Resolvers
Setting up Hibernate Session Factory
Connection to Database etc
Sample Code of Component scan and internal view resolver in tradition mvc approach is as shown below
<context:component-scan base-package="com.example.spring.dao"></context:component-scan>
<context:component-scan base-package="com.example.spring.controllers"></context:component-scan>
<context:component-scan base-package="com.example.spring.services"></context:component-scan>
<mvc:annotation-driven/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsps/" />
<property name="suffix" value=".jsp" />
</bean>
Above Code is replaced in just two lines in spring boot using Annotations.
Annotations are widely used in spring boot,All the configurations are replaced by single line annotations, so that the developer can concentrate on business logic rather than spending more time on configuring.
We will see how single line annotations can replace the traditional xml in chapter "Annotations".
One main reason to remove all the configurations that would take plenty of time to just setup the framework.
Setting up the traditional Spring MVC framework includes
Adding Internal View Resolvers
Setting up Hibernate Session Factory
Connection to Database etc
Sample Code of Component scan and internal view resolver in tradition mvc approach is as shown below
<context:component-scan base-package="com.example.spring.dao"></context:component-scan>
<context:component-scan base-package="com.example.spring.controllers"></context:component-scan>
<context:component-scan base-package="com.example.spring.services"></context:component-scan>
<mvc:annotation-driven/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsps/" />
<property name="suffix" value=".jsp" />
</bean>
Above Code is replaced in just two lines in spring boot using Annotations.
Annotations are widely used in spring boot,All the configurations are replaced by single line annotations, so that the developer can concentrate on business logic rather than spending more time on configuring.
We will see how single line annotations can replace the traditional xml in chapter "Annotations".
On April 08, 2019 by Kamlesh No comments
Before staring with Spring Boot,You need to have basic knowledge of spring core to get better understanding of spring boot.
Lets start ...
What is spring boot?
Spring boot acts as a tool to build microservice.
What is microservice?
Microservice is a software architecture style that structures an application with collection of loosely coupled components.
Definition looks little complex?
Lets break it down!!
1. Microservice is a software architecture
Architecture can be defined as set of certain rules to develop an application.
2. It structures an application with collection of loosely coupled components
The Architecture structures an application which may contain many components,It can be ORM's,Data Providers,JPA etc that are loosely coupled (does not depend on one other).
What exactly is microservice,In general way??
It is very difficult to explain what microservice is in just one shot,I will try my best here,
Just think microservice as a container which comes with no precise definition of architectural style,You can plug in whichever server you like to deploy the application, add your favorite ORM's, etc,it is a production ready system,it is as simple as running classic "java main class".
Here Spring boot basically aims in bootstrapping and deploying the spring packed project in a easy and quick way.
Lets start ...
What is spring boot?
Spring boot acts as a tool to build microservice.
What is microservice?
Microservice is a software architecture style that structures an application with collection of loosely coupled components.
Definition looks little complex?
Lets break it down!!
1. Microservice is a software architecture
Architecture can be defined as set of certain rules to develop an application.
2. It structures an application with collection of loosely coupled components
The Architecture structures an application which may contain many components,It can be ORM's,Data Providers,JPA etc that are loosely coupled (does not depend on one other).
What exactly is microservice,In general way??
It is very difficult to explain what microservice is in just one shot,I will try my best here,
Just think microservice as a container which comes with no precise definition of architectural style,You can plug in whichever server you like to deploy the application, add your favorite ORM's, etc,it is a production ready system,it is as simple as running classic "java main class".
Here Spring boot basically aims in bootstrapping and deploying the spring packed project in a easy and quick way.
On April 08, 2019 by Kamlesh No comments
This tutorials contains full end to end discussion on spring boot for beginners.The topics are well constructed, source code is available for each topic which can be downloaded and deployed in any IDE.
This "Spring Boot Tutorials" Contains
Spring Boot Introduction
What is Spring Boot?
Why Spring Boot?
Creating a Spring Boot Project
Annotations
Spring Boot Controllers
Spring Boot Configurations using YAML
Spring Boot JPA
Introduction to Spring Boot JPA
CRUD Operations using Spring Boot JPA
Implementing own method using Spring Boot JPA
Spring Security
Introduction to Spring Security
Spring Security Implementation
Use navigation to go through the tutorials, I would suggest to go through all the topics without skipping any. If you have any doubts or any examples are not working,please let us know in the comment section or contact us.
This "Spring Boot Tutorials" Contains
Spring Boot Introduction
What is Spring Boot?
Why Spring Boot?
Creating a Spring Boot Project
Annotations
Spring Boot Controllers
Spring Boot Configurations using YAML
Spring Boot JPA
Introduction to Spring Boot JPA
CRUD Operations using Spring Boot JPA
Implementing own method using Spring Boot JPA
Spring Security
Introduction to Spring Security
Spring Security Implementation
Use navigation to go through the tutorials, I would suggest to go through all the topics without skipping any. If you have any doubts or any examples are not working,please let us know in the comment section or contact us.
Monday, September 4, 2017
On September 04, 2017 by Kamlesh No comments
Creating My First Process Extension
while developing PX for Agile PLM, the most important part is project structure.
- Create a Java Project in Eclipse
- Under source folder add META-INF folder
- Create services folder under META-INF
- Create com.agile.px.ICustomAction file in services folder
So the project structure should be like :
Project
=>src
=>com.first.px
=>HelloWorld.java
=>META-INF
=>services
=>com.agile.px.ICustomAction
=>src
=>com.first.px
=>HelloWorld.java
=>META-INF
=>services
=>com.agile.px.ICustomAction
What does com.agile.px.ICustomAction:
This file contains the full name of the PX class, when we say full name it means name of the class along with package. In our case this file will contain
com.first.px.HelloWorld
Note: In this file we dont need to specify .class or .java extension
Why this structure:
This structure is important because when we deploy our jar in extensions folder, Agile PLM reads the structure and gets the PX class name from META-INF->services->com.agile.px.ICustomAction file. If we miss this structure PX framework will not be able to read it.
Code:
Every PX needs to implement ICustomAction Interface in order to recognized as PX in Agile PLM. The only method that needs to override/impelent is doAction. This method will provide our process extension following from PX framework.
- Session
- node
- IDataObject which is current business object like Part, Document, change etc
here is a demo code that can be used to create a hello world PX
package com.first.px;
import com.agile.api.APIException;
import com.agile.api.IAgileSession;
import com.agile.api.IDataObject;
import com.agile.api.INode;
import com.agile.px.ActionResult;
import com.agile.px.ICustomAction;
import com.agile.api.IAgileSession;
import com.agile.api.IDataObject;
import com.agile.api.INode;
import com.agile.px.ActionResult;
import com.agile.px.ICustomAction;
public class HelloWorld implements ICustomAction {
@Override
public ActionResult doAction(IAgileSession session, INode arg1,IDataObject object) {
String objectName="";
try {
objectName= object.getName();
} catch (APIException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// TODO Auto-generated method stub
return new ActionResult(ActionResult.STRING, objectName);
}
public ActionResult doAction(IAgileSession session, INode arg1,IDataObject object) {
String objectName="";
try {
objectName= object.getName();
} catch (APIException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// TODO Auto-generated method stub
return new ActionResult(ActionResult.STRING, objectName);
}
}
Note: Please add AgileAPI.jar in your project class path in order to compile your PX.
Saturday, July 11, 2015
On July 11, 2015 by Kamlesh 1 comment
SOA Infrastructure Application
The SOA Infrastructure is a Java EE-compliant application running in Oracle WebLogic Server. The application manages composites and their lifecycle, service engines, and binding components.
You deploy SOA composite applications designed in Oracle JDeveloper to a partition of your choice on the SOA Infrastructure. Partitions are separate sections of your SOA Infrastructure that enable you to logically group the composite applications for ease of management.
SOA Composite Applications
· Service components such as Oracle Mediator for routing, BPEL processes for orchestration, BPMN processes for orchestration (if Oracle BPM Suite is also installed), human tasks for workflow approvals, spring for integrating Java interfaces into SOA composite applications, and decision services for working with business rules.
· Binding components (services and references) for connecting SOA composite applications to external services, applications, and technologies.
SOA Composite Application Instances
When a SOA composite application is invoked, a new composite instance is created. This instance is identified by a unique instance ID that is displayed in pages of Oracle Enterprise Manager Fusion Middleware Control. For example, instance IDs displayed for SOA composite applications in the Instances page of the SOA Infrastructure. You can click these IDs to access more specific details about the state of SOA composite application instances. From the Instances page, you can also monitor the state of SOA composite application instances.
Instances that you create as unit tests from the Test Runs page are distinguished from those created automatically or created manually from the Test Web Service page by a little yellow box. This box is displayed to the left of the instance ID. This box is visible in both the Instances page and in the Recent Instances table of the Dashboard page of the SOA Infrastructure and SOA composite application.
Service Components and Service Component Instances
SOA composite applications include service components. Service components are the basic building blocks of SOA composite applications. Service components implement a part of the overall business logic of the SOA composite application.The following service components can be used in a SOA composite application:
· BPEL process: For process orchestration of synchronous and asynchronous processes
· BPMN process (if Oracle BPM Suite is installed): For creating and modeling business processes using Business Process Management Notation and Modeling (BPMN)
· Oracle Mediator: For content transformation and routing events (messages) between service producers and consumers
· Human task: For modeling a human task (for example, manual order approval) that describes the tasks for users or groups to perform as part of an end-to-end business process flow
· Spring: For integrating Java interfaces into SOA composite applications
· Decision service: For making a decision or for processing based on business rules
Binding Components
Binding components connect SOA composite applications to external services, applications, and technologies (such as messaging systems or databases). Binding components are organized into two groups:
· Services: Provide the outside world with an entry point to the SOA composite application. The WSDL file of the service advertises its capabilities to external applications. The service bindings define how a SOA composite service can be invoked (for example, through SOAP).
· References: Enable messages to be sent from the SOA composite application to external services (for example, the same functionality that partner links provide for BPEL processes, but at the higher SOA composite application level).
Service Engines
The SOA Infrastructure includes a set of service engines (BPEL process, human workflow, decision service, Oracle Mediator, and spring) that execute the business logic of their respective components within the SOA composite application (for example, a BPEL process). If Oracle BPM Suite is installed, the SOA Infrastructure also includes the BPMN process service engine.
Service Infrastructure
The service infrastructure provides the internal message transport infrastructure for connecting components and enabling data flow. The service infrastructure is responsible for routing messages along the wire connections between services, service components, and references.
Contents of SOA Composite Applications
Your SOA composite application can consist of a variety of service components, binding components, and services that you administer from Oracle Enterprise Manager Fusion Middleware Control:
- BPEL processes
- BPMN processes (if Oracle BPM Suite is installed)
- Human workflows
- Oracle Mediator
- Decision services (Oracle Business Rules)
- Spring
- JCA adapters
- HTTP binding
- EJB service
- Direct binding service
- Oracle Application Development Framework (ADF) Business Component service
- Oracle BAM
- Oracle B2B
- Business events
- Oracle User Messaging Service
What Is Oracle Business Process Management Suite?
Oracle BPM Suite provides an integrated environment for developing, administering, and using business applications centered on business processes.
Oracle BPM Suite provides the following:
- Enables you to create process models based on standards with user-friendly applications. It enables collaboration between process developers and process analysts. Oracle BPM supports BPMN 2.0 and BPEL from modeling and implementation to runtime and monitoring.
- Enables process analysts and process owners to customize business processes and Oracle Business Rules.
- Provides a web-based application for creating business processes, editing Oracle Business Rules, and task customization using predefined components.
- Expands business process management to include flexible, unstructured processes. It adds dynamic tasks and supports approval routing using declarative patterns and rules-driven flow determination.
- Enables collaboration with Process Space, which drives productivity and innovation.
- Unifies different stages of the application development lifecycle by addressing end-to-end requirements for developing process-based applications. Oracle BPM Suite unifies the design, implementation, runtime, and monitoring stages based on a service component architecture (SCA) infrastructure. This allows different personas to participate through all stages of the application lifecycle.
Oracle BPM Suite is layered on Oracle SOA Suite and shares many of the same product components, including:
- Oracle Business Rules
- Human workflow
- Oracle adapter framework for integration
Configuration of Oracle SOA Suite and Oracle BPM Suite
You can perform Oracle SOA Suite and Oracle BPM Suite configuration tasks in Oracle Enterprise Manager Fusion Middleware Control. Configuration tasks consist of setting properties such as audit levels and payload validation for your environment. Properties can be set at the following levels:
- SOA Infrastructure (impacting all SOA composite applications)
- Service engines (impacting all service components that execute in the service engine, no matter the SOA composite application in which they are included)
- SOA composite application (impacting all service components that are included in that composite application)
- Oracle B2B bindings
- Service and reference binding components message header properties
Subscribe to:
Posts (Atom)
Search
AdSense
Recent Posts
Popular Posts
-
WLST Script for checking the health status of Weblogic Domain (Admin/Managed node) After long time writing something about WLST WLST...
-
WLST Script for checking the status of JDBC Datasource in Weblogic WLST has some good features like we can monitor the weblogic dom...
-
WLST Script for Monitoring the JMS status of Weblogic Domain After long time writing something about WLST WLST has some good feature...
-
WLST Server Start The server of a WebLogic domain can be started using different techniques. The best setup depends on the technical re...
-
How to Deploy Application using WLST We can use WLST to quickly deploy an Application in a Weblogic Server. Requirement:- · The ...
-
How to create WebLogic Domain using Domain template: 1. Open an existing domain template (assuming WebLogic Server is installed at c:...
-
Basic concepts of WLST. What is WLST? It is a scripting tool offered by Weblogic. Any way WLST is not only for a sense of control,...
-
Hi All, writing something about OPMN utility with oracle instance and Weblogic. WebLogic Server – Weblogic is J2EE application ...
-
Hadoop Distributed Filesystem (HDFS) Built to support high throughput, streaming reads and writes of extremely large files. NAS ...
-
Before diving into this implementation, I would suggest you to look at Spring Security Introduction first. Let's Start Most of the We...
Recent Posts
Sample Text
Blog Archive
-
▼
2019
(13)
-
▼
April
(13)
- Spring MVC vs Spring Boot
- Spring Security With Spring Boot Example
- What is Spring Security?
- Adding your own implementation in JPA
- Crud Operations using Spring Data JPA
- What is Spring Boot JPA?
- YAML and Application.Properties Configuration in S...
- How Controller works in Spring Boot?
- What is Annotation?
- Setting up Spring Boot
- Why Spring Boot?
- What is Spring Boot?
- Spring Boot Tutorials
-
▼
April
(13)
Total Pageviews
Find Us On Facebook
Powered by Blogger.