HomeDocumentation > Configuring and administering > Deploying and administering assets in Geronimo > Deploying and administering plugins > Converting applications into plugins using the Administration Console

This topic will take you through plugin transform, export and import by using Apache Geronimo administration console. We have used an existing tutorial from the tutorial section. See the Stateless Session Bean tutorial for application development and deployment. Then use the illustration in this tutorial to export and import Java EE artifacts from Apache Geronimo administration console.

Clarification
The Application client referred to in this tutorial is actually a Web Application Client.

Converting the application into a plugin via console

In this section, we will convert an existing applications into a plugin directly by using the administration console.

  1. Launch the administrative console and select Plugin under Applications on the navigation panel.





  2. Under Create Geronimo Plugin, select jdbc/userds database pool from the drop-down menu.





  3. Then, click Export Plugin.





  4. On the next page, keep all the values default and click Saving Plugin Data.





  5. On the next screen, click Done to convert the resource pool archive into a plugin directly.





  6. Similarly, convert ApplicationClient and StatelessSessionEJB into plugins.


Exporting and importing plugins via console

We are using Apache Geronimo V2.2 for this tutorial.

Exporting the application as a plugin

  1. Launch the administration console and select Plugin under Applications on the navigation panel.





  2. Under Create Geronimo Plugin, select jdbc/userds database pool from the drop-down menu as shown in the figure.





  3. Then click Export Plugin.





  4. On the next page, keep all the values default and click Saving Plugin Data.





  5. On the next screen, click Export Plugin.





  6. A window pops up suggesting to save the plugin. click OK.





  7. Similarly, export ApplicationClient and StatelessSessionEJB as plugins.








Create a custom repository from Geronimo Administrative Console

  1. Create a folder, for example myplugins, in your hard drive.
  2. Copy the exported plugins to this directory.
  3. Next create a geronimo-plugins.xml which will enlist all the plugins in our repository.
    geronimo-plugins.xml
  4. After this is done, place the plugins in the myplugins repository similar to the way that plugins are placed in the Geronimo repository. For example place jdbc%2Fuserds-1.0.rar in C:\myplugins\console\dbpool\jdbc%2Fuserds\1.0, ApplicationClient-1.0.car in C:\myplugins\default\ApplicationClient\1.0, and StatelessSessionEJB-1.0.car in C:\myplugins\default\StatelessSessionEJB\1.0
  5. This completes our initial setup to create a custom repository by using Geronimo administration console. Next, select the Plugin portlet and then click Add Repository as shown in the figure.





  6. Name the repository as myplugins and give the complete name as file:/C:/myplugins/*. click *Add Repository.





    This completes the addition of repository in Geronimo.

Importing the plugin

  1. Before we start importing our exported plugins, we should uninstall the EJB jar, Application Client WAR, and database pool from the server. This can be done as shown in the subsequent figures.











  2. After this is done, select myplugins repository from the drop-down list.





  3. Click Show plugins in selected repository.





  4. Now, from the previous steps, we see that Application Client has StatelessSessionEJB as a dependency, which in turn has a dependency on the database pool. Therefore, if we import our Application Client plugin, the other two plugins should be imported automatically. Select the Application Client plugin and click Install.





  5. The next screen displays the various artifacts associated with our Application Client plugin. Click Install.





  6. After this is done, the acknowledgement suggests that the Databasepool and the Stateless session EJB have been installed successfully.





    After this is done, you can retest the functionality of the application functionality.