Sunday, October 23, 2016

How to Create a Bootable USB Drive Without Using Any Software?

For windows PC user: How to Create a Bootable USB Drive Without Using Any Software?

To create a bootable USB drive manually, we will use the Command Prompt as a Windows default program. Here are step by step to create a bootable USB drive as the Windows installation media. To create a bootable USB drive as a Windows installation media, we require at least 4 GB for minimum capacity. Larger capacity is better. At this moment, I use the USB flash drive with 2 GB of capacity as just an example. It's due to some reasons that my 4 GB flash drive encountered an unusual problem that i have to fix later. :D

N.B: Very Carefully look at the picture.  Size of Disk 1 is 1910 MB. Which is the size of your pendrive/ USB flash drive. It needs to be selected. 

Caution: In step 4, If you select Disk 0[which is 298 GB, specifically your Hard Drive], you will loose all your hard drive data.
  1. Insert your USB flash drive to your running computer. As the first step, we need to run Command Prompt as administrator. To do this, we need to find cmd by typing 'cmd' in the search box on Windows Start Menu. After search result for 'cmd' appears, right click on it and select "Run as administrator".
  2. Type 'diskpart' on Command Prompt (without quotes) and hit Enter. Wait for a while until the DISKPART program run.
  3. Type 'list disk' to view active disks on your computer and hit Enter. There would be seen that the active disks shown as Disk 0 for hard drive and Disk 1 for your USB flashdrive with its total capacity.
  4. Type 'select disk 1' to determine that disk 1 would be processed in the next step then hit Enter.
  5. Type 'clean' and hit Enter to remove all of data in the drive.
  6. Type 'create partition primary' and hit Enter. Creating a primary partition and further recognized by Windows as 'partition 1'.
  7. Type 'select partition 1' an hit Enter. Choosing the 'partition 1' for setting up it as an active partition.
  8. Type 'active' and hit Enter. Activating current partition.
  9. Type 'format fs=ntfs quick' and hit Enter. Formatting current partition as NTFS file system quickly.
  10. Type 'exit' and hit Enter. Leaving DISKPART program but don't close the Command Prompt instead. We would still need it for next process.
Resource Link: http://www.instructables.com/id/How-to-Create-a-Bootable-USB-Drive-Without-Using-A/
 

Thursday, October 20, 2016

JMeter Installation Procedure Step by Step

Steps to Install JMeter

Step 1) Install Java
Because JMeter is pure Java desktop application, it requires a fully compliant JVM 6 or higher.

In Window/Linux, go to Terminal
Enter command java -version

Step 2) Download Jmeter
You can download Latest version of JMeter from here
http://jmeter.apache.org/download_jmeter.cgi

Choose the Binaries file (either zip or tgz) to download as shown in figure below

Step 3) Installation
You simply unzip the zip/tar file into the directory where you want JMeter to be installed.

installation directory structure should look like as figure below




Step 4) Launch JMeter
You can start JMeter in 3 modes

1. GUI Mode
2. Server Mode
3. Command Line Mode

1. Start JMeter in GUI Mode
If you are using Window, just run the file /bin/jmeter.bat to start JMeter in GUI mode as shown below

Following figure annotates the various components in the JMeter GUI


2. Start JMeter in Server Mode
Server mode is used for distributed testing. This testing works as client-server model. In this model, JMeter runs on server computer in server mode. On client computer, JMeter runs in GUI mode.

To start the server mode, you run the bat file bin\jmeter-server.bat as below figure


3. Start JMeter in command line mode
JMeter in GUI mode consumes much computer memory. For saving resource, you may choose to run JMeter without the GUI. To do so, use the following command options

This is a command line example

$jmeter -n -t testPlan.jmx - l log.jtl -H 127.0.0.1 -P 8000


Resource Link: All documents are copied from following link for study purpose.
 http://www.guru99.com/guide-to-install-jmeter.html


Wednesday, October 19, 2016

How does EJB and JPA relate?

JPA has been designed to replace EJB2 entity beans, and has started as a part of the EJB3 specification.
Since it makes sense to also use JPA outside of an EJB container, it has now its own specification, but it's still related to EJB3, since a compliant EJB3 container has to provide a JPA implementation, which integrates into the transaction handling of the container.

EJB2 had "entity beans" which were a third type of component. EJB3 has JPA, which has "entities". But I don't think they're considered as "EJB components" anymore. They're just called JPA entities.

2. Up until version 2.1 of the EJB specifications, an entity bean class had to implement the javax.ejb.EntityBean interface and provide an implementation for boilerplate methods such as ejbLoad, ejbStore, ejbActivate, and ejbPassivate.
EJB 3.0 adopted the JPA specification. The very notion of an entity bean was superceded by the simpler notion of a JPA entity. To create such entity, no interface implementation or boiler plate methods are required. The entity is a POJO that has the @Entity annotation.
Thus, in practice the use of "entity bean" EJBs in Java EE applications is dead (buried under JPA) as of EJB 3.

You are right. JPA has more to do than only supporting EJB. Thats the reason why JPA became a separate JSR or specification. EJB uses or enables the usage of JPA in its specification, simply because JPA is a good standard. You can now switch between JPA vendors without changing your code if designed properly.
EJB specification can be used independent of JPA (although JPA has been included as a part of EJB spec) and likewise JPA can be used for many more stuff outside the EJB spec. Nevertheless, EJB specification enables the injection of JPA Entitiy Manager (and its usage) into its beans very easily which makes programming easier. Ofcourse this can now be achieved easily using a new JSR on CDI :-).
All the application server that supports EJB spec, should support JPA also. You can see this threadfor more information.

Hibernate is an implementation of the JPA spec.

Pros of Agile methods

  • Working software is delivered much more quickly and successive iterations can be delivered frequently, at a consistent pace.
  • There is closer collaboration between developers and the business.
  • Changes to requirements can be incorporated at any point of the process – even late in development.
  • It gives the opportunity for continuous improvement for live systems
  • It is highly transparent
Pros of the waterfall method
·        Potential issues that would have been found during development can be researched and bottomed out during the design phase. If appropriate meaning an alternate solution is selected before any code is written.
·        The development process tends to be better documented since this methodology places greater emphasis on documentation like requirements and design docs. Many organisations find this reassuring.
·        Because the waterfall process is a linear one it is perhaps easier to understand, especially for non-developers or those new to software development. Often teams feel more comfortable with this approach.

Cons of the waterfall method

·        Often the people we’re building software for (the client) don’t know exactly what they need up front and don’t know what’s possible with the technology available. This way of working doesn’t handle this well.
·        Solution designers often aren’t able to foresee problems that will arise out of the implementation of their designs.
·        Changes to requirements (e.g. like those resulting from new technologies, changes in a market or changes to business goals) can’t easily be incorporated with the waterfall method and there are often laborious change control procedures to go through when this happens
·        The process doesn’t have its own momentum


Web Services good link

Monday, October 17, 2016

Axis2 good link

How to enable HTTPS with AXIS 2

I've been using AXIS2 for a couple of months now and decided to take the HTTPS / SSL plunge. The following notes are guidelines on how I configured HTTPS with AXIS2.

I am using Tomcat 6, so firstly you need to enable HTTPS in Tomcat:
1) Create a keystore with the following command and enter the required values:
  keytool -genkey -alias tomcat -keyalg RSA -validity 365
2) Then copy this file to a directory e.g. /usr/share/tomcat6/.keystore
3) Edit the Tomcat server.xml e.g. /etc/tomcat6/server.xml and add the following section inside the <Service name="Catalina"> tag

 <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
                keystorePass="yourkeystorepassword" keystoreFile="/usr/share/tomcat6/.keystore"
               clientAuth="false" sslProtocol="TLS" /> 
(replace yourkeystorepassword with the password you used in step 1)
4) Restart Tomcat and test that you can access Tomcat via HTTPS on port 8443 (you will get a certificate error in your browser as it's not a trusted certificate).

Now onto AXIS2:
5) I downloaded the axis2.war file.
6) Extract the war file with unzip to a empty directory.
7) Edit the WEB-INF/conf/axis2.xml file
8) Change this:
<transportReceiver name="http"
                       class="org.apache.axis2.transport.http.AxisServletListener"/> 
to this:
   <transportReceiver name="http"
                       class="org.apache.axis2.transport.http.AxisServletListener">
        <parameter name="port">8080</parameter>
    </transportReceiver>
    <transportReceiver name="https"
                       class="org.apache.axis2.transport.http.AxisServletListener">
        <parameter name="port">8443</parameter>
    </transportReceiver>
9) Now restart Tomcat and go to the HappyAxis(https://localhost:8443/axis2/axis2-web/HappyAxis.jsp) page. You'll see you get some internal server error. This is because Tomcat does not have the keystore configured for AXIS2 to use.
I fixed this by adding the following JAVA_OPT options:
        JAVA_OPTS="$JAVA_OPTS -Djavax.net.ssl.trustStore=\"/usr/share/tomcat6/.keystore\" - Djavax.net.ssl.trustStorePassword=\"yourkeystorepassword\""
(replace yourkeystorepassword with the password you used in step 1)
10) Check HappyAxis page and WSDL -> https://localhost:8443/axis2/services/Version?wsdl

All done no mess no fuss :)


Fairy's Blog