Is it wise to use REST in an eCommerce application? The answer at first seems a no. There is definitely a lot of dynamic content on the backend and eCommerce is as much about requesting services (request CC validation etc..) as much as modifying state (cart contents etc...)
Sun gives us this pretty well defined acid test as to when REST should be used.
The irony of course is that the example given in the sun article is a purchase order.
There is very little that couldn't have a REST "pattern" applied to it. A good example would be something temporary, like sending an email, or resending a receipt. Hrm. Interesting.
I gave up on CXF and simply went back to x-fire and figured out the issue with the aegis mapping files. It was pretty straightforward. The files weren't ending up on the path because they weren't under the resource directory. Case closed on the componentTypes not being found. After that I ran into write methods not being found, so I supplied them. Everything worked shortly after that.
Xfire works. as CXF is the next-gen of Xfire, I imagine it will be nice as it gels, though I'm hoping it gels a little stronger than Xfire since it seems the examples weren't very solid and there wasn't very much in the way of documentation.
This is the documentation of my effort to do WSDL with Apache CXF, an incubation project yet. I'm not sure what the accepted path for web services currently is with Spring, but I've gone through AXIS, XFire, and now this.
Since it's an incubation project, we'll have to cut it some slack, but here we go. Configuring a WebService (WSDL/SOAP) using CXF with Spring is described here. First of all, I put in all the depedencies that I would need. It looks like it's missing an entry. I added in:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle</artifactId>
<version>${cxf.version}</version>
</dependency>
This jar contains the cxf.xml file (META-INF/cxf/cxf.xml) which is used by my Spring my beans.xml file.
The beans.xml file sets up the endpoint. A schema mentioned in the header is broken. Originally, I just couldn't get the schema to load, but I figured I would load it temporarily from a localhost, which apparently others have done as well.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
to this:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://localhost/schemas/jaxws.xsd">
So, now I'm down to this error:
[INFO] Failure
Embedded error: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace
[http://cxf.apache.org/jaxws]
Offending resource: ServletContext resource [/WEB-INF/beans.xml]
I dug around, I searched for something which suggested how to fix this. I tried to make all of the resources local. No luck. I read some of these articles. Still no luck.
It seems I always have troubles until I follow the instructions on the page below:
https://maven-jaxb2-plugin.dev.java.net/
Basically I need to include the following or it doesn't work.
<pluginRepositories>
<pluginRepository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Maven 2 Repository</name>
<url>http://download.java.net/maven/2</url>
</pluginRepository>
<pluginRepository>
<id>maven-repository.dev.java.net</id>
<name>Java.net Maven 1 Repository (legacy)</name>
<url>http://download.java.net/maven/1</url>
<layout>legacy</layout>
</pluginRepository>
</pluginRepositories>
I experienced firsthand the dangers of software RAID as implemented by an onboard SATA controller posing as a RAID controller. Many computer enthusiasts who want to utilize RAID take the lower cost controllers found on a motherboard and use them considering them to be a full RAID solution. Not so. While the performance numbers are nearly indistinguishable from most of the cheaper full RAID solutions, there are some features found on real hardware RAID controllers which really set them out from your onboard software controllers.
Here are some traits of a true RAID controller:
- Diagnose hard drives on their own. They can detect SMART failures, and/or read failures.
- Use native RAID commands instead of SATA/IDE ones provided by the BIOS.
- Have a read/write cache built on board. They have a battery backup in case of power failure.
- Upon detection of failure, they recover without the use of a driver.
- They present a single drive per RAID volume/array to the OS, never multiple)
If your card is missing any of these traits, it's probably not hardware RAID.
Somewhere out there, Chad is laughing, hopefully not too hard. (for his own good) :)
References
I was looking for something which would do a data dump (sometimes there is a need to look at the data in an environment outside of the debugger!)
Data Dumper thread I found
which references how reflection is done in java. Gosh I hope it isn't horribly arcane.
Reflection in Java
Nice
Meme Storm - A simple Spring MVC example
a note if you are using xfire (wsdl/SOAP) with spring:
