Posts

Showing posts from March, 2011

Retrieving Datasource Name with iBatis on Spring Framework on WebSphere Application Server 6.2.X

I' ve used the following code sample in order to retrieve the name of datasource that is used by our bean (SqlMapClientTemplate) to access the database. I am using Rational Software Architect 7.5.X.

// Import statements import org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy; import com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource; import java.lang.reflect.Field; // ... WHATEVER ... try { TransactionAwareDataSourceProxy proxyDatasource = (TransactionAwareDataSourceProxy) getSqlMapClientTemplate().getSqlMapClient().getDataSource(); WSJdbcDataSource dataSource = (WSJdbcDataSource) proxyDatasource.getTargetDataSource(); Field dataSourceField = dataSource.getClass().getDeclaredField("cm"); dataSourceField.setAccessible(true); Object fieldValue = dataSourceField.get(dataSource); dataSourceField.setAccessible(false); System.err.println("# DataSource Details:" + fieldValue); } catch (Exception e) { System.err.println("Exception occure…

Enabling ClearCase in Eclipse or Eclipse Based Softwares

Image
After installing clearcase adapter plugin to Eclipse or Eclipse based IDE such as IBM RSA(Rational Software Architect), button of ClearCase may not be immediately appeared on the menu bar. Even, sometimes workspace changes causes ClearCase button disappeared. In this case, you should try enabling clearcase from capabilities settings of eclipse.
Open "Window>Preferences>General>Capabilities", then press "Advanced" button. "Advanced capabilities Settings" menu will be displayed, select "ClearCase SCM Adapter" then press "OK". If required, restart your IDE.

Download: http://sourceforge.net/projects/eclipse-ccase/

 .

Easier and Faster Way to Installing Eclipse Plugins

The fastest way to install an Eclipse plugin is directly moving the jar files of target plugin feature to plugin folder at eclipse installation directory (e.g. C:\Eclipse\plugins). Then, start eclipse with -clean parameter (e.g. C:\Eclipse\eclipse.exe - clean).

As an example, Glassfish eclipse plugin is available to download at http://ajax.java.net/eclipse/plugins/. Download the recent version of the plugin jar (so far the latest version is com.sun.enterprise.jst.server.sunappsrv_1.0.54.jar) for your Eclipse 3.5.X. Then, paste into the $ECLIPSE_INSTALLATION_DIR$\plugins\. Start your eclipse with -clean parameter.

That's All...

Installing GlassFish v2 and v3 Eclipse Plugin

Image
Traditional rituals of installing a plugin depends on using a repository where eclipse can retrieve the available set of packages to update or install. This repository can be an archieve file, a local folder or a server directory on the web, network or anywhere available to access from its URL. In this screenshots, I used Eclipse 3.5.0 and GlassFish 3.0.1

Go to "Help>Install New Software..." then press "Add" button.  Then, set the location field to "http://ajax.java.net/eclipse/" and define a name(optional).


First of all, select "Show only the latest versions of available software" in order to select the latest version of plugin; then select the checkbox of "Glassfish Java EE 5 and Java EE 6 support".


Then, press "Next" button, on the next menu.
Finally, select "I accept the terms..." button, press "Finish" to proceed installation.
Get ready to wait for a while (depends on connection speed but generally…