• 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

creation of different context in weblogic

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I want to creat different context in weblogic. Where in i use different database connection for each context's. Which in turn help me to use different database for ejb's stored in different context. (i.e., like myserver given has default context, which uses weblogic.properties to achive the above said perpose). How to go about it.
Thanx in advance.
-arun
 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Arun,
I want to creat different context in weblogic.
As far as my knowledge goes you can have one (default) context per server , per JVM instance. I don't think you can create two (default) contexts on a server. (Does anybody differ with me, i still need to do research on this point)
Where in i use different database connection for each context's. Which in turn help me to use different database for ejb's stored in different context. (i.e., like myserver given has default context, which uses weblogic.properties to achive the above said perpose). How to go about it.
When you deploy ejb's using different jar files then they, by default, have different contexts paths. So they are different and so i don't see any reason why you are thinking to have two different contexts.
Then coming to your database connections, you can have different database pools configured pointing to different databases in your jndi configuration and all you have to do is use those resources in your ejb's.
Does this answer your question. Please let me know if you have any questions.
thanks,
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this question is specific to WebLogic, I am moving this to that forum.
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ram,
Thanx for the replay.
I am working on iplanet webserver aswell where in i can have n context running on different port. Where in i can simulate env of more then one server running in a single iplanet instance.
Coming back to weblogic. The reason i need to have different context is that I want use weblogic setup to server to different site.
Where in the ejb's of each site refer db pool of perticular db. If create oracle pool using weblogic.properties file the database refered
will be one for both site. Hope this information help me get more near to problem.
-arun
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Arun Boraiah:

The reason i need to have different context is that I want use weblogic setup to server to different site.


I think that Virtual Hosting may help you to solve the problem. Take a look at:
http://edocs.bea.com/wls/docs61/adminguide/web_server.html#103248
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanx Marcos i will look at it.
-arun
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ram
I disagree when you state
Quote
As far as my knowledge goes you can have one (default) context per server , per JVM instance. I don't think you can create two (default) contexts on a server. (Does anybody differ with me, i still need to do research on this point)
UnQuote
I think as far as EJB's are concerned there is one context associated with one application. Thus wherein a server has 10 applications deployed then one can have 10 contexts existing. This is even the case of Servlets and JSP's.
In the case of Ejb's one context cannot have access to the other context.
Howver I think that one Servlet Context can have access to another Servlet Context through the following
ServletContext getServletContext()
reply
    Bookmark Topic Watch Topic
  • New Topic