Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / June 2006

Tip: Looking for answers? Try searching our database.

webservices

Thread view: 
jasonsig - 24 May 2006 17:22 GMT
My webservices consists of apache axis and a bean (non ejb) that
advertises one method as
a webservice.

Is a new class created for every thread that access the webservice? If
so this would mean
that class variables would be thread safe?
Or does it behave more like a servlet where multiple threads share a
single instance of the servlet and the methods and local variables
within the methods are assigned per thread memory alocation ?

How would I access application based varaibles within my webservice
class? For example I need a enviroment variable that is checked by the
webservice class. Currently I use the jndi and pull it from the
context.xml file. This requires every instance of the class to get this
information.
For example using the PageContext or ConfigContext within my bean to
retrieve startup variables from the container and then store them.

thx jason
Stefan Theusner - 26 May 2006 21:38 GMT
> My webservices consists of apache axis and a bean (non ejb) that
> advertises one method as
> a webservice.

Using j2ee webservices means only ejb's (stateless session and message
driven bean) and servlet's (servlets and jaxm servlets) can be
webservices endpoints.

> Is a new class created for every thread that access the webservice? If
> so this would mean
> that class variables would be thread safe?

in case of servlet synchronize your service method

> For example using the PageContext or ConfigContext within my bean to
> retrieve startup variables from the container and then store them.

in case of servlet use this, for ejb's use static variables but be
carefull with this because all instance access the same values

hope it helps

regards,
stefan
jasonsig - 29 May 2006 16:00 GMT
Using j2ee webservices means only ejb's (stateless session and message
driven bean) and servlet's (servlets and jaxm servlets) can be
webservices endpoints.

I am confused with your statement I found many examples of using
regular class methods as webservice end points.

Below is what endpoint possiblilites i found, my case it would be the
second one.
A method of a stateless session EJB
A method of a Java class
A JMS method consumer
Stefan Theusner - 02 Jun 2006 23:00 GMT
 > Below is what endpoint possiblilites i found, my case it would be the
> second one.
> A method of a stateless session EJB
> A method of a Java class
> A JMS method consumer

Thats right. I ownly written the possibilities for j2ee.

With normal java classes and jms i haven't work so far.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.