• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using custom Exceptions within a Session Bean

 
Geoffrey Florentine
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a session bean that has business methods that throw a custom exception I have written. I have packaged the exception class in its own jar file. I can compile the bean and interfaces with the jar file on the classpath and it compiles fine.

My question is: how do I make the jar file available to the session bean once it's deployed. I have looked at the options in deploytool and have drawn a blank.

Any help would be much appreciated.

Geoff
 
Frederic Esnault
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

this is quite simple. You just add to add your jar as a library in your application (ear). To do this, use the deploytool. Select your application node, and in the general tab, click the Add Library Jar button.

This will create a "library" directory in your application directory hierarchy and your jar will be inside.

I made a screen capture for you, you can find the image there :
http://esnault.frederic.free.fr/certification/images/add_library_jar.png
 
Geoffrey Florentine
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Frederic, that worked a treat

Geoff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic