Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Monday, 5 December 2011

Using Verifier in Ant


When deploying the Enterprise JavaBeans, JBoss attempts to verify each bean against the specification to make sure the Bean Developer has fulfilled her contract to implement all the required interfaces. The verifier goes through both session and entity beans making sure the method descriptors do not violate the specification, RMI/IIOP requirements are met, the relevant parts of the deployment descriptor are correct, and so forth.

It is also possible to use the verifier as part of your build process. Using Ant to build your project enables you to verify your Enterprise JavaBeans as you compile them. This removes the extra step of deploying just to verify your ejb-jar file is compliant and deploys correctly in the container. In case of spec violations, you can optionally stop the build process and rework your files to meet the specification requirements. This Howto explains the setup you need to verify your beans early rather than late.

Getting the required files

To use the verifier in Ant you will need two jars copied from the JBoss distribution to your build directory: verifier.jar and metadata.jar. You will find the verifier.jar file in the/dist/bin directory of your JBoss installation, and the metadata.jar in the /dist/external directory.
If you are using the CVS version of JBoss, you can build both of the above mentioned files by executing
src/build> build verifier
in the /src/build directory. This will generate the required packages to the correct directories.

Edit build.xml

A custom verifier task for Ant does not exist at the moment but you can execute the verifier from Ant by creating a new JVM for it using Ant's built in <java> task. For the most up to date information of using the <java> tag, see Ant online documentation.
Below is an example of using the <java> tag to execute the verifier:
<!-- verify the EJBs -->
        <java classname = "org.jboss.verifier.Main" fork="true">
            <classpath refid = "classpath"/>
            <arg value = "${dist.home}/admin.jar"/>
        </java>
      

Friday, 18 November 2011

What Are Web Services?



Web services are distributed application components that are externally available. You can use them to integrate computer applications that are written in different languages and run on different platforms. Web services are language and platform independent because vendors have agreed on common web service standards.
Web service applications are deployed to a Java EE application server, such as GlassFish / Sun Java System Application Server.
This page provides links to some of the NetBeans documents and resources that can help you learn how to develop web service applications with NetBeans IDE.

Thursday, 17 November 2011

Older versions of Java can lead to security threats

Java is well documented. Java was “responsible for between one-third and one-half of all [recent] exploits.” Over the past six month Java was found to be the most common exploit vector in all the cases
Read more about Java and the security threats