I am still new to Viewpoint, together with its bundle of design patterns. So I wonder is there anyway we can develop a non-web Spring Java application that can still utilize the DAOs provided by Viewpoint PDK? Just want to print out some values for testing without the need to deploy to the web server. I always get a no sqlMapClient exception when I try to write a separate class for this purpose.
A step-by-step explanation or any source references would be greatly appreciated!
Yes, you can definitely develop a Spring Java application outside of a web environment that utilizes the Viewpoint PDK DAOs. The DAO layer is simply a data access layer of the framework and does not have any dependencies on web technologies or components. The no SqlMapClient exception is due to an incorrect wiring of the DAO in your Spring application context file. Please refer to the dependency injection page of the PDK for an example of how to create the SqlMapClient bean and wire it into the DAO: http://developer.teradata.com/viewpoint/reference/viewpoint-pdk-reference/dependency-injection.
Thanks for your reply. But can you show me how to compile and run a non-web java app? What sort of files do we need to put in and how about the structure of the directory?
A related question is how to utilize the testing capability that comes with the portletGenerator? I execute "ant test" after getting all the steps as in the viewpoint testing guideline and run into the same error message when I try to create a DAO object and execute any particular method of it.