Win a copy of TDD for a Shopping Website LiveProject this week in the Testing 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Problem in deploying multiple EARs in same JBOSS having same application and EJBs in all the EARs

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone help me out as i have given a work to deploy two or multiple EARS in same JBOSS ,i.e. inside Default folder of JBOSS but having same application in all the EAR'S .For e.g i am currntly trying to deploy two EARS having same application and ejb's.,nd 1 application got delpoyed,the names of application are BancMateBOB.ear and BancMatePNB.ear ,both are having same war,same jar,and BancMateBOB.ear got deployed first successfully without any error,but after deploying BancMateBOB.ear ,BancMatePNB.ear could not be deployed,the error was like:



I am using JBOSS 4.0.2 CR2 and made changes in application.xml of both in METAIINF ,i have changed conteXt root as i have to And tried to make changes in ejb-jar.xml,jboss.xml and jbosscmp-jdbc,xml for BancMatePNB.ear but error came as i am showing...........please provide me the solution for the same .
Thanking you.waiting for the answer
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Shreyasi.

I have updated your post to change the "all uppercase" title to mixed case.
 
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
You cannot do what you are trying to do. The easiest thing to do is run multiple instances of JBoss AS and deploy only one EAR to each instance.

A harder solution is to change the JNDI names of all EJBs, and of course modify the code in each app to use the updated names.
 
Shreyasi Gupta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply,i made chages as per you told to change the jndi names,and i changed all the <ejb-name> and <jndi- name> in ejb-jar.xml and jboss.xml but only for BancMatePNB.Ear.For BancMateBOB.ear,i didnt make any chages as it was alwaz getting deployed.And i also made changes in LookupClient.java file so that it while deploying,when ejb's get looked up,thay must get the required result as changes made in ejb.jar.xml and jboss.xml.Also i didn't have to change all the ejb's name in every code,only made changes in LookUpClient.java and through the use of variable whose value got defined in INI file.till now i have achieved the deployment of both the ears successfully,thanks you for your answers and support .

now my next task is to run each ear with different database,for that i have written two datasource in mssql-ds.xml for each of the two different ear,and again made changes in DabaseClass.java for the connections,but both are getting connected to one database only,is it posiible to make connection for each of them separately........
.
changes made in Databaseclass.java for connection:


value of LOOKUPSTR=PNB in ini file.Also some changes made in ejb-jar.xml for BancMatePNB are as follows:
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic