• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Redeploying an app

 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi it's me again. This is still in regards to the Chapter 4 example of the BMP entity bean, from Sun's J2EE Developer's Guide.

As I mentioned in my other post on this topic, I found that I needed to run cloudscape's IJ tool so I could "delete from account;" before I re-ran my application.

I decided I'd modify the Account EJB so that it would not simply throw an uncaught expection. So here is the modified method:The try catch block at the end is inserted by me. This works great now.

But I had a good deal of trouble gettting Sun's app server to "Update and Redeploy". In short, it doesn't work, or I'm perhaps expecting too much of it. I needed to completely remove the EJB From the Account app, and re-do the EJB Jar Wizard, resetting all the jdbc stuff, and the transaction support, etc..

Is there no way for the app server to realize that a recompile is necessary, since the source class files have changed? It seems to do this check, but poorly. Example: here is the output in the DOS window when I undeploy the app, and click "update and redeploy"
But there is code generation required! How to get it to realize this is the problem.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, Mike, have you solved "update and redeploy' problem? Now it happened to me. i have not any idea about it.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
see my response to your other post.

I eventually realized that 'update and redeploy' was broken, but there is a work-around. hopefully you are not like the 'unlucky' co-worker of mine.
 
Amy Zeng
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Mike,
I think i have same bad luck as your 'co-worker', every time I need to break every JAR and War, then close the depolytool, reopen it and refill Wizard that was missed after i close the tool. Now I am sick for the deploytool but i have to use it to finish my project, my group members have no problem to use it.
Thanks again.
Amy
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Completely unrelated to your questiojn, but...

In case of an exception, the statement will not be closed. Try

Similarly, I don't know where your Connection is coming from but you should take care to close it in a finally clause. (I hope you're not grabbing a permanent connection for your bean -- that's what connection pools are for).
- Peter
 
If you have a bad day in October, have a slice of banana cream pie. And this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic