• Post Reply Bookmark Topic Watch Topic
  • New Topic

Control deployment of ear by itself.  RSS feed

 
Andrew Tibets
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Is it possible to deny deployment of ear by itself?

Thanks a lot.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a strange question. What are you trying to do?
 
Andrew Tibets
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it looks strange. And I feel nobody does it.

It is used non-portable implementation of EJB. EJB component is coupled
to Oracle VPD technology.
The idea is to verify datasource configuration on deployment,
and if database version is wrong then deny deployment.
I know that binging to datasource can be changed after deployment,
but VPD requires redeployment in this case.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you propose to check on deployment that the right DB is to be used? Deployment is, well, deployment.

Perhaps one solution, which is vendor-dependent, is to deploy without a connection pool but dynamically create and configure it later. The DataSource will also be dynamically created and associated with the connection pool. WebLogic Server allows you to do this via the JMX API.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36446
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew,
You could write a deployment script to check whether the DataSource is correct. For example, you would use wsadmin/jacl for a WebSphere sever. If it isn't correct, you would abort/exit the script and not actually deploy the ear.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This won't work as the problem is not the DataSource - it's the DB which is configured in the connection pool. And in any case, even this won't tell the whole story as the name of the DB in the connection pool is quite likely to be an alias to the real DB name.

The proper solution is for the sys admin to configure the connection pool correctly.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36446
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Roger Chung-Wee:
This won't work as the problem is not the DataSource - it's the DB which is configured in the connection pool. And in any case, even this won't tell the whole story as the name of the DB in the connection pool is quite likely to be an alias to the real DB name.

Good point. It's probably possible to script something by connecting through the database, but that sounds like more trouble than doing it by hand.

Originally posted by Roger Chung-Wee:
The proper solution is for the sys admin to configure the connection pool correctly.

I agree.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!