Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Redeploying an app  RSS feed

 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • 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.
 
Amy Zeng
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • 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
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!