Thursday, July 29, 2010

24X7 Apache Project Support

Hello;

MechSoft Solutions Group has started to give 24x7 support on Apache Software Foundation Java EE enterprise related Projects, such as

  • Apache MyFaces,
  • Apache OpenJPA
  • Apache OpenEJB
  • Apache Tomcat
  • Apache OpenWebBeans
  • ....
Please do not hesitate to contact with us for further details how we work together!

Contact : MechSoft Contact Addres

Wednesday, July 28, 2010

MechSoft Has Started Web-Ex Java EE Trainings

MechSoft Software Solution Group (http://tiny.cc/spf58) has started to give Java EE trainings using Web-Ex virtual class environments.

Training Topics
  • Java Programming Language
  • Java Swing
  • Java EE Web Techonlogies
  • Java EE Middlware Techonlogies
  • Apache Tomcat
Get further information from http://tiny.cc/v0ke1 .

Pre-Registration: If you wish to pariticipate on any of the above trainings, you can register with pre-registration form, http://tiny.cc/4ls44

Friday, July 16, 2010

Article About Defne

I have written an article about Defne, http://tiny.cc/6khzv

Wednesday, July 14, 2010

Calling Defne Services from AJAX Clients

Hello,

Defne has added AJAX Client support for providing services to pure JavaScript AJAX clients.

How It Works?

We have implemented a DefneJsonServlet that handles the communication with AJAX clients. It gets all related service parameters from the AJAX client, prepare service message and calls service.

Example

Please have a look SVN site, http://tiny.cc/lcusn

Defne Maven Snapshots:

We have published Defne maven snapshots to http://tiny.cc/2fo2w
Beginning with 1.0.1 version, we will publish artifacts to maven central.

Tuesday, July 6, 2010

Writing Web Service with SIwpas in 5 minutes

Writing a web service in 5 minutes with SIwpas! How? Below...

SIwpas uses OpenEJB integration for Web service support, and amazing thing is that you can deploy your EJBs as a WAR archive. Lets start...

1. Create a new Web modules with Eclipse,
2. Code as follows

Web Service Interface

@Local
@WebService(targetNamespace="http://siwpas.webservice/calculator")
public interface ICalculator
{
    public int add(int x, int y);
}

Web Service Implementation

@Stateless
@WebService(endpointInterface="siwpas.webservice.ICalculator",portName="CalculatorWsPort",
        serviceName="CalculatorWs",targetNamespace="http://siwpas.webservice/calculator")
public class CalculatorWs implements ICalculator
{

    @WebMethod
    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
    @Override
    public int add(int x, int y)
    {
        return x+y;
    }

}

That is it! Deploy it int the SIwpas! Your web service is ready to use at
http://localhost:4204/CalculatorWs?wsdl

It is easy, hah!

Download and use SIwpas, http://code.google.com/p/siwpas/

Web Service Example :
http://code.google.com/p/siwpas/source/browse/#svn/trunk/samples/siwpas-webservice

Enjoy!

Using Defne Framework with Java Server Faces

Using Defne Service Framework with Java Server Faces is very easy. Defne provides "JSFEjbServiceExecutorProxy" managed bean instance to invoke the Defne services. We will see an example just in a moment.

Writing Defne Service

Writing a defne service without dependent on any technology is very very easy. Just annotate your class and  its methods. For example, we create a new Defne service, Calculator.

@Service
public class Calculator{
  
     @Operation 
     public static Message add(Message input) throws DefneException
     {
           int x = input.getMessageParameter(Integer.class,"X");
             int y = input.getMessageParameter(Integer.class,"Y");
 
             input.put("Z", x+y);
            
             return input;
     }
}

That is it! We have written our service with named (default class name) "Calculator" and operation name (default method name) "add".

Call Service From JSF Managed Bean

Now, we will call our service using JSF managed bean. Lets say that we have a JSF CalculatorBean,

@ManagedBean  --> JSF 2.0 fashion
public class CalculatorBean{
      
       @ManagedProperty(value="#{jsfServiceExecutorBean}")
       private JSFEjbServiceExecutorProxy executor; --> Injected by the Defne

       private String  x;
       private String y;

       public String addNumbers(){

           Message input = new Message("Calculator","add");
           input.putMessageParameter("X",x);
           input.putMessageParameter("Y",y);
           input.setTransactionPolicy(TransactionPolicy.NO_TRANSACTION);          

           Message output =  executor.execute(input);
           System.out.println(output.getMessageParameter(Integer.class,"Z"));

            return null;
      }
}

That is it!

Get more information on Defne Service Framework,
click http://code.google.com/p/defne/

Saturday, July 3, 2010

SIwpas - CR is Released

We have announced the Candiate Release of the SIwpas, Simple Web Profile Application Server.  With this release we have supported EJB lite functionality via integrating the Apache OpenEJB project.

Now, you can deploy EJBs within your wep applications, a.k.a "collapsed ear". Moreover, you could able to deploy EJB Jar and EAR modules.

Release note could be found on the siwpas main page. Samples are located in the SVN location.

Use SIwpas discussion list for any question, comment etc. located at http://groups.google.com/group/siwpas-discussion

SIwpas Project Page, http://code.google.com/p/siwpas/ 
Download Location  , http://code.google.com/p/siwpas/downloads/list

Enjoy!

Thursday, July 1, 2010

Collapsed EARs a.k.a EJBs in WARs

Java EE 6 supports using of EJBs in web applications. If you do not know how EJBs are simplified starting with Java EE 5, time to look at them again. Lots of folks still think that EJBs are heavy and must be run on the heavy containers. This is not TRUE any more.

EJBs are great because it supports Transactions, Security, Messaging, Scheduling, Asynchronous, and lots of cool enterprise features. But the most important is that "it is A Java EE STANDARD".

For example, our Defne Service Framework is a thin layer on top of this great technology for providing transaction support.

Using EJBs in WARs

This is really the cool feature of Java EE 6. Even before releasing the Java EE 6, OpenEJB has already supported this cool feature. What does it mean? It means that you can bundle your EJBs within your web application archives. How?

Example

@Stateless
public class Calculator implement ICalculator{
      public int add(int x,int y)
}

Use in JSF Bean;
public class CalculatorBean
{
    private @EJB ICalculator calculator;
}

Use in OpenWebBeans Managed Bean
public classd CalculatorBean
{
    private @Inject ICalculator calculator;
}

Use in OpenWebBeans Managed Bean via @EJB
public classd CalculatorBean
{
    private @EJB ICalculator calculator;
}


Coool!!!

That is it! No more configuration files, xmls etc. Bundle all of the necessary classes as a WAR archive and deploy it to the container that supports collapsed ears.

Want to use transaction, security, scheduling, no problem! Just annotate your EJB methods with the necessary annotation marker. Even if you do not want to annotate, there are some default configurations. For example, all business methods within EJBs are automatically Transaction Required.

SIwpas and EJBs

SIwpas Beta-2 will support the EJBs. SIwpas will contain the OpenEJB to support EJBs in WARs.  Beta-2 will be published at the end of this week.

Java EE 6 has a cool features and main motivation is the SIMPLICITY!

Stay tune!