Recent Bookmarks and Annotations
-
EJB Tutorial: Getting Started with Enterprise JavaBeans on 2008-09-09
-
remote interface and remote home interface
-
-
-
local interface and local home interface
-
local home or remote home interfaces
-
local or remote interfaces
-
-
-
distributed, or remote, beans
-
local interfaces, remote interfaces, or both
-
EJB Tutorial: Getting Started with Enterprise JavaBeans on 2008-09-08
-
NetBeans Wiki: SpringMVConNetBeansGlassFish on 2008-07-24
-
Inversion of Control (IoC)
-
Aspect-Oriented Programming (AOP)
-
-
Inversion of Control (IoC)
-
Inversion of Control (IoC)
-
The Spring Web MVC framework
-
-
Unit and integration testing
-
-
basic inventory management system
-
-
project name as “springapp”
-
“springapp” as the dispatcher name
-
-
springapp/web/WEB-INF/web.xml
-
plugin users can ignore this section
-
-
-
-
-
-
BeanNameUrlHandlerMapping
-
-
-
-
-
return new ModelAndView("hello.jsp");
-
In Spring Web MVC, the Controller handles the request and returns a ModelAndView
-
-
-
-
-
-
springapp/test/springapp/web/HelloControllerTests.java
-
-
-
When we enter
http://localhost:8080/springapp/ in a browser, it should pull up the welcome file 'index.jsp', which should redirect to 'hello.htm' and is handled by the DispatcherServlet, which in turn delegates our request to the page controller that puts the date and time in the model and then makes the model available to the view 'hello.jsp'.
-
-
ResourceBundleViewResolver
-
set a prefix and a suffix on the InternalResourceViewResolver
-
Test-Driven Development (TDD)
-
-
-
service responsible for handling products
-
-
-
make it an interface instead of a concrete class
-
public interface ProductManager
-
It's usually a good idea to mark unimplemented methods by getting them to throw an UnsupportedOperationException
-
We rename HelloController to InventoryController and the HelloControllerTests to InventoryControllerTests.
-
not going to add any code to load the business objects from a database
-
we can stub a couple of Product instances using Spring's bean and application context support
-
-
This form uses a tag library named 'spring-form.tld' that is provided with the Spring Framework. We have to copy this file from the Spring distribution ('spring-framework-2.5/dist/resources/spring-form.tld') to the 'springapp/web/WEB-INF/tld' directory that we also need to create
-
commandClass and validator
-
a formView that is used for the form and a successView that we will go to after successful form processing
-
regular view reference that is forwarded to one of our JSP pages
-
alternative way is to use a redirect, where a response is sent back to the users browser instructing it to redirect to a new URL
-
we need to add an entry in the 'springapp-servlet.xml' file to define the new form and controller.
-
-
-
-
you won't have to catch any exceptions
-
-
opening and closing the connection or any statements. It is all handled for you
-
Since we are extending SimpleJdbcSupport we get a SimpleJdbcTemplate prepared and ready to use.
-
getProductList() executes a query using the SimpleJdbcTemplate
-
ProductMapper implements the ParameterizedRowMapper interface that defines a single method named mapRow that must be implemented.
-
saveProduct is also using the SimpleJdbcTemplate
-
-
Spring provides an extensive testing framework that supports JUnit 3.8 and 4 as well as TestNG
-
AbstractTransactionalDataSourceSpringContextTests
-
dependency injection of any public setter from an application context
-
opportunity to prepare our database with the appropriate test data in the onSetUpInTransaction method
-
deleteFromTables and executeSqlScript methods
-
-
The pointcut applies to any method called on the ProductManager interface. The advice is a transaction advice that applies to methods with a name starting with 'save'. The default transaction attributes of REQUIRED applies since no other attribute was specified. The advice also applies "read-only" transactions on any other methods that are adviced via the pointcut.
-
-
copy aspectjweaver.jar from the 'spring-framework-2.5/lib/aspectj' directory and commons-dbcp.jar and commons-pool.jar from the 'spring-framework-2.5/lib/jakarta-commons' directory
-
通信/安全 on 2008-07-15
-
Trail: RMI (The Java™ Tutorials) on 2008-07-14
-
The Java Remote Method Invocation (RMI) system allows an object running
in one Java virtual machine to invoke methods on an object running
in another Java virtual machine.
-
Lesson: Overview of JNDI (The Java™ Tutorials > Java Naming and Directory Interface(TM).) on 2008-07-14
-
service provider interface (SPI)
-
Directory Concepts (The Java™ Tutorials > Java Naming and Directory Interface(TM). > Naming and Directory Concepts) on 2008-07-14
-
A directory service associates names with objects and also associates such objects with attributes.
-
Lesson: Naming and Directory Concepts (The Java™ Tutorials > Java Naming and Directory Interface(TM).) on 2008-07-14
-
A context is a set of name-to-object bindings.
-
A naming system is a connected set of contexts of the
same type (they have the same naming convention) and provides
a common set of operations.
-
-
A namespace is the set of all possible names in a naming system.
-
Lightweight Directory Access Protocol - Wikipedia, the free encyclopedia on 2008-07-14
-
-
Relative Distinguished Name (RDN)
-
-
"cn" for common name, "dc" for domain component, "mail" for e-mail address and "sn" for surname
-
Lesson: Remote Management (The Java™ Tutorials > Java Management Extensions (JMX)) on 2008-07-14
-
A connector server is attached to an MBean server and listens for connection requests from clients.
-
A connector client is responsible for establishing a connection with the connector server.
Groups
Nature lee havn't joined any group yet.