Development WAS CE Deployment Scenario 
|
|
Why use this deployment scenario?
- Note that this scenario is only available for WebSphere Portlet Factory 6.0.2, and later versions. This is the first WPF version to ship the WAS CE server.
- This scenario is a very simple scenario that is excellent for quick and easy development and testing of applications.
- It eliminates the need to install and run a full install of WAS or Portal.
- It allows for auto deployment.
- It allows you to test your models quickly running from Eclipse or RAD.
Description of the scenario
- The development WAR is deployed to a local WAS CE server.
- There is no configuration for a portlet application.
Configuration Steps
- Enter a project name without any spaces, for example, MyFirstProject . Spaces and certain special characters are not permitted in project names. Click Next.
- At the Add Feature Sets step expand Tutorials and Samples and select Applications to install all of the shipping sample applications. Click Next.
- Specify the Java build settings. For the Java Settings step, you define source and output folders, external libraries, and classpath order. For the purposes of this sample, choose default values and click Next.
- In the Deployment Configuration Dialog box choose the MyWASCE1 Application Server Deployment configuration that was supplied with . This configuration points at the locally installed WAS CE server and will be used whenever you test and run your application from the Designer.
- Click Finish to create the project.
- Click Yes to open the Portlet Factory Perspective in Eclipse.
- Click Yes to start the WAS CE server running.
- Click Yes to deploy your project now.
Running your sample using WAS CE
- Follow these steps to run a sample application using the WAS CE project file you created in the last step. You can now run a sample application on the server to test that everything is properly configured.
- In the Project Explorer view, expand the project down to the WEB-INF\models\samples folder. All of the models you will create in other tutorials will go into this same folder.
- Locate the SimpleServiceConsumer model inside the samples folder and double-click it to open it: \samples\gettingstarted\SimpleServiceConsumer
- From the menu, choose Run > Run or click above the workspace.
- Click WebSphere Portlet Factory Model in the list of configurations and click Active Model.
- Click Run to run the model. The Portlet Factory Designer will launch a web browser and will open the model using its URL.
- If everything has been configured correctly, you should see a web application in the browser. It is not necessary to do anything with this application. Simply displaying the application in the browser confirms that the setup is correct and that the Application Server is running the application.
DataSource Configuration in WASCE
Note: This procedure requires the modification of the following two files: wasce.web.xml, and geronimo-web.xml. These can be found in the following locations:
WPF 6.1.0 and Earlier versions
wasce.web.xml - WEB-INF\bin\deployment\wasce.web.xml (located in project workspace).
geronimo-web.xml - WPFDesigner\FeatureSets\Web-App_6.x.x\Deployment\antscripts\templates\WEB-INF\geronimo-web.xml (located in WPF install directory)
WPF 6.1.2
wasce.web.xml - WEB-INF\bin\deployment\wasce.web.xml (located in project workspace).
geronimo-web.xml - WEB-INF\bin\deployment\geronimo-web.xml (located in project workspace).
In order to run any models which use DataSources located through JNDI in the WASCE environment you will need to do the following:
- Create a new DataSource in WASCE admin and then click on it's "usage" link. See http://publib.boulder.ibm.com/wasce/V2.0.0/en/database-pool.html
for more details.
- Edit the template that will be used to generate your web.xml file. You should add changes instructed in the database-pool usage from step 1.
<resource-ref>
<res-ref-name>jdbc/MyDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
- Edit the template that will be used to generate the geronimo-web.xml file. You should add the changes instructed in the database-pool usage from step 1. Look for the commented out region that mentions the "Dbpool dependency".
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
<environment>
<!-- snip -->
<dependencies>
<dependency>
<groupId>console.dbpool</groupId>
<artifactId>datasource_play</artifactId>
</dependency>
</dependencies>
<!-- snip -->
<resource-ref>
<ref-name>jdbc/MyDataSource</ref-name>
<resource-link>datasource_play</resource-link>
</resource-ref>
</web-app>
The following forum posts provided this MUCH needed information:
This should probably be added to the FAQ as well under the debugging datasource connection section, since it is very painful as a first time WPF user with WASCE to get around this.
|
|
|
|
| Version 13 |
December 22, 2009 |
11:35:15 AM |
by Rob Flynn  |
|
|