• 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

Deploying EJB on Internet

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


I am new to EJB, and i am stuck somewhere.
i have developed a web application which uses EJB, it works perfectly on netbeans.

What i wan to know is, what do i have to do if i want to deploy this application on internet,
do i have to install EJB on my Host. or Do i have to install database on host. i dont know what to do.

Please help me.

regards
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using entity beans, then yes - you'd need a database. Message-driven beans, on the other hand, may not need a DB (but they'd need a JMS server).

You also need a server that can host EJBs; either a full-blown JEE server like GlassFish, or -if you don't need other JEE features besides EJBs- OpenEJB installed in a servlet container like Tomcat will suffice.
 
Ranch Hand
Posts: 198
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it is working perfectly on netbeans, You no need to do anything.

You need to use IP address to your application server runtime. by default it is localhost. Look at the server configurations for this.

If your system running the application server is in the network, your ejb will be accessable from anywhere from a client in the network using the ip address and port number and ejb jndi name.

 
syed khadeer ahmed
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi thanks for the reply.

but still i am not clear on how to deploy it on internet,

i developed a website which uses some jsp and html pages, and deployed on my host so it is accessible on www.
but when we use ejb (i am using entity and session bean here) so definitely i need a database, where would i place my database.
because with ms access we get a database file, but using ejb we dont get a db file. here i am using oracle 10g database . so when i deploy this on internet how will ejb connect to database


please tell me in details how do i make this work.

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

syed khadeer ahmed wrote:Hi thanks for the reply.

but still i am not clear on how to deploy it on internet,

i developed a website which uses some jsp and html pages, and deployed on my host so it is accessible on www.
but when we use ejb (i am using entity and session bean here) so definitely i need a database, where would i place my database.
because with ms access we get a database file, but using ejb we dont get a db file. here i am using oracle 10g database . so when i deploy this on internet how will ejb connect to database


please tell me in details how do i make this work.

thanks



hi syed,

you don't need anything if your oracle server is in the same host as your website.

some time you need to put the oracle server in a different host (# website host) at this time you must edit your persistence.xml file .



 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

you don't need anything if your oracle server is in the same host as your website. some time you need to put the oracle server in a different host (# website host) at this time you must edit your persistence.xml file.


The persistence.xml file contains the DB server name or IP address no matter whether it's local or on a different machine, so that's not a distinguishing criterion.
 
syed khadeer ahmed
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi thanks for reply guys.

I am sorry but i am still confused,
what i dont understand is, when we use netbeans or any other editor, usually my database is on localhost,
suppose oracle 10g is localhost/apex/sql

with this the ejb can communicate with database when it is on virtual server like glassfish(on netbeans).

but what happens when we actually put this web application(web site) on internet.

how does the ejb(module which is on internet now) communicate with database when database is on localhost? or do i have to install oracle on host aswel

thanks
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

how does the ejb(module which is on internet now) communicate with database when database is on localhost? or do i have to install oracle on host aswel


Yes, as I said in my first post, you need a DB server as well as an app server.
 
Prabhakar Reddy Bokka
Ranch Hand
Posts: 198
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all your machine should be accessable on the internet. That will be possible having an ip address to your system which can be accessagle over internet.

Now the appliction server or DB will be accessable with that IP address instead of localhost.

Everything else is same as your local.
 
reply
    Bookmark Topic Watch Topic
  • New Topic