| At line 5 added 1 line. | 
| [{Java2HtmlPlugin | 
| At line 6 changed 1 line. | 
| {[Java2HtmlPlugin | 
| import javax.naming.Context; | 
| import javax.naming.InitialContext; | 
| At line 8 changed 1 line. | 
| public abstract class MyXmlcView extends AbstractView { | 
| import junit.framework.TestCase; | 
| At line 10 changed 4 lines. | 
| protected void renderMergedOutputModel(Map model, | 
| HttpServletRequest request, | 
| HttpServletResponse response) | 
| throws Exception { | 
| import org.mockejb.MockContainer; | 
| import org.mockejb.SessionBeanDescriptor; | 
| import org.mockejb.jndi.MockContextFactory; | 
| import org.springframework.context.ApplicationContext; | 
| import org.springframework.context.support.ClassPathXmlApplicationContext; | 
| At line 15 changed 2 lines. | 
| this.xmlcContext = XMLCContext.getContext(getServletContext()); | 
| OutputOptions oo = new OutputOptions(); | 
| /** | 
| * Parent TestCase class for testing EJBs using MockEJB | 
| * | 
| * @author mraible | 
| * | 
| */ | 
| public abstract class MockEJBTestCase extends TestCase { | 
| At line 18 changed 1 line. | 
| XMLObject xo = // creating the XMLObject from the model | 
| /** | 
| * This method sets up a MockContainer and allows you to deploy an EJB to | 
| * it. Override <code>onSetUp()</code> to add custom set-up behavior. | 
| * | 
| * @see #onSetUp() | 
| */ | 
| protected final void setUp() throws Exception { | 
| MockContextFactory.setAsInitial(); | 
| At line 20 changed 3 lines. | 
| response.setContentType(getContentType()); | 
| this.xmlcContext.writeDOM(request, response, oo, xo); | 
| } | 
| Context ctx = new InitialContext(); | 
| ApplicationContext appCtx = | 
| new ClassPathXmlApplicationContext(getConfigLocations()); | 
|  | 
| ctx.bind("java:comp/env/jdbc/appDS", appCtx.getBean("dataSource")); | 
|  | 
| MockContainer mc = new MockContainer(ctx); | 
| SessionBeanDescriptor dd = getDeploymentDescriptor(); | 
| mc.deploy(dd); | 
| onSetUp(); | 
| } | 
|  | 
| protected String[] getConfigLocations() { | 
| return new String[] { "classpath:/applicationContext.xml" }; | 
| } | 
|  | 
| protected void onSetUp() throws Exception {} | 
|  | 
| protected abstract SessionBeanDescriptor getDeploymentDescriptor(); | 
| At line 25 changed 1 line. | 
| ]} | 
| }] | 
|  | 
| [CreateDAO_zh] | 
| [CreateDAO_sp] | 
|  | 
| [CreateManager_es] | 
|  | 
| [QuickStart Guide_es] | 
|  | 
| [SpringControllerUnitTest] | 
|  | 
|  | 
| [δΈζζε|Articles_zh] |