invaluable help! Thanks very much indeed :-)
If only I'd asked this question a few days ago. D'oh!


From: "Rod Macpherson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
Subject: RE: [JBoss-user] Multiple deploy of ear, how to steps
Date: Tue, 9 Dec 2003 07:19:14 -0800

a) Right
b) Right
c) Right. Adding a new IP is the same as adding a new machine as far as the network is concerned. If you want to make the name public you will have to register it as a public domain name or map an URL like newbie.foo.bar.com to the new address.


I am pretty sure Bill Burke (JBoss Chief Architect and Subscription CD Manager:) is adding a multihome discussion to the documentation.

        -----Original Message-----
        From: Brian Styles [mailto:[EMAIL PROTECTED]
        Sent: Tue 12/9/2003 5:35 AM
        To: [EMAIL PROTECTED]
        Cc:
        Subject: RE: [JBoss-user] Multiple deploy of ear, how to steps



        Thanks Rod !
        That makes sense and seems WAY simpler. This should definately be in a doc
        somewhere!
        If you don't mind, just to make sure I've got it right:

        a) do you just use the hosts file just to test that it's working without
        having to setup dns

b) >> So if you assign A.B.C.D to your NIC and map it to www.bar.com in DNS
and start JBoss using --host www.bar.com you are in business.


This is the one thing I'm still a bit unsure of. Currently my server has one
live ip address on the internet.


Are all the new ip addresses that you add to the nic local ip addresses, eg:

           127.0.0.2
           127.0.0.3 etc

        Probably not, because putting them into dns won't work. So is each new ip
        address that you add to the NIC must be a new live ip address? Correct?

        thanks again, so much,
        Brian



>From: "Rod Macpherson" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: RE: [JBoss-user] Multiple deploy of ear, how to steps
>Date: Tue, 9 Dec 2003 05:05:44 -0800
>
>A) Right. You can bind many IP addresses to your NIC card through the
>Advanced tab of the TCP properties or using the ifconfig utility.
>
>B) Right. The example I gave was witha simple hosts file entry. In terms
>of DNS resolving these addresses you would not and should not use the local
>hosts file to map names to addresses. Just map fully qualified names to
>your IP addresses and your NIC will listen for those its been assigned. So
>if you assign A.B.C.D to your NIC and map it to www.bar.com in DNS and
>start JBoss using --host www.bar.com you are in business. You can fire up
>as many JBosses as you have mapped IPs on that machine, being careful to
>set the VM memory settings appropriately.
>
>C) Wrong. Ports are associated with IPs so there are no ambiguities at all.
>
>D) Right. The same considerations that you would use to run concurrent
>processes of any kind apply to multiple instances of JBoss. If you had two
>or three with appropriate amounts of memory and CPU loads you can boost
>performance. This has advantages over multiple threads within a single JVM
>as you can imagine. If you have 20 EAR files deployed you have one heap and
>one GC and also one slice of the CPU pie that the underlying OS has dished
>out to the JVM. That may or may not be a problem, depends on what they are
>doing. In any event, distributing those over a couple JVMs or several JVMs
>(depending on how powerful the box is in terms of CPUs and memory and bus
>speeds...) might be the way to go.
>
>
>
>
> -----Original Message-----
> From: Brian Styles [mailto:[EMAIL PROTECTED]
> Sent: Tue 12/9/2003 3:49 AM
> To: [EMAIL PROTECTED]
> Cc:
> Subject: RE: [JBoss-user] Multiple deploy of ear, how to steps
>
>
>
> Hi Rod,
> thanks for the help. You'll have to excuse my complete newbieness here,
>but
> I'm confused by alot of what you're saying so perhaps you could help me
>out
> some more.
>
> >2. Add two additional IPs to your NIC mapped to foo and bar for
> >convenience (say, in /windows/system32/drivers/etc/hosts).
>
> A) First off I kinda thought that you can only have 1 ip address per
>Network
> Interface Card, however looking it up in google I see I was wrong :-)
> However, perhaps I could get a bit of hand holding with this. Say my
>server
> ip address is:
>
> 198.182.196.56 and is currently running my website. Now I want to add
> serveral other websites, virtually hosted, to the box. What ip addresses
>do
> I add to the hosts file, are they all local addresses? For example:
>
> 127.0.0.1 localhost
> 127.0.0.2 www.foo.com
> 127.0.0.3 www.bar.com
>
> would that be correct?
>
> B) Then, you run each configuration of jboss.
>
> > run.bat -c foo --host foo
> > run.bat -c bar --host bar
>
> however, I'm a bit unclear as to how dns will resolve the single
> 198.182.196.56 ip address to all the virtual hosts. is this what the -host
> command does? If so, should I be running
>
> > run.bat -c bar --host www.bar.com
>
> C) Also, all the ports will presumably clash. So is there a way to easily
> avoid this?
>
> D) Are there issues with performance here. For example, say a box is
>running
> 20 sites, that's 20 jboss versions running as opposed to one version with
>20
> ears deployed....
>
> thanks very much for your help,
> Brian
>
>
> >From: "Rod Macpherson" <[EMAIL PROTECTED]>
> >Reply-To: [EMAIL PROTECTED]
> >To: <[EMAIL PROTECTED]>
> >Subject: RE: [JBoss-user] Multiple deploy of ear, how to steps
> >Date: Mon, 8 Dec 2003 16:29:15 -0800
> >
> >How about just making a copy of your configuration and launching it
> >bound to a different host? That way you do not have to change anything
> >provide you are using the no-arg InitialContext.
> >
> >Example:
> >
> >1. Create copies of your configuration folder: /jboss/server/orginal ->
> >/jboss/server/foo and /jboss/server/bar
> >2. Add two additional IPs to your NIC mapped to foo and bar for
> >convenience (say, in /windows/system32/drivers/etc/hosts).
> >3. Launch using shortcut, in this case the hostname and configuration
> >happen to be the same:
> >
> > run.bat -c foo --host foo
> >
> >4. Rinse and repeat.
> >
> > run.bat -c bar --host bar
> >
> >Ditto for Linux more or less. Make sure you DO NOT run the same
> >configuration twice and remove
> >/jboss/server/whaddeva/deploy/snmp-adapter.sar, from every instance.
> >That's about it.
> >
> >
> >
> >
> >-----Original Message-----
> >From: Brian Styles [mailto:[EMAIL PROTECTED]
> >Sent: Monday, December 08, 2003 2:18 AM
> >To: [EMAIL PROTECTED]
> >Subject: [JBoss-user] Multiple deploy of ear, how to steps
> >
> >
> >Hi all,
> >
> >This list has been very helpful to me so I thought I'd write some notes
> >on
> >things I experienced in order to get the same application deployed and
> >virtual hosted multiple times on jboss-3.2.2. This has been a common
> >enough
> >query on the lists and the forums.
> >
> >The application was a standard enough struts---->sesssion beans & MDBs
> >---->
> >cmr-entity beans
> >packaged as an ear file
> >
> >Issues with deployment are:
> >
> >1) If you deploy ejbs in two ears then the jndi names will conflict, so
> >you
> >must change the jndi names for each deployed bean. Xdoclet allows you to
> >do
> >this easily. You don't have to rename the ejbs, just change the jndi
> >mappings
> >
> >2) Unfortunately xdoclet doesn't currently support creating jndi
> >mappings
> >for MDBs so you can't easily change their names. However apparently this
> >was
> >recently realised and a patch has been created.
> >http://www.mail-archive.com/[EMAIL PROTECTED]/msg33920.ht
> >ml
> >(I presume that this means it will be available in the next version of
> >xdoclet?)
> >
> >3) Also, you have to add the queues to jbossmq-destinations-service.xml.
> >
> >4) I'm using mysql, and so for each ear deployed I wanted to connect to
> >a
> >different database. For this you must add a new datasource. I created a
> >different mysql-ds.xml file for each one.
> >
> >5) I was unable to successfully get ears to successfully use their
> >correct
> >database until I added a jboss-app.xml file to META-INF containing the
> >following:
> >
> ><jboss-app>
> >
> ><loader-repository>myapp.com:loader=nameofmyear.ear</loader-repository>
> ></jboss-app>
> >
> >This loads the ear with a different classloader. It fixed my problems
> >(not
> >too sure why).
> >
> >6) I used to keep the struts and commons jar files in
> >myapp.war/WEB-INF/lib.
> >However when multiple versions of the app are running, then I got
> >errors. By
> >removing all the jars from this folder and putting them in
> >server/yourconfig/lib I fixed the problem.
> >
> >7) Then to add virtual hosting, first add the following line to your
> >myapp.war/jboss-web.xml file:
> >
> ><virtual-host>www.whatever.com</virtual-host>
> >
> >8) Then add the corresponding entry to
> >
> >
> >server/yourconfig/deploy/jbossweb-tomcat41.sar/META-INF/jboss-service.xm
> >l
> >
> ><Host name="www.whatever.com">
> > <Valve className="org.apache.catalina.valves.AccessLogValve"
> >prefix="xyz"
> >directory="${jboss.server.home.dir}/log"/>
> ></Host>
> >
> >within the engine tag.
> >
> >If you want to test that the virtual hosting is working, you'll have to
> >edit
> >your dns. For linux guys, that's probably easy. However if you're a
> >newbie
> >and a windows user like me, you can download a dns server and run it
> >locally
> >to test your virtual hosting. The one I used was called posadis from
> >sourceforge and was simple and worked fine.
> >
> >That's about it.
> >
> >A few things to know that would be good are:
> >
> >a) how many virtual hosted apps can easily be run on a single jboss.
> >This
> >probably depends on memory and cpu and load on each etc, but just if
> >anyone
> >has experience such as - "I run 100 virtual hosted apps on jboss" etc.
> >that
> >would be good to know.
> >
> >b) Is it possible to set up a different log file for each deployed
> >application? If so, how.
> >
> >anyway, hope this helps others out there.
> >thanks,
> >Brian
> >
> >_________________________________________________________________
> >Add photos to your messages with MSN 8. Get 2 months FREE*.
> >http://join.msn.com/?page=features/featuredemail
> >
> >
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by: IBM Linux Tutorials.
> >Become an expert in LINUX or just sharpen your skills. Sign up for
> >IBM's Free Linux Tutorials. Learn everything from the bash shell to sys
> >admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> >_______________________________________________
> >JBoss-user mailing list
> >[EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by: IBM Linux Tutorials.
> >Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
> >Free Linux Tutorials. Learn everything from the bash shell to sys admin.
> >Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
> >_______________________________________________
> >JBoss-user mailing list
> >[EMAIL PROTECTED]
> >https://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
> Free Linux Tutorials. Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
><< winmail.dat >>


        _________________________________________________________________
        Add photos to your e-mail with MSN 8. Get 2 months FREE*.
        http://join.msn.com/?page=features/featuredemail



        -------------------------------------------------------
        This SF.net email is sponsored by: IBM Linux Tutorials.
        Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
        Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
        Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
        _______________________________________________
        JBoss-user mailing list
        [EMAIL PROTECTED]
        https://lists.sourceforge.net/lists/listinfo/jboss-user


<< winmail.dat >>

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to