MyEclipse Tutorial Creating a Data Source in WebSphere Tutorial

  
This tutorial walks you through creating a data source in WebSphere, while focusing on setting up a data source connection back to the MyEclipse Derby server in MyEclipse. The process of setting up other data sources to other DBMSs (such as Oracle, DB2, MS SQL Server, etc.) is similar. In this tutorial, you will learn: Creating a data source using the WebSphere administrative console Test data source without MyEclipse? Xiaobian recommended "MyEclipse crack version download" First, visit the WebSphere management console 1. Start the WebSphere server from MyEclipse. 2. Right-click the server in the server view and select Open Management Console, which opens the administrative console login page. Open the management console from the server view 3. Click the Login button to enter the management console. User ID is not required unless you have set up a dedicated account to log in to WebSphere. Management Console Login 2. Create a Data Source 1. In the menu on the left, expand Resources> JDBC and select the data source. 2. The new data source selected should be within a suitable range, a range of "visible" required data sources—— visible as a single server for the entire node. Specify the data source range 3. Click to create a new data source and add it to the selected scope, enter a name for the data source (the purpose displayed in the management console) and bind the data source to (in your project Use the lookup data source, for example in the EJB 3 project) on the JNDI name. Enter the adn JNDI name of the data source 4. Click Next and you are done creating the data source, but as a resource data source does not expose any useful connections. The wizard will now guide you through the creation of a JDBC Provider exposed by the data source. Note: You can create a JDBC Provider and then create a data source mapping to the JDBC Provider as a separate step. In this tutorial, you create in a single wizard. Third, continue the wizard: Create a JDBC Provider1. Select the JDBC provider you want to use to access the resource. In this case, you need to create a new Derby to connect to the MyEclipse Derby server, then choose to create a new JDBC provider and click Next. Create a new JDBC provider2. Choose the following: Database type: Derby, because you are using the MyEclipse Derby server. Provider type: The Derby web server uses the Derby client because you don't want to use the embedded driver; you need to connect to the remote client of the MyEclipse Derby server. Implementation type: The data source to the connection pool, because you want WebSphere to manage the buffer pool that connects to the JDBC source to provide performance. Fill in the rest of the names and descriptions and click Next. Enter the JDBC provider information 3. Enter the name of the Derby database you want to connect to. In this case, you can find this information by looking at the pre-configuration of the default Derby connection in MyEclipse. You can see the string used when you edit the connection, including the name of the DB at the end. Do the following to find the database name. In MyEclipse, open the DB browser by selecting Window>Show View>Other from the menu. In the Show View window, expand the MyEclipse database and click on the DB browser. Open the DB Browser view and right click on the MyEclipse Derby database and select Edit from the menu. The database name is MyEclipse, and the URL of the connection is attached at the end. Identify the database name 4. In the WebSphere wizard, the database name field type is MyEclipse, and then click Next. Enter the database name 5. Now click Next to skip the security alias, WebSphere displays the new data source summary, and click Finish. Data Source Summary 4. Specifying a Security Alias ​​A security alias is a problem that must be resolved before saving changes. 1. Click on the MyEclipse Derby data source to open the configuration. 2. Click on JAAS– J2C Authentication Data Link in the relevant project. Set authentication data 3. Click New, enter the alias, user ID, and password, then click Apply. 4. Click the Save link and the changes will be submitted to the main configuration and will be officially launched on the server. Save User ID and Password 5. Click the MyEclipse Derby data source link to return to the data source configuration. 6. Locate the Security Settings section, then select the user identity you just created from the drop-down list of Component Management Authentication Alias ​​and click OK. Select a new logo 7. Click the Save link to submit your changes. Saving Changes 5. Testing Data Sources After the data source information is submitted to the server, you need to test the data source. 1. In MyEclipse, right-click the MyEclipse Derby server in the server view and select Run Server. If the server is not running, it will reject incoming connections from WebSphere. 2. In the administrative console, select the check box next to the data source you created and click the Test Connection button. Test Data Source If the connection is successful, a confirmation message will appear at the top of the management console. Connection Confirmation If the connection fails, return to MyEclipse and make sure the MyEclipse Derby server is running. Run the Derby server If it is running, edit your data source connection properties to make sure the database name and connection information you entered is correct. It's also possible that you changed the MyEclipse Derby server instance to run on another port other than the default 1527 port, and the data source will not be able to connect without its custom connection settings. This article comes from [System Home] www.xp85.com
Copyright © Windows knowledge All Rights Reserved