This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- FlexNet Operations
- :
- FlexNet Operations Forum
- :
- Throw Exceptions from Fulfillment ID Generator
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 19, 2010
05:10 PM
Throw Exceptions from Fulfillment ID Generator
Hi all,
We are overriding the fulfillment id generator to do some validation at the time of licensing. We chose to do it here because all the components we need are available. The problem with this is that if the validation fails there is no way (that I know of) to throw an exception that the user will see. The implemented methods do not allow throwing of anything. I have tried using PRDBaseRuntimeException and RuntimeException, but neither work. I just get an Unknown Error. Can someone help?
Thanks,
Mike Guthrie
Emulex Corporation
We are overriding the fulfillment id generator to do some validation at the time of licensing. We chose to do it here because all the components we need are available. The problem with this is that if the validation fails there is no way (that I know of) to throw an exception that the user will see. The implemented methods do not allow throwing of anything. I have tried using PRDBaseRuntimeException and RuntimeException, but neither work. I just get an Unknown Error. Can someone help?
Thanks,
Mike Guthrie
Emulex Corporation
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 07, 2010
08:29 AM
Hi Mike,
Using the id generator as a validator isn't really the premise of the API - hence the lack of declared exceptions.
However, if there's no alternative, you could consider extending the (abstract )FLEXnetBaseRuntimeException class. As this is then an unchecked exception you can throw it from your generator. FLEXnet will then propogate the exception to the front-end.
public class MyValidationException extends FLEXnetRuntimeException {
//....
}
Hope this helps.
Peter Cameron.
Using the id generator as a validator isn't really the premise of the API - hence the lack of declared exceptions.
However, if there's no alternative, you could consider extending the (abstract )FLEXnetBaseRuntimeException class. As this is then an unchecked exception you can throw it from your generator. FLEXnet will then propogate the exception to the front-end.
public class MyValidationException extends FLEXnetRuntimeException {
//....
}
Hope this helps.
Peter Cameron.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 17, 2010
10:26 AM
Hi Peter,
Thanks for your response. I had figured it out by placing a property/value pair in PublisherDefinedAttributesText_en.properties and using a PRDBaseRuntimeException.
Thanks,
Mike
Thanks for your response. I had figured it out by placing a property/value pair in PublisherDefinedAttributesText_en.properties and using a PRDBaseRuntimeException.
Thanks,
Mike