[JBoss-user] [EJB/JBoss] - Re: EJB creation fails after server restarts
gorano, We are caching the remote home in our service locator. jamesstrachan, Thanks for the proposed workaround. Besides, all I know is that it workds using WebLogic, I was expecting the same behavior from JBOSS. I dont know if it is allowed in the J2EE specifications. Thanks for your help, Regards, FrereTuck View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840118#3840118 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840118 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: EJB creation fails after server restarts
What exactly are you caching? Initial Context, RemoteHome or/and Remote Object? If you give some more background I can give you some hints that works for us. /G View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840109#3840109 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840109 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB/JBoss] - Re: EJB creation fails after server restarts
I have tested this on another J2EE server (no names, no pack drill) and found that the home interface appears to contain data specific to the server instance - perhaps a memory address or object within the server. Stopping and restarting the server makes this reference invalid, leading to the error that you describe. The actual exception reported may vary widely according to circumstance. Your code should detect the exception and react by clearing the cached entry in the Service Locator and doing a new lookup. This should be contained within a loop so that other errors (server still down, etc.) are detected and reported. The code might look like :- | boolean goodLookup = false; | int retriesToGo = 3; | Exception fatalException; | | home = serviceLocator.fetch( url ); | while ( retriesToGo > 0 && goodLookup == false ) { | try { | if ( home == null ) { | home = serviceLocator.fetch( url ); | } | remote = home.create( key ); | goodLookup = true; | } | catch ( Exception e ) { | fatalException = e; | serviceLocator.invalidate( url ); | home = null; | } | retriesToGo--; | } // End of while loop. | | // If the lookup fails after three attempts, throw an exception. | if ( goodLookup == false ) { | throw fatalException; | } | obviously with supporting code in the Service Locator. James View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840060#3840060 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840060 --- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user