• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Prevent JBoss deploying a bean

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a situation where a session bean (call it Bean A) is defined in an external jar that I have no control over. This bean is used by other beans in that jar.
I wish to override the behaviour of this bean A and therefore, I have created another session bean and have named it A. This is because the other beans in the external jar relie on the bean with name A.

So I have a EAR file with the external jar and my A.class file. Deploying on JBoss throws the Bean already registered error. Is there any way to get JBoss to not deploy the bean from the external jar?
Or do you have another solution for the situation I have?

Many thanks,

Johny
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A few options I can think of:

a) Repackage the JAR file replacing the existing A.class with yours.

b) Use AOP to overwrite the existing EJB's methods

c) Use pre/post processing mechanism built into JBoss (the term used for this escapes me) to override the EJB's methods.
 
reply
    Bookmark Topic Watch Topic
  • New Topic