Monday, December 31, 2007

TOD

Keeping yourself motivated can be challenging. How often do you encourage yourself? Motivation can come in many forms, but the best kind of motivation is when you motivate yourself. Here are some simple self-motivation tips you can start using today


• Give yourself an incentive
• Think positive
• Acknowledge your success thus far
• Make it fun

Attitudes Can Shape Your Life

We all have experienced the effects of a negative attitude. It’s rotten, and it eats at your mind, heart and soul. A negative attitude is dangerous and it eats at you slowly and quietly. Sometimes you don’t even realize what a negative attitude you have, until it’s pointed out to you.

Power of Positive Thinking

Do you practice positive thinking everyday? The art of positive thinking is a simple one, but one that is practiced and learned with time. Test yourself to see where your positivity lies.


Friday, November 30, 2007

What is SRS ? How it is different from URS

SRS is nothing but a Software Requirement Specification. Is a document.This document contains a software specifications. Using this document only the Developer can develop the Software.

The term URS is nothing but a User Requirement Specification.
Both SRS and URS is same.

Thursday, October 04, 2007

Good article about Test Driven Development (TDD)

Very good article about the test driven development .

link --> http://www.agiledata.org/essays/tdd.html


Introduction to Test Driven Development (TDD)

www.agiledata.org: Techniques for Successful Evolutionary/Agile Database Development

Sunday, September 23, 2007

Newton's Laws of Stock Market Trading

This revelation had me surprised too. I was idly flipping through my old physics textbooks yesterday when it suddenly struck me. I was amazed to realizethat Sir Issac Newtons laws of physics points to so many profound and important rules in the stock marketstoday. So, here we are the physics of the stock markets.http://stockoptioni nformation. blogspot. com/2007/ 09/newtons- laws-of-stock- market-trading. html

Tuesday, August 21, 2007

Fundamental truth

To comprehend the unity of body, mind and Atma (spirit) is to realize a fundamental truth. The body is gross. The Atma is subtle. It is the mind that links the two. If the Atma is ignored, man is reduced to the level of the animal. When the body and the Atma are ignored and the mind alone is active, the humanness comes to the fore. When the body and the mind are kept out and the Atma alone is experienced, Divinity is attained. How is this to be achieved? An essential requisite is Thyaga, the spirit of sacrifice.

Saturday, August 18, 2007

With what attitude should we do service?

Daya or compassion is not mere display of kindness or sympathy to someone in distress. It calls for complete identification with the suffering experienced by another and relieving that suffering as a means of relieving the agony experienced by oneself...When any service or help is rendered to anyone, this is the spirit in which it should be done. You must feel you are helping yourself when you are helping another.

Monday, August 13, 2007

What does 'purity of mind' mean? How can we practise it?

Purity of the mind calls for total elimination of attachments and aversions from the mind. Hatred and envy should have no place...Today people are filled with hatred and envy. They cannot bear to see others happy or prosperous. This is a sign of a polluted mind. One should cultivate the large-heartedness to return good for evil and not to cause pain to anyone in any circumstance. This is a mark of a pure mind.

Saturday, August 11, 2007

TOD

1. Fault: is the failure to perform a pre-defined command, adeviation between the expected and actual behaviour (per the specification or requirements) .

2. Deficiency: is when a command execution or a justified expectation is not fulfilled accordingly.

3. A failure or an external fault is when a fault becomes visible to the user or tester.

4. An error condition - also defect or bug or internal fault - is the cause of the failure, e.g. wrongly programmed or forgotten command in the program.

5. Fault masking means that two or more error conditions apparently compensate for each other, so that a failure does not occur until one of the masking errors is corrected.

6. An error is the cause of an error condition or defect due to human action, like faulty programming by the developer.

7. Debugging is intended to localise the (internal) fault and cure the defect, testing is intended to directly and systematically discover failures (which point to defects).

Tuesday, July 31, 2007

TOD

I like to share some definitions about TEST CASES ...

The most common definition of a test case is a set of conditions or
variables under which a tester will determine if a requirement or use
case upon an application is partially or fully satisfied. It may take
many test cases to determine that a requirement is fully satisfied. In
order to fully test that all the requirements of an application are met,
there must be at least one test case for each requirement unless a
requirement has sub requirements. In that situation, each sub
requirement must have at least one test case.

If the application is created without formal requirements, then test
cases can be written based on the accepted normal operation of programs
of a similar class. In some schools of testing, test cases are not
written at all but the activities and results are reported after the
tests have been run.

Under special circumstances, there could be a need to run the test,
produce results, and then a team of experts would evaluate if the
results can be considered as a pass. This happens often on new products'
performance number determination. The first test is taken as the base
line for subsequent test / product release cycles.

Extend your career beyond Software Testing

Today's TIP is on building your carrier as a QA engineer.

Many of the happiest and most successful people in Software Testing has exposure to various fields and environment.
Spending your time finding and criticizing other people's mistake gets old.
Try something else. Build skills in another area of Software Development.
Make your own mistakes. This will help you to improve on programming and develop skills.

Also learn about Documentation, System Support, Pre-Sales etc.

TOD: New terms in Testing

Tuning Cycle Tests
A series of test cycles can be executed with a primary purpose of identifying tuning opportunities. Tests can be refined and re-targeted 'on the fly' to allow technology support staff to make configuration changes so that the impact of those changes can be immediately measured.


Soak Tests (a.k.a. Endurance Testing)
Soak testing is running a system at high levels of load for prolonged periods of time. A soak test would normally execute several times more transactions in an entire day (or night) than would be expected in a busy day, to identify and performance problems that appear after a large number of transactions have been executed. Also, due to memory leaks and other defects, it is possible that a system may ‘stop’ working after a certain number of transactions have been processed. It is important to identify such situations in a test environment.


Thick Client Application Tests
A Thick Client (also referred to as a fat client) is a purpose built piece of software that has been developed to work as a client with a server. It often has substantial business logic embedded within it, beyond the simple validation that is able to be achieved through a web browser. A thick client is often able to be very efficient with the amount of data that is transferred between it and its server, but is also often sensitive to any poor communications links. Testing tools such as WinRunner are able to be used to drive a Thick Client, so that response time can be measured under a variety of circumstances within a testing regime.

Developing a load test based on thick client activity usually requires significantly more effort for the coding stage of testing, as VUGen must be used to simulate the protocol between the client and the server. That protocol may be database connection based, COM/DCOM based, a proprietary communications protocol or even a combination of protocols.

Thin Client Application Tests

An internet browser that is used to run an application is said to be a thin client. But even thin clients can consume substantial amounts of CPU time on the computer that they are running on. This is particularly the case with complex web pages that utilize many recently introduced features to liven up a web page. Rendering a page after hitting a SUBMIT button may take several seconds even though the server may have responded to the request in less than one second. Testing tools such as WinRunner are able to be used to drive a Thin Client, so that response time can be measured from a users perspective, rather than from a protocol level.

source of information : http://loadtest.com.au/types_of_tests.htm

Color SVN

See http://colorsvn.tigris.org/

If you love the command line and svn but would like to add some color as well, you could try colorsvn.
colorsvn is identical to svn when it comes to commands, but the results are shown in color.

colorsvn is particularly handy if there are any conflicts created during an update.

TOD-SCD

This is regarding the term called SCD which stands for Slowly Changing
Dimensions.

Dimension is a term in data management and data ware housing that refers
to logical groupings of data such as geographical location, customer
information, or product information. Slowly Changing Dimensions (SCD)
are dimensions that have data that slowly changes.

For example, you may have a Dimension in your database that tracks the
sales records of your company's salesmen. Creating sales reports seems
simple enough, until a sales person is transferred from one regional
office to another. How do you record such a change in your sales
Dimension?

There are several types of SCDs

You can have more details on this through the following link.
http://en.wikipedia.org/wiki/Slowly_Changing_Dimension

Versatile Querying With db4o

This open source, object database provides you with a collection of APIs that adapt to diverse querying requirements.
by Rick Grehan

July 25, 2007

In many database-backed applications, data is not simply fetched and analyzed for the purpose of report generations. Rather, data informs and controls the application. Data is queried and fetched in real time, and the paths down which the application flies in order to access that data can change from one application execution instance to the next. Or, they may change from instant to instant during the execution of a single application.

These shifting circumstances demand different query capabilities of the database engine. Sometimes, the query itself is simple, but speed is paramount. Other times, the object structure is elaborate, so the query language's expressiveness is of primary importance. Still other times, the application requires not so much querying as object navigation. That is, the logic within the application is best served if persistent objects can be traversed in the same manner that the application would navigate those objects, were they entirely in memory.

As a consequence, varying query needs argues for a database engine with querying capabilities that are simultaneously efficient and flexible — an API (or, rather, a collection of APIs) adaptable to diverse querying requirements. An open source object database that comes close to fulfilling these informal mandates is db4object's db4o.

One of db4o's most attractive features is its balance of simplicity and power. On the one hand, its API is so easily mastered and readily grasped that even a novice developer can create a full-fledged database application in a single sitting. On the other hand, that same API provides lower-level calls into the database engine that admit hardcore developers into the engine's plumbing in order to tweak and tune db4o's equipment for optimum performance.

db4o's characteristics are best illustrated — rather than merely discussed — so this article demonstrates db4o through example.

db4o Fundamentals
Though the ultimate goal is a demonstration of db4o's query API, you nonetheless must have objects in the database in order to have something to query. So, you'll begin as any newcomer would: You have defined classes, and you want to persist objects of those classes. The classes in this example model a system that tracks tests performed for a QA project. Your system consists of two classes. The first is TestSuite:

public class TestSuite {
private String name; // Test Suite name
private String description;
private String configuration;
private char overallScore;
private ArrayList cases;
private long dateExec;
... ...
}

A TestSuite is primarily a container for TestCases, (a test case being a single executable test — related test cases are gathered into a suite). A TestSuite carries additional, global data members, and the purpose of each is apparent: configuration records the specifics of the system being tested; overallScore is a summary score ('P' for pass, 'F' for fail, 'B' for blocked, and so on) for the entire suite; and dateExec is a millisecond field that identifies the date and time that the test suite was executed. The cases ArrayList carries the individual cases, modeled by the TestCase class:

public class TestCase {
private String name;
private String comment;
private char status;
private long duration;
private float result;
... ...
}

Each test case has a name, a free-form comment field, a status (pass or fail), a duration and a result (for associating arbitrary data with the test — throughput in bytes-per-second, for example).

To avoid getting bogged down in describing detailed uses of these classes, pretend that you have executed all the test cases of a particular test suite and stored the results in a TestSuite object (along with the associated TestCases in the cases ArrayList). Now, you want to persist that object. That is, you want to create a database, open it, store the TestSuite object (which you will name testsuite) and close the database:

// Create the database
new File("testsuites.YAP").delete();
ObjectContainer db = Db4o.openFile("testsuites.YAP");
// Store the TestSuite object
db.set(testsuite);
// Close the database
db.close();

Dust your hands off; you're done. (Of course, to keep things simple, you left out the details of instantiating the TestSuite object and its component TestCases.)

As a brief detour before you proceed to querying, stop for a moment and reflect upon what is happening in the above code. In particular, consider what you don't see happening — things that db4o did without having to be told.

First, you didn't have to tell db4o anything about the structure of the TestSuite class; db4o discovered it without your help, using Java's reflection capabilities.

Second, you did not have to advise db4o concerning the cases ArrayList. Not only did you not have to tell db4o about the size of the ArrayList, but you also didn't have to tell db4o about its contents. Just as db4o discovers all it needs to know about TestSuite objects, it discovers all it needs to know about TestCase objects (within the ArrayList).

The result is that, if you regard testsuite as the 'root' object of an arbitrarily large and complex object tree, db4o finds and stores the whole tree without assistance from you. So, storing the base object testsuite also stores the cases ArrayList. This process is referred to as 'persistence by reachability.'

Finally, you did not have to request that db4o guard your call to the set() method with a transaction. Any call that modifies an ObjectContainer (the db4o object that models the database) automatically starts a transaction, unless a transaction is already active. Furthermore, the call to close() terminates the transaction, so the above code is equivalent to this:

db.startTransaction();
db.set(testsuite);
db.commitTransaction();
db.close();

where startTransaction() and commitTransaction() are fictional methods made up to illustrate this point. db4o does have explicit calls to commit or abort a transaction, but they've been excluded from the original code to make the simplicity apparent.

Querying I: QBE
With objects stored in the database, you can perform querying and retrieval. db4o provides three querying APIs: one simple, one elegant and one complex. Each has its strengths and each is applicable to different query situations. From db4o's perspective, which API you chose is irrelevant because they are all compatible.

You'll begin with the simple API called query by example (QBE).

To employ QBE, you construct a 'template' object of your query target, and pass that to the ObjectContainer's query() method. In essence, you are telling db4o to "go get all the objects that look like this one."

Suppose one of your test suites is named Network Throughput, and you want to retrieve all executions of this test so that you can determine the percentage of test failures (based on the TestSuite's overallScore). Using QBE, Listing 1 shows the code for this function.

In Listing 1, testTemplate is the QBE template object. Note that only its name field holds an actual value; all other object members are either null or zero. Null or zero fields do not participate in QBE queries; hence, the call to db.get() returns all TestSuite objects in the database whose name field matches 'Network Throughput.' The matching objects are returned in the result ObjectSet, through which the code iterates, retrieving objects and calculating the results.

QBE's advantage over the other APIs is its simplicity. There is no separate query language to master. In addition, QBE is typesafe. You cannot create a query analogous to the SQL code:

SELECT TestSuite.overallScore FROM TestSuite
WHERE TestSuite.name = 200.0

Put another way, since the query is crafted in Java code, the compiler won't let you put a floating-point value into a string field, or vice-versa.

QBE's only apparent disadvantage is that it can only execute 'equals to' queries. In addition, QBE uses the null value to identify string or object reference members that do not participate in the query, and the value zero to indicate non-participating numeric fields. So, for example, you could not contrive a QBE query to fetch all TestCase objects whose result field equals 0.0f.

A more capable query mechanism is required for more elaborate queries.

Querying II: Native Query
db4o's Native Query system is arguably the most flexible query mechanism imaginable. Rather than building queries with a database query language, you construct a Native Query with plain old Java. Native Queries relies on two mechanisms to accomplish: one is a class, Predicate; the other is an interface, QueryComparator. The class includes an overrideable callback method that specifies how objects are chosen from the database (the body of the query). The interface declares a method that designates the sort order of the results.

Suppose you want to locate all the test suites that are executed in a given week, that have an overall score of 'failed,' but for which more than half of the associated test cases are scored as 'passed.' Expressed as a Native Query, this query is straightforward.

First, you extend db4o's Predicate class (see Listing 2).

Notice the use of Java's generic syntax in the class definition. This tells db4o to fetch only TestSuite objects. When the query is executed, TestSuite objects are passed to the match() method (the callback method to which you referred), which returns true for any object that meets the query criteria and false for any object that doesn't meet it.

The code in the match() method first determines if the candidate object is within the one-week range. If so, the code cycles through the member test case objects, calculating the total number of passed cases. If the result is less than 50 percent, the suite is rejected. Otherwise, it passes.

Listing 3 displays the code to perform the query.

Think of Native Queries as the objects of the target class pulled one-by-one from the database and passed to the match() method. Only those for which match() returns true are placed in the results ObjectSet.

What about sorting? If we want to arrange the results in ascending date order, we implement the QueryComparator interface as follows:

public class NativeQuerySort implements QueryComparator{
public int compare(TestSuite t1, TestSuite t2)
{
if (t1.getDateExec() < t2.getDateExec()) return -1;
if (t1.getDateExec() > t2.getDateExec()) return 1;
return 0;
}
}

The function of the compare() method is clear. Objects that succeed in the query are passed to the compare() method in pairs. The method returns a value less than, equal to or greater than zero if the first object is to be sorted before, equal to or after the second, respectively. To actually impose the sorting on the results, you instantiate the NativeQuerySort object and modify the call to query():

. . .
// Instantiate the sort class
nqsClass = new NativeQuerySort();
. . .
ObjectSet results = db.query(nqqClass, nqsClass);
. . .

The rest of the code remains the same.

You may be skeptical that a Native Query is simply a programmatic trick — that it is no faster than code that fetches all the TestSuite objects and excludes those that don't meet the criteria.

Not quite. Native Queries can be optimized. All you have to do is place a pair of jar files — db4o-xxx-nqopt.jar (where xxx is the db4o version) and bloat.jar — in the CLASSPATH. At query execution time, code in these libraries will optimize constructs (in the match() method) such as primitive comparisons, arithmetic and boolean expressions, and simple object member access. The list of supported optimizations is constantly growing.

Querying III: S.O.D.A.
One of db4o's unique strengths is its layered API arrangement. You can choose either to control db4o from a high level — granting the database engine considerable latitude in how it decides to carry out its operations — or you can access db4o in a more direct fashion. The latter choice places a greater burden on the programmer, who must direct the engine's inner workings more carefully. But the reward is a faster and more capable database.

db4o's S.O.D.A. (Simple Object Data Access) query mechanism is a perfect example of this API layering. S.O.D.A. is actually db4o's internal query system — QBE and Native Queries are translated into S.O.D.A. However, applications can call S.O.D.A. directly.

Suppose you want to locate all of the 'Network Throughput' test suites that have at least one test case whose result — a measurement of bytes per second — is less than a specified value (for example, 100). Listing 4 shows a S.O.D.A. query for this request.

The diagram shown in Figure 1 helps to explain the code in Listing 4. The code builds a query graph that guides the underlying engine. The descend() method creates a branch on this graph that steps downward into the object structure. Each descent builds a node in the tree, to which you can attach a constraint (using the constrain() method). To borrow SQL terminology, constraints specify the 'WHERE' portion of the query. Multiple constraints can be joined with the assistance of conjunction '(and)' or disjunction '(or)' methods. You used and() in the above query to connect the constraints.

As with the other query methods, the results are returned in an ObjectSet, through which you iterate to retrieve the fetched objects.

Note that, while S.O.D.A. is a low-level access method, it is not without intelligent, default behavior. Here's the code that accesses the result field of the cases member:

query.descend("cases").descend("result"). ...

You did not have to tell S.O.D.A. that 'cases' is a collection. So, when the query executes, it invisibly examines the results field of all items in the cases ArrayList, and correctly returns test suites for which any test case meets the search criteria.

A Database for All Seasons
The examples outlined in this article demonstrate the evolution of db4o's querying APIs. However, it is not an organic, random evolution — an API exists because of its survival skills. db4o's querying APIs support easy, efficient and powerful object database querying.

db4o's varied APIs enable you — from within a single database engine — to bring to bear the specific query mechanism appropriate to your task at hand. A QBE query is ideal for quickly fetching a node from within a network of objects, then navigating that network through ordinary object references. A Native Query offers flexibility: If you can write Java, you can write a Native Query. Finally, S.O.D.A. provides the machinery for fast and complex queries that draw their speed from the db4o engine.

Think of db4o's query APIs as a kit of carefully selected tools. You don't have to wrestle your application code in order to accommodate your programs to a one-size-fits-all query architecture and its associated language. Instead, it is a database that db4o gives you what you need.

About the Author
Rick Grehan's articles have appeared in numerous publications, including JavaPro, Dr. Dobb's and Embedded System's Journal. He has co-authored three books; his section in Java Data covered object databases in Java. In the recent past, he was QA lead at Compuware's NuMega Labs. Currently, he is a freelance author and contributing editor for InfoWorld Magazine.

W3C Releases new version of Web Services Protocol

The new WSDL 2.0 protocol adds standardization and better interoperability for Web services and service-oriented architectures.
by Kurt Mackie

July 05, 2007

Last week, the Worldwide Web Consortium (W3C) finalized Web Services Description Language 2.0 (WSDL 2.0) as a W3C recommendation. The action aims to promote greater interoperability and standardization for Web services. WSDL 2.0 is a protocol for defining a Web service, providing information on how the service is called and what to expect in response.

Previously, developers worked with the WSDL 1.1 version, which was part of the WS-I Basic Profile. The WS-I is an industry organization that works to promote Web services interoperability across platforms. However, the WS-I was originally formed "to create profiles based on nonstandard versions of the popular Web services technologies," according to an announcement issued by the W3C.

WSDL 2.0 adds standardization and now includes full HTTP (Hypertext Transfer Protocol) and SOAP (Simple Object Access Protocol) support. WSDL 2.0 facilitates both "simple Web applications and Web services applications that require additional functionality," according to the W3C's announcement.

I asked Jonathan Marsh, director of mashup technology at open source middleware provider WSO2 and chair of the W3C's Web Services Description Working Group, about some of the implications of WSDL 2.0. Prior to his work with WSO2, Marsh served as technical diplomat for Microsoft, working full time on standards. His standards work for Microsoft began with XSLT (Extensible Stylesheet Language Transformations) and XPath (a language that selects part of an XML document), when those features of the XML language were being developed.

Q: In what way is WSDL 2.0 an advance?
A: WSDL is part of the Web services infrastructure that deals with description. It's like an interface definition language for your Web service. It's a way to communicate with people who might want to access your service. You can use that as a framework for defining quality of service and policies, and all kinds of interesting things. So it's an important part of the Web service and SOA architecture.

Today, developers have been relying on WSDL 1.1, which is a spec that came out about six or seven years ago, authored by Microsoft and IBM and some other partners, and it was published as a W3Ce member submission. It had a number of interoperability issues because it was promoted by a smaller vendor community and it didn't have the broad attention that open standards really need to evolve and mature. So the W3C got involved and began an effort to define the next version of that description language, which turned out to be WSDL 2.0. However, at the same time, people needed WSDL 1.1 and started using it and had interoperability problems. WS-I actually was created in part to help define what the basic standards were that were needed for Web services, and to address the errata issues.

For instance, WSDL 1.1 has four different ways to describe a message that can be sent to a Web service or that can come back from a Web service. If someone uses one method to describe their message it can be difficult for someone to communicate with a Web service if they use a different one. The thing WS-I did is say there's four different ways to describe a message, but please just use one.

To the extent that WSDL 1.1 was proprietary, WSDL 2.0 has moved away from that. WSDL 1.1 had no real standards force. Now with WSDL 2.0, [the spec] has passed the formal [W3C] recommendation process. ("Recommendation" is the W3C's final ultimate status as far as these specs go.)

Q: Where does WSDL 2.0 go from here?
A: Well, hopefully it goes to developers and we start to see vendors really using it and relying on it. As far as the working group goes that created this, we're done and we just closed last weekend. We were a working group for a number of years — beyond what we expected. So the working group has gone away. The W3C is considering now a proposal to form a new working group called the Web Service Core Working Group, which would exist to maintain and process errata and encrypt the test suites of the WSDL 2.0 family of specifications, as well as some of the other recommendations in that area, such as SOAP 1.2 and WS addressing, which is almost done, and so forth.

At this point, there isn't really a plan or even a need to start work immediately on WSDL 3.0. I think we need to let WSDL 2.0 gain traction in the marketplace and displace the WSDL 1.1 legacy systems that are out there.

Q: How does WSDL work?
A: HTTP works in large part through a dynamic handshaking. So if I send an HTTP Get to your server, it can say, "You know, I'm not going to give you this resource unless you give me your credentials," and it will send back a message which then can be dynamically processed by the client in order to get the credentials. Or with media types, you can say, "I would like this particular bit of data but I want it in XML or RDF format only." So HTTP has a lot of handshaking in it. Whereas, Web services are generally thought of as a little bit more designed, a little more statically typed, so if you have a Web service and I'm trying to communicate by SOAP or HTTP, I have to get the message in a format that you'll accept….So, because of that, we may want to share some descriptive information. It doesn't have a runtime, but it helps us to set up our clients and servers to talk to each other.

Q: Are there problems using SOAP with Web services, such as scalability issues?
A: Well, it's really about choosing the right tool for the right problem. Say I have a problem that requires me to serve up a resource that's static. And what if I create this bit of information and thousands of people will access it before it changes again. In which case, HTTP has facilities for caching to make sure that that scales very well. So that might be a very nice architecture for that kind of a problem. For instance, a Web page has a lot of images that don't change that often. A lot of that scales very well with the REST approach. You might not want to choose Web services as a way to get mostly static Web pages from one place to another. However, if you're trying to enable a communication where the data does change a lot, and perhaps the entire thing is customized to a particular invocation, then HTTP caching doesn't help you at all. If you've chosen the wrong tool for the job, you may have scalability issues. Just because you don't chose SOAP doesn't mean you won't have scalability issues anyway. And there's a lot of technology and products that enable you to fan out your Web service requests.

I don't really think there is an inherent scalability issue in SOAP — unless you are trying to use this for the wrong tool. WSDL 2.0 does help you in this regard because it does provide you with better facilities to describe how messages can use HTTP underneath, if that's the protocol you are running on, whether it's SOAP over HTTP or just plain XML over HTTP. We have new facilities on when to use Get or Post — just that question there is one of the biggest scalability issues. Today, most people just use Post for all SOAP interactions where they should really be considering a little better whether Get or Post is going to be a more scalable way of implementing a particular operation. So WSDL 2.0 helps you by providing a lot more facilities for actually using the HTTP protocol underneath if that's the protocol you've chosen to use.

Q: What will be the changes for those providing Web services with WSDL 2.0?
A: We've actually simplified some of the best practices. There's also real support for SOAP 1.2, so if you are sending SOAP 1.2 messages, we have a way to describe that in a standardized way. We have much more support for the HTTP binding, which didn't really exist in WSDL 1.1, which enables you to take your content and describe how it can be mapped to HTTP Get and Post and other verb requests, so you can actually take the operation concepts that you are used to working with in a programming language (you have a class with methods and properties) and map that fairly readily into true RESTful actions on the Web, which I think will be a popular feature. REST suffers from the fact that it is very dynamic and there isn't any real descriptive artifact there, and when you are actually trying to write code, descriptive architects can really help you configure things and get interactions working across the network really fast.

Q: What are you working on at WSO2?
A: I'm working on a new product, we're trying to go alpha on a WSO2 Mashup Server, which will let you to consume Web services and combine the data from other Web services very quickly and easily in Javascript, and then expose that automatically as a new Web service along with rich metadata, including WSDL 2.0 description. From the WSDL 2.0 description, I can automatically generate a Web page that will give you a form to try out a Web service for testing purposes. [Or you can generate] stubs, which you can import into a Web page or other HTML client, which will make it very easy to invoke that Web service for a kind of AJAX application. All of that is coming from the WSDL 2.0 descriptive capabilities. So, I am very excited to work on a product that will actually use WSDL 2.0.

I'm really thrilled that WSDL 2.0 is done. I want to promote its use in the marketplace, so that they [vendors] can consider switching. I really think it's a major step forward from WSDL 1.1.

About the Author
Kurt Mackie is a Web editor at the Redmond Media Group. You can contact him at kmackie@1105media.com.

Olympic Games IT architecture is on the blocks

Systems plans for Beijing 2008 are completed on schedule
Dave Friedlos, Computing 03 Jul 2007

The IT system architecture for the Beijing 2008 Olympics Games has been completed on schedule, says the games’ worldwide IT partner Atos Origin.

The architecture will underpin the provision of event results and information to spectators and media around the world in real-time.

When completed, the technical infrastructure will link more than 60 competition and non-competition venues across China, consisting of over 900 servers, 7,000 PCs and 1,000 network and security devices.

The architecture will provide the Beijing 2008 Organising Committee (Bocog) with a blueprint for the selection and implementation of proven hardware, software and network components.

The blueprint must be completed more than a year in advance of competition to meet the rigorous implementation and multiple testing phases that follow to ensure the IT systems are fully functional.

‘Like the winning athletic performances, the success of the Olympic Games IT systems is determined years before through advanced planning and preparation,’ said Atos Origin chief technology integrator Jeremy Hore.

The IT system architecture presented by Atos Origin to Bocog encompasses three main foundations; business continuity, data networking and security.

Business continuity means the architecture must be reliable and available for the 17 days of the games. The data network must deliver secure and quality service levels over the Real Time Competition Network, which supports mission critical applications, while the IT security must also be robust.

‘The major focus of developing this critical system architecture is not only to understand the frameworks of the past, but more importantly to adapt to a larger and more complex Beijing operations,’ said director of Bocog technology Yang Yichun.

‘Atos Origin’s system architecture milestone lays the groundwork for the implementation and testing phases that will ensure everything is in place well before the athletes, media and spectators arrive.’
Permalink to this story
www.vnunet.com/2193393

Tuesday, July 17, 2007

NR Bugs

Today I am focusing on some important points when reproducing a bug.

As you have known , Some bugs are easy to reproduce and some are not.
If It is possible to reproduce the bug also It is essential to explain
exactly what is required to re-produce It. Usually we list all the steps
as 'Reproduce Steps' within bug description, by including the exact
syntax, file names, sequences that we used to encounter or re-produce the
bug.
If we can believe that the problem will happen with any file.. etc. then
better to mention that but still provide an explicit example that can be
used to do the re-produce.

If It is not possible to re-produce the bug or if we suspect that it may
not be able to re-produce the bug better to gather all the relevant
information as best as we can and that may provide useful information to
the person who has to fix the problem. If we cannot or have not re-produce
the Bug it is important to note this and required to use 'NR'-Not Reproducible in Key words in Bugzilla or mark it as RESOLVED WORKSFORME in Bugzilla.

Sample programs

It's a good idea to keep an eye on what's happening @ other side of the world.
Have a look @ sun's site frequently to know about trends etc.

You get code samples there too http://java.sun.com/developer/codesamples/

TOD

When concerning about data warehousing, it is required to have some kind
of a knowledge to test them. Today I'll share with you some details
about data warehousing.

Simplest definition
A data warehouse is the data (meta/fact/dimension/aggregation) and the
process managers (load/warehouse/query) that make information available,
enabling people to make informed decisions.

What areas to be tested on a data warehouse
1. Sufficient testing needs to be performed to establish that queries
scale with the data.
2. Full-scale testing requires a comprehensive test plan
3. If the test data is generated, ensure the data has the correct
balance and skew. Make sure the ratio of fact to dimension is correct
and so on.
4. Every backup test should be verified by performing recovery using the
backedup data.
5. Take the time to test the most complex and awkward queries that the
business is likely to ask against different index and aggregation
strategies.

There are some more areas to be concerned than this. This may help you
to get an idea about data warehouse.

Ref: Data Ware housing in the real world by Sam anahory and Dennis
Murray.

Saturday, July 14, 2007

What is true humanness?

What is humanness? Essentially it means unity in thought, word and deed. When what one thinks differs from what he says and what he does, he ceases to be human... Today what men have to cultivate is unity and purity in thought, word and deed. True human qualities can grow only in a heart filled with spiritual aspirations, like a seed sown in a fertile soil and not on a piece of rock. Hence, to develop these qualities, men will have to develop compassion and equanimity amidst the vicissitudes of life.

Architecture Journals (Issues 1 - 12)

Latest is Issue 12:
Journal 12: WEB ARCHITECTURE.
Welcome to the 12th issue of The Architecture Journal! In this issue of The Architecture Journal, we are focusing on Web Architecture. As the Web has become more important in every organization, the need to adapt architectural principles to Web design has become more prominent. In our twelfth issue of The Architecture Journal, we present a number of perspectives on Web architecture. In our Profile section, we've caught up with Pat Helland, who initially proposed the "Metropolis" analogy that has been featured in past Journal articles. Download your electronic copy HERE. As always, we hope you enjoy our latest publication and welcome your feedback at www.ArchitectureJournal.net.


Even though these are published by Microsoft, they are wealth of information for all of us.

When fixes fails, talk with the programmer

Today's TIP is on handling bugs to be REOPENED in the last minute.

If a bug fix fails repeatedly or fails very late in the development (before a QA release), don't just enter this feedback into the bugzilla and REOPEN the bug. Take it directly to the programmer. Most of the time the developer is sitting close to you, go his desk or call the guy /IM if he is working at a customer site. Discuss with the guy what could have gone wrong. Demonstrate the bug (reproduce) to him. This will help guy to find cause without much difficulty than reproducing in his setup.

Your attitude should be friendly and helpful. I am happy that we have not violated this rule.
This is just a precaution and a preventive care.

Working together as a team to deliver quality products is a well test formula in Software industry.

Reserved Oracle/MySQL keywords

TOD

SQAE should concentrate on those items that have a strong influence on product quality. They should check as early as possible that the:
  • project is properly organized, with an appropriate life cycle; 
  • development team members have defined tasks and responsibilities; 
  • documentation plans are implemented; 
  • documentation contains what it should contain; 
  • documentation and coding standards are followed; 
  • standards, practices and conventions are adhered to; 
  • metric data is collected and used to improve products and processes; 
  • reviews and audits take place and are properly conducted; 
  • tests are specified and rigorously carried out; 
  • problems are recorded and tracked; 
  • projects use appropriate tools, techniques and methods; 
  • software is stored in controlled libraries; 
  • software is stored safely and securely; 
  • software from external suppliers meets applicable standards; 
  • proper records are kept of all activities; 
  • staff are properly trained; 
  • risks to the project are minimized.

JavaFX

http://www.sun.com/software/javafx/index.jsp
https://openjfx.dev.java.net/
  • The JavaFX product family leverages the Java platform's write-once-run-anywhere portability, application security model, ubiquitous distribution and enterprise connectivity
  • JavaFX initially is comprised of JavaFX Script and JavaFX Mobile
  • JavaFX Script is a highly productive scripting language for content developers to create rich media and interactive content
  • JavaFX Mobile, Sun's software system for mobile devices, is available via OEM license to carriers, handset manufacturers and others seeking a branded relationship with consumers


Most likely you are already familiar with this new technology.

Friday, July 06, 2007

A brief introduction to PHP and AJAX

Today's Tip is focusing brief introduction to PHP and AJAX.

What is PHP?
:) PHP stand for PHP: Hypertext Preprocessor
:) PHP is a server-side scripting language, like ASP
:) PHP scripts are executed on the server
:) PHP supports many databases (MySQL, Infromix, Oracle, Sybase, Solid , PostgreSQL, Generic ODBC, etc.)
:) PHP is an open source software (OSS)
:) PHP is fee to download and use

What is a PHP File?
:) PHP files may contain text, HTML tags and scripts
:) PHP files are returned to the browser as plain HTML
:) PHP files have a file extension of ".php", ".php3", or ".phtml"

What is AJAX?
:) AJAX stands for Asynchronous JavaScript And XML.

:) AJAX is a type of programming made popular in 2005 by Google (with Google Suggest).

:) AJAX is not a new programming language, but a new way to use existing standards.

:) With AJAX you can create better, faster, and more user-friendly web applications.

:) AJAX is based on JavaScript and HTTP requests.

Source of Information and to learn more visit http://www.w3schools.com

Set foreign key to zero

Sometimes it is required to insert data to a particular table in a database when testing is carrying out. If this table refers foreign keys then it'll be a problem to do so. For this you can set foreign keys to ignore for the purpose of inserting data. To do it following command should be executed in the mysql cmmand prompt.

SET FOREIGN_KEY_CHECKS=0; 

I hope this will help you to insert data to a table without foreign key trouble.

Birt report design best practices

Best practices for creating reports(rptdesign files)

1. For the report parameters
Prompt text field and the Help text field
should be filled. Then they are appearing properly when asking for
generating reports.

2. In all the reports (rptdesign files) There should not be "html" content
type for any of the field. They all should be "plain". Other wise those
fields will not be appearing in the csv report files.

3. When designing the reports no of table columns should be same in
all of the tables and the grids used in the reports.

4. Unnessary empty rows in the tables and the grids should be
removed.Otherwise report will be complexed and will not be properly
converted in to other report formats.

Effective Defect Report

Today’s tip focuses on ‘’Effective Defect Report” and I hope this may
helped you all to come up with an effective defect report.

Defect reports are among the most important deliverables to come out of
test and they are as important as the test plan and will have more impact
on quality of the product than most other deliverables from test. So It is
worth to learn how to write effective defect report.

As I have noticed, the effective defect report will mainly help to,

*Reduce the no of defects returned from the development
*Improve the speed of getting defect fixes
*Improve the creditability of test
*Enhance the teamwork between test & development.

Also there are more than these.

As QA people our objective should be not to write the perfect defect
report but to write an effective defect report that conveys the proper
message to gets the job done & simplifies the process for every one.

Monday, July 02, 2007

Defect Tracking Process

Defect Tracking System


We use bugzilla for reporting and keeping a track of bugs. Any deviation from the expected results in the test cases is nominated as a bug and reported to the bugzilla but not limited to. Design, Usability etc need to be reported too. The Defect Tracking Systems allows individual or groups of developers
to keep track of outstanding bugs in their product effectively. Bugs found after the product release, Change Requests also need to reported to the system.

A Bug's life Cycle

The QA department is responsible for Administartion of Defect Tracking System. You need to request bugzilla admin if you have any problem in using system.

Limited access will be given to everybody to report bugs that they encounter. It's not only the software tester who reports bugs to the system. It is highly encouraged following to report the bugs they found.

* Software Developers
* Technical Writers
* Markertiers
* Project Managers

Closing bugs remains a responsibility of assigned QA Engineer after verification.

All change requests, Feature requests, Customer Test bugs should be reported to the system.

Setting the Priority
This field describes the importance and order in which a bug should be fixed. This field is utilized by the Engineering project leader to prioritize their work to be done.

The available priorities range from immediate,high,normal,low and new release.

This cannot be set when a bug is created. Project leader keep the responsibility of setting the priority.

Summary Codes

Following are the set of predefined Codes that can be used in the summary field of a bug report. These will increase bug searching and bug categorization.

* UATF : User Acceptance Test failure
* CR : Change Request - Originated by customer - Modifications in the existing system
* CC : Code Change - a placeholder for developers to make sure new features get implemented
* FR : Feature Request - Originated by customer - New feature will be added to the system
* CRB : Customer Reported Bugs
* RTF : Regression Test Failure
* RFE : Request for enhancements
* BBL : Before Base lining (Bugs reported before QA release).When the build is still in development.
* COB : Closing the bugs which are older than 12 months or from inactive projects.
* PRD : Bugs related to Project Requirement Documents
* AGD : Bugs related to Admin Guide
* IGD : Bugs related to Installation Guide
* UGD : Bugs related to User Guide
* IMD : Bugs found during software Implementation
* COD : Common Defects
* NR : Not Reproducible

Training on Defects Tracking System
A QA team member would conduct trainig on Bug Tracking System for every new comer. Please do not hesitate to contact QA if you need any assistance in using bugzilla.

Bugzilla Accounts
Bugzilla user accounts could be self created if you have an email address.

Create Account
Please contact QA if you have any problem in creating an account.

When you fix a bug (For Development Engineering)
When you fix a bug in a piece of software you need to change the status of the bug in the bugzilla to Resolved Fixed and add your comments.

The comments need to contain following

1. Which build the bug fix will be available in.
2. A brief description of what was done to fix the bug and the new behavior, e.g. * "The file processor     now ignores files with an invalid extension. As a result these files are left in the 'incoming' directory. The processor now logs a warning message when such a file is encountered and no longer throws an SNMP trap."
3. It would also be helpful if you mentioned any suggestions you have for QA to test the fix.

Bugzilla Administration
Defect tracking system should be monitored frequently to ensure that system is effectively used by the team. An administrator is nominated to ensure this.

Nomination of an administrator
QA lead should nominate an administrator from QA department. The candidate should be familiar with the system and able to handle this task along with testing tasks.

Responsibility
The defect tracking system is available and effectively used by all users. The admin account should not be shared with anybody else.

Tasks

Maintenance

* Create new accounts
* Disable accounts when a person leaves a company
* Create projects and assign to relevant users.
* Close unattended defects older than 1 year or of closed projects.

Mandatory components
Following is a list of components for and every bugzilla project in addition to project specific components (modules etc)

* Mandatory components of a bugzilla project

o Usability - (eg: Flow is not consistent, Error messages are not descriptive, GUI is noisy, easiness, copyright is incorrect etc.)
o Installation and Configuration - (eg: Compilation errors etc.)
o Technical Documentation - (eg: Latest version is not available, Requirement is missing etc. in SRS, PRD, FS, IGD, SOW etc.)
o Non Technical Documentation - (eg: Bugs appeared in User Guides, Admin Guide etc.)
o Unit Test - (eg: Unit test failures etc.)
o Security - (eg: PIN/Password and other sensitive data are in logs, database, sensitive data transfer is    not encrypted, passowrd is not masked, sensitive data is cached in phones/browser etc.)
o Process nonconfirmance - (eg: PRD, FS is not available, Unit tests are not available etc.)
o Performance - (eg: Response time is not acceptable, Process takes significant time etc.)
o Review - (eg: Design review, code review, DB review, SRS, PRD, SOW, FS are occurred or not)
o Testability - (eg: If the tools are not supporting to continue the testing etc.)
o Other - (eg: Common bugs will appear here.)

Monitoring

* Monitor defect reported by new comers
* Check unattended defects and take necessary actions
* Check if RESOLVED LATER defects are attended.

Training

* Prepare/ Update Training material
* Identify training needs. (For new comers, refresh training etc)
* Schedule training
* Conduct training (or assign someone who is capable)

Disaster Recovery

* Check if regular back up is taken by system administration team
* Check if software needed for recovery is available and location is documented
* Recovery procedure is documented and hard copy is maintained
* Test backup recovery every two months with the help of System Admin team

Research

* version upgrade
* Third party reporting tools
* Customizing UIs

Resources

* Bugzilla Guide : http://www.bugzilla.org/docs/2.14/html/index.html

Achieve J2EE-PHP Interoperability

Achieve J2EE-PHP Interoperability
Employ two methods of interoperability to instantiate and manipulate Java objects from within PHP scripts as if they were native PHP objects.
by Andi Gutmans, Stew Nickolas, and Zeev Suraski

November 1, 2006

PHP adoption in enterprises is increasing rapidly, and as this adoption is happening an increasing amount of projects are reusing existing J2EE investments on the back end with PHP as a front-end glue technology. Let's take a look at an interoperability scenario between the J2EE platform and PHP.

Although the scenario here is generic, for the sake of this discussion we'll be using WebSphere Application Server as the J2EE back-end system and the Zend Platform for its PHP/Java Bridge, which is an efficient way of calling Java from within PHP scripts. PHP is used to implement a Web-based front end for a set of existing WebSphere assets that provide the implementation of a catalog and ordering management system. The sample application is a fictitious, supply-chain management application in which a retailer offers consumer electronic goods.

The two methods of interoperability between WebSphere and PHP are Web services and Zend Platform's PHP/Java Bridge. With Web services PHP supports creating and consuming them using its native SOAP extension. PHP's native SOAP extension takes advantage of PHP 5's new object-oriented overloading capabilities to automatically map class attributes to the datatypes defined in the WSDL file. The ability to dynamically overload the object-oriented syntax is one of PHP's key strengths and is because of its dynamic nature.

The Zend Platform's PHP/Java Bridge provides the ability for PHP developers to create applications that interact with Java objects. Using the overloading capabilities just mentioned, Java objects can be instantiated and manipulated from within PHP scripts as if they were native PHP objects.

This scenario uses the PHP/Java Bridge to access the back-end catalog and ordering systems running in the WebSphere application and acts as a single J2EE application client (see Figure 1).

Retailer Implementation
In the context of the interoperability scenario presented here, we'll discuss these topics:

  • Sample description – A detailed discussion of the sample scenario including page flow, Web services, Enterprise JavaBeans (EJB), and prerequisites for installing the technologies.
  • Setting up the PHP/Java Bridge to work with WebSphere – A detailed description of the J2EE assets used including setting up and testing the PHP/Java Bridge with WebSphere and tips and techniques for developing and debugging.
  • Web services – In the sample application, Web services are used as the communication channel between the retailer client and server. PHP's dynamic nature is ideal for implementing Web services layers, and both the client and server parts are implemented in PHP. PHP 5 allows for very elegant separation between PHP's object-oriented syntax and semantics.
  • Using the PHP/Java Bridge to interoperate in the example – The PHP/Java Bridge module provides PHP-centric companies with a well-rounded environment that ensures that the organization benefits from the "best of both worlds," be it existing investments in J2EE application servers that require this solution, to provide a means for organizations if they choose, or to complement the PHP environment with Java. The PHP/Java Bridge is not limited to interactions strictly with J2EE and legacy systems; it also provides the ability to interact with plain Java objects.

The fictitious, supply-chain management application consists of a retailer that offers electronic goods to consumers. A Retailer component is implemented using a Web service that is based on the WS-I.org base profile sample application. It provides methods for listing the contents of the retailer’s catalog and placing an order for a collection of goods. To fulfill orders the Retailer component makes a request to a Warehouse client to ship the items. In this example, only one Warehouse is used to restock an item. The Retailer will call the Warehouse requesting the item for shipment. Each Warehouse maintains stock levels for each item. The high-level architecture of the sample application is shown in Figure 2.

Message flow is accomplished through a standard browser client using HTTP/HTML and is used to communicate with the Web tier, after which the message flow proceeds this way:

  1. The PHP catalog display page, order.php, creates a client-side proxy for the Retailer Web service and requests the catalog for display in the page using the PHP SoapClient class.
  2. The Retailer Web service proxy uses SOAP to communicate with the service implementation. In this sample the service is implemented using a PHP SOAP server abstraction; however, the endpoint could be implemented by any compliant SOAP server.
  3. The PHP Retailer implementation uses the PHP/Java Bridge to locate, create, and request the catalog for a Warehouse using a J2EE session bean.
  4. The PHP/Java Bridge proxies created in step 3 are used to communicate with the WebSphere Application Server, which contains the business logic for the catalog and ordering systems. In this respect, the Zend Platform acts as a J2EE application client.
  5. The Warehouse session bean is responsible for managing the catalog items and collecting them from the entity bean data store.
  6. The Warehouse session bean also manipulates the stock level of the Warehouse entity beans when processing shipments.

Simple Flow
The sample application consists of four main pages with a simple, sequential flow (see Figure 3):

  • index.php gathers customer information (for example, name, number, street, and so on) and stores it in the session data.
  • configure.php displays the list of Retailer and Warehouse implementations offered for use in the scenario; in this sample the PHP Retailer implementation is used, and the WebSphere Warehouse is used on the business tier.
  • order.php displays the list of catalog items offered by the Retailer and Warehouse services in a simple table form enabling users to enter the quantity of each good to be purchased.
  • submitOrder.php collects the order requests and submits the order to the Retailer server and displays the result of processing the order—either the items will be shipped or are not in stock.

The sample application will need software installed and configured. Configuring WebSphere will be discussed in more detail shortly. The specific software is either PHP 5.0.4 or Zend Core for IBM; Zend Platform 2.1.2; IBM Rational Software Development Platform version 6.0.1 was used to develop the J2EE components and test the application (note that this is software optional; only WebSphere 6.0 Server and Application Client are required); WebSphere Application Server 6.0; and WebSphere Application Client for WebSphere Application Server 6.0.

To set up the PHP-WebSphere Bridge, use these steps to install and configure the WebSphere Application Server and the Zend Platform:

  1. Install the WebSphere Application Client on the Zend Platform Node that will interoperate with the WebSphere Application Server. (Note: make sure this software is installed, even if the application server is on the same machine. The PHP/Java Bridge script uses the application client files to interoperate with the application server.)
  2. Install the Zend Platform and make sure the bridge's Java path points to the WebSphere Application Client Java—for example: /opt/IBM/WebSphere/AppServer/java/bin/../jre/bin/java
  3. Ensure the …/ZendPlatform/client directory of the Zend Platform has write permissions before starting the Java Bridge. A log file will be written to this location by the WebSphere Application Client when the Object Request Broker (ORB) has problems communicating to the application server. To change the location where this file is written, start the javamw.rc (Java middleware) screen in the location.
  4. The javamw.rc script file that is used to start the PHP/Java Bridge must be modified to include the WebSphere Application Client settings. These settings are located in the launchClient.sh script file in the AppClient/bin directory—for example: /opt/IBM/WebSphere/AppClient/bin/launchclient.sh. These modifications are necessary because launchClient.sh is not used to start the PHP/Java Bridge. The modifications to the javamw.rc file are shown in Listing 1 (note: the modifications have been formatted for display).

The two most important lines are lines 2 and 25. Line 2 defines a directory that will contain the client JAR files necessary to run a client application (for example, WarehouseClient.jar for this sample):

/opt/IBM/WebSphere/AppClient/
clientapps:

The second change (in line 25 in Listing 1) simply passes the WebSphere configuration parameters to the Java runtime on the command line. To test the PHP/Java Bridge use the code shown in Listing 2.

EJB
The sample application consists of EJB. Here is the warehouse session bean that carries out querying the catalog and handling order submission:

public interface Warehouse extends
javax.ejb.EJBObject {
public boolean resetStock()
throws CreateException,
RemoteException,
RemoveException,
FinderException,
NamingException;
public Collection shipGoods(
Collection itemList)
throws RemoteException;
public Collection getCatalog()
throws RemoteException;

}

The CatalogItem entity bean simply maintains a list of persistent consumer goods offered by the warehouse. The fields of the CatalogItem contain the name, description, category, brand, and price of the catalog item. The WarehouseItem entity bean, which is linked to CatalogItem through the primary key, represents the stock level of a CatalogItem along with the minimum and maximum level of the item contained in the warehouse.

To install and configure the sample application perform these steps:

  1. Install the sample.ear file on the WebSphere Application Server using the administration console, or import the sample into the IBM Rational Software Development Platform 6.0.1. As part of the deployment, make sure the database tables are created for the WarehouseItem and CatalogItem entity beans.
  2. Locate and copy the client JAR files, WarehouseClient.jar and Warehouse.jar, into the directory specified as the client application directory in javamw.rc. In the example shown in Listing 1 the directory is /opt/IBM/WebSphere/AppClient/clientapps.
  3. Restart the javamw.rc script using the Zend Platform administration console.

In our sample application Web services are used as the communication channel between the Retailer client and server. PHP's dynamic nature is ideal for implementing Web services layers, and both the client and server parts are implemented in PHP. PHP 5 allows for very elegant separation between PHP's object-oriented syntax and the semantics. This separation is how many of PHP5's key features such as SOAP and SimpleXML provide easy-to-use and natural interfaces.

From the PHP developer's perspective they just instantiate a SOAP or a SimpleXML object, treat it like a regular PHP object (from the syntax perspective), and automatically the relevant extensions jump into action and make sure that "the right thing" happens. For example, you'll see that when using the SoapClient class, creating the SOAP request, making the remote HTTP connection, submitting the request, and then receiving and parsing the response is completely transparent to the PHP developer.

To develop a Web service using PHP, the first step is to have a class that implements the functionality we want to expose. The class can be any PHP class, with no special requirements or limitations. In our case, the class that implements the service is Retailer, which is included in the Retailer.php file.

The second step is to obtain or create a WSDL file that describes the Web service. The Retailer Web service interface is described in the Retailer_Impl.wsdl file. That file points to the implementation URL of the Web service:

http://localhost/wsi/Retailer/
RetailerImpl.php

and points to numerous other WSDL and XSD files (both directly and indirectly), which contain the details of the published services and the definitions of the datatypes used. Note that while PHP's Web services support doesn't strictly require WSDL files, it's highly recommended to use them, to unlock the full potential of PHP's dynamic nature and syntax. Even though writing a WSDL file can be quite an irritating task, WSDL generation tools can be used to automate it.

Data Object Storage
The third step, which is optional, is to implement PHP classes for some or all of the complex types that are used throughout the Web service. In our sample, the classes are defined in datum.php. While the implementations in this file are quite generic, it's possible to implement business logic in these classes, if this logic makes sense in the context of your application. If there's no custom code you want to add to these classes at all, then you don't have to implement them. PHP will use generic data objects to store the data instead.

The last step binds everything together and turns our regular class into a full-fledged Web service. As odd as it may look, this approach is done using just three lines of code in RetailerImpl.php:

$server = new SoapServer(
"http://localhost/new/wsdl/
Retailer_Impl.wsdl"
,
array('classmap' => array(...));

$server->setClass("Retailer");
$server->handle();

The built-in SoapServer class is instantiated, referencing the aforementioned WSDL file, and with a reference to the PHP classes that implement the SOAP types. Next, we instruct our SoapServer object $server to use a Retailer object as the implementation for the Web service. Finally, we call the SoapServer::handle() method, which is responsible for doing all the dirty work. To be precise, this dirty work comprises parsing the SOAP request, figuring out which method is being called and with what arguments, relaying it to the Retailer object, and packing the result in a SOAP envelope and printing it as a result.

While it's common to mistake this small script for a daemon waiting for connections, it's in fact a regular, stateless PHP script, which is only executed when a client tries to consume the Web service. SoapServer::handle() never waits for an incoming connection; by the time it's called the SOAP request is already available for processing. Thanks to PHP's built-in WSDL caching, this stateless strategy is not only extremely scalable, but is also quite fast.

Although after seeing the implementation of the SoapServer you may think it can hardly get any simpler than that, you're in for a surprise. Consumption of Web services in PHP is fully transparent, to the degree that it looks, feels, and behaves exactly like regular function calls. In model.php, the getRetailer() function instantiates a SoapClient object, passing it the same WSDL file, RetailerImpl.wsdl, that the server side uses, and returns it:

function getRetailer($configData) {
...
$result = new SoapClient(
$configData['wsdl'], array(
'trace' => 1, 'location' =>
$endpoint, 'classmap' =>
array(...)));

...

return($result);
}

The SoapClient object that is returned can then be used by the application code as if it was a standard, local object:

$retailer = getRetailer(
$RETAILERS[$config[
'retailer']]);
...
try {
$cat = $retailer->getCatalog();
$items = $cat->getItem();
...

} catch(Exception $ex) { die($ex);
}

Any error that happens during the call, whether it happens on the server side (for example, the service has thrown an exception) or the client side (for example, the server was unreachable) results in a SoapException being thrown. This means that an exception thrown in one of the methods of the Retailer class (on the server side), will propagate over the wire and will affect (or can be caught by) the application code on the client side. Exception propagation is done transparently and automatically.

Consume EJB
In our sample application, the PHP/Java Bridge (from here on Java Bridge) is used to locate, create, and request the catalog for a warehouse using a J2EE session bean. Java Bridge uses the previously mentioned PHP object syntax overloading capabilities to expose Java objects in a very natural way to PHP. The main benefits of this bridge is for companies who have existing investments in Java and J2EE, and can therefore continue to leverage those investments while at the same time taking advantage of the rapid Web development that PHP offers. We have found that the main reasons for using Java Bridge are to either leverage existing back-end EJB or leverage Java libraries and code.

Back in the PHP 4 days, the first Java Bridge was written using JNI. Unfortunately, this early proof of concept was not suitable for production use. The main reason was because of most PHP deployments being on multiprocess Apache as a result of the majority of PHP users preferring the multiprocess Apache paradigm thanks to the architecture's stability and ease of deployment.

Unfortunately, this approach is also the main reason why this early incarnation of a Java Bridge was not suitable for production use. Its use of JNI resulted in the architecture dictating that each Apache process required its own Java Virtual Machine (JVM) instance. With typical Apache configurations running hundreds of Apache child processes, the servers would quickly run out of memory. With the typical JVM taking a few megabytes of memory, it is clear that even without running any Java or PHP business logic, the server would quickly take up gigabytes of memory just for spawning the needed JVMs.

The Java Bridge resolves this problem by using only one JVM per physical Web server. It uses a high-performance binary protocol to proxy through sockets to the JVM. The JVM itself runs on an efficient, event-driven model that can easily handle hundreds, or even thousands, of concurrent Java Bridge connections and still perform adequately. By only requiring one JVM per machine, memory use is kept at a minimum.

As demonstrated previously, instantiating a new Java object is as easy as writing this PHP code:

$obj = new Java('MyClass');

From this point on, the Java object $obj is treated just like a PHP object. Calling a method on it is straightforward and just as expected:

$ret = $obj->method();

Accessing properties is just as straightforward:

$prop = $obj->prop;
$obj->prop = 4;

The Java Bridge also propagates exceptions that are thrown in the Java code. These exceptions are thrown as JavaExceptions and can be caught using the standard try/catch exception-handling constructs of PHP 5:

try {
$obj->method();
} catch {JavaException $je) {
var_dump($obj);
}

Now let's go back to our real-world example. As mentioned previously, setting up the warehouse catalog, submitting an order, and retrieving the catalog are achieved by calling EJB from PHP. This code snippet is taken from the Retailer class, which implements all of this functionality, and it demonstrates how an EJB can be called easily from PHP and should look very familiar for those of you who have called EJB directly from Java:

$context = new Java(
'javax.naming.InitialContext');
$homeObject = $context->lookup(
"ejb/ejbs/WarehouseHome");
$rmi = new Java(
"javax.rmi.
PortableRemoteObject");
$home = $rmi->narrow(
$homeObject, new Java(
"ejbs.WarehouseHome"));
$bean = $home->create();
$catalog = $bean->getCatalog();

Note that in the real world, you would probably not call the EJB in this way. Rather you would likely wrap the code for calling the EJB in one Java method, add that to the Java Bridge class path, and call that method from PHP. This approach would save you from jumping in and out of languages and would probably be more efficient. However, our examples use the more verbose approach to better demonstrate the Java Bridge.

Web Adhesive
PHP plays very well into the world of service-oriented architecture (SOA), and does so at various levels. Foremost, PHP is a great Web glue language and makes it very easy to aggregate services into a uniform Web interface or Web service. By easily consuming Java, SOAP, REST, and many other data sources, plus having the advantage of being an extremely rapid Web development platform, the example discussed here offers a very common use case. In addition, PHP is also extremely suitable for exposing services that we demonstrated mainly using the SoapServer class. We believe that PHP is uniquely positioned to capitalize on the growth in adoption of dynamic languages because of their ease of use, short time to market, and the increased uptake of SOAs.

About the Authors
Andi Gutmans is cofounder and vice president of technology at Zend Technologies, Stew Nickolas is senior technical staff member at IBM Emerging Internet Technologies, and Zeev Suraski is cofounder and CTO at Zend Technologies.

reference: http://www.ftponline.com/channels/java/2006_11/agutsman/default_pf.aspx

Change Time zone of Remote & local mechines

Following is a hint to change the time zone of a computer.

Default computer time zone of our machines is Asia/Colombo.

Sometimes we need to change the time zone since Sri Lanken time is ½ hourlate to actual grinich time therefore can be occurred time different between log files and the PC time.


To change the time zone in Local PC

Steps

1.Desktop -> System settings -> Date & Time

2.Enter the root password to the PC

3.Click on Time Zone tab

4.Change in to relevant time zone and click on OK


To change the time zone in a remote PC

1.login to the relevant PC as rootssh root@

2.type timeconfigthen will display a window with time zone list3.change the time zone and click on OK