Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Control deployment of ear by itself.

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Is it possible to deny deployment of ear by itself?

Thanks a lot.
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 41185
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41185
848
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic