- This topic has 7 replies, 2 voices, and was last updated 20 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
robinsinghMemberthis Query has been lying in the Sticky Section for a couple of days , I was just wondering , if it didnt catch anybody’s attention ,So i am posting it here in the regular Queries section.
ENVIRONMENT DETAILS:
I have configured myEclipse with jboss 4.0 final version
on windows XP professional(SP2) using Java[TM] 2 Platform,
Eclipse Platform
Version: 3.0.0
Build id: 200406251208
jdk version(build 1.4.2_05-b04)
myEclipse 3.8.2
————————————————————-
here is one more problem i have struck into ::Just like the hypersonic db’s data gets stored in
jboss4\server\default\data\hypersonici need to know where the mySQL gets stored in.
acc . to my observation it doesnt get stored in the corresponding
jboss4\server\default\data\mySQLfor that matter,no such folder gets generated by jboss at runtime if mysql is configured to be
working with jboss 4.0 (both RC1 and final versions)In one of the applications i am working on rite now, i need to know this
so that i can delete the already created tables in the mySQL database.
the book (written corresponding to hypersonic db) deletes contents
of jboss4\server\default\data\hypersonic
but when i run my jboss+mysql config , i cannt find no such folder ,
hence my application crashes.i was wondering if you could point me to some thread where this might have been discussed. I have tried checking on jboss forums.
regards
Thanks.
robin
Riyad KallaMemberMoving to Random Thoughts for community involvement (nothing to do with ME)
robinsinghMemberwell i got an answer from bill burke , the author of the oreilly+jboss book i am following.
he says there’s no solution other than just directly deleting the tables from mySql using its Query tool . it(mySQL) doesnt make any data folder in the deploy dir . just like hsql db does.
Riyad KallaMemberJeez, sounds harsh… thank you for the followup though.
Out of curiosity, why aren’t you just using a JNDI data source to MySQL, why the tight-integration into JBoss? (I don’t know JBoss)
robinsinghMembersorry for my unawareness on this issue,
just trying to make things clear enuf for myself..why aren’t you just using a JNDI data source to MySQL, why the tight-integration into JBoss?
Here you mean to say my E.J. Beans can access any database regardless of the fact that it is integrated into my App.Server or NOT ?
just using the database as the JNDI source in the Beans code will let me do so .. rite..!!?please confirm ,
(i will have to try if i can make it work though)
robin
Riyad KallaMemberYes Robin that is exactly right… I don’t know if you are doing CMP, in which case I don’t think you need to worry about the JNDI data souce at all… since all persistence is handled by the app server/Beans
robinsinghMemberyea the thing is i am writing an Enterprise application that uses
Bean Managed Persistence.by the way , i wanna take your opinion , i am trying to implement database replication in this application .Myprofessor wants me to write the BMP code so that i talk to 2(or more) databases at a time.
All this has to be done without changing the beans code at the application server level.it goes like
BMP
makes
Wrapper JDBC
Calls
|
|
|(talks to)
|
|
|
Wrapper JDBC lib.
Calling actual
JDBC lib.
But consults
a config. file
that tells the location
and number of databases
available
|
|
|
|(data persists to)
|
|
|
Actual DB’sthe essence of the whole thing is BMP Code at the application server,
never changes and is not aware of the number & location of databases available .It only calls a Wrapper JDBC lib. as if its making its calls to one single database, These calls are received by the intermediary Wrapper JDBC library that actually calls JAva JDBC library after consulting a config file for the location and number of databases available.
The changes only need to be made in a simple Config file .regarding the
database changes.What do you think about the whole idea.
I am asking your opinion in the original Question’s Context.1)Would i be able to make the JNDI sources available to my Wrapper JDBC library regardless of the number and locations of the databases available. — just by the jndi context stmts in my code.
2) And it is okay to have these databases separately started , and not embedded in the jboss.??
3) And the changes that we make in the jboss 4.0 config files to make it work for mySQL (from hsqldB) only pertain to the CMP BEans and dont
have to do anything with the BMP beans. ??
Riyad KallaMember1) Yes, just define multiple JNDI contexts, for example: jdbc/mysql, jdbc/postgresql, jdbc/hsql. Please check JBoss docs for this.
2) Definately, just make sure to catch exceptions if the a connection cannot be returned, then just try the next JNDI context.
3) I have no idea about this. -
AuthorPosts