bhaktimehta's Blog
Session stickiness with Apache,mod_proxy and Glassfish
Loadbalancers can set thier cookies indicating which backend server can serve a user's requests and direct future requests to the same server.
I was experimenting with session stickiness using apache, mod_proxy and Glassfish and here is a short summary of the steps I executed.
Apache 2 is installed on Mac OSX in /etc/apache2
mod_proxy,mod_proxy_http, mod_proxy_ajp and mod_proxy_balancer comes as part of
standard Apache 2.2+ distribution
This link shows the layout of Apache HTTPD on different operating systems
For the Mac OSX you can see the file layout as shown here
ServerRoot :: /usr
Primary Config Fle :: /etc/apache2/httpd.conf
DocumentRoot :: /Library/WebServer/Documents
ErrorLog :: /var/log/apache2/error_log
AccessLog :: /var/log/apache2/access_log
cgi-bin :: /Library/WebServer/CGI-Executables (empty by default)
binary :: /usr/sbin/httpd
start/stop :: /usr/sbin/apachectl (start|stop|restart|fullstatus|status|graceful|graceful-stop|configtest|help)
These are the following steps I followed to configure sticky sessions.
edit the /etc/apache2/httpd.conf to add these following lines
<Proxy balancer://hacluster>
BalancerMember http://localhost:28080 route=i1
BalancerMember http://localhost:28081 route=i2
BalancerMember http://localhost:28083 route=i3
</Proxy>
ProxyPreserveHost On
ProxyPass /clusterjsp balancer://hacluster/clusterjsp stickysession=JSESSIONID
<Location /balancer-manager>
SetHandler balancer-manager
Order Deny,Allow
Allow from all
</Location>Here I have added 3 BalancerMembers which are 3 glassfish instances I have created.
I have also enabled the balancer-manager support using the above lines with Location /balancer-manager
I am working with the glassfish 4.0 installation from the trunk but this should work with any Glassfish 3.x release. This is a very simple setup with 3 instances.
cd $GF_HOME/bin
asadmin start-domain
asadmin create-cluster c1
Create 3 instances
asadmin create-local-instance --cluster c1 i1
asadmin create-local-instance --cluster c1 i2
asadmin create-local-instance --cluster c1 i3
asadmin start-cluster c1
asadmin deploy --target c1 clusterjsp.ear The javaee samples can be downloaded from http://glassfish-samples.java.net/,
I have attached the ear in the zip file below
asadmin create-system-properties --target i1 INSTANCE=i1
asadmin create-system-properties --target i2 INSTANCE=i2
asadmin create-system-properties --target i3 INSTANCE=i3
asadmin create-jvm-options --target c1 -DjvmRoute=\${INSTANCE}
Note the values for the system properties INSTANCE i1 and i2 and i3 are the same as what is mentioned in the route element of the httpd.conf aboveNow start apache2
sudo su
/etc/apache2/apachectl start
On the browser send a get request to http://localhost/clusterjsp/HaJsp.jsp
You can see the http headers using Chrome->View->Developer Tools ->Network tab

You will see the Set-Cookie header in the response has the JSESSION_ID appended which points to i2
You can Reload the page and see future requests are directed to the instance i2

You can also experiment with failover by stopping one of the instances in which case the request gets directed to a new server and session affinity starts with that server.
You can also access load balancer manager by using a Web browser to access the page http://localhost/balancer-manager
| Attachment | Size |
|---|---|
| cluster-jsp.zip | 4.13 KB |
| Screen_Shot_2012-04-25_at_10.46.58_AM.png | 114.07 KB |
| Screen_Shot_2012-04-25_at_10.47.46_AM.png | 137.5 KB |
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 1217 reads
Server Sent Events Sample with Glassfish
Introduction
Server-Sent Events (SSE) is a standard describing how servers can initiate data transmission towards clients once an initial client connection has been established.
It is commonly used to send message updates or continuous data streams to a browser client and designed to enhance native, cross-browser streaming through a JavaScript API called EventSource, through which a client requests a particular URL in order to receive an event stream.
Sample
The sample demonstrates a simple example of SSE. Here we have a servlet which periodically polls for Twitter information and pushes the data to the clients using Server Sent Events. This samples showcases a JavaEE6 application that uses CDI,ServerSentEventHandler and ServerSentEventHandlerContext apis along with twitter search apis and javascript client code.
Code Snippets
Here is the code for the ServletContextInitializer. There is a Timer which gets the feeds periodically
public class SSEServletContextListener implements ServletContextListener {
@Inject
TwitterFeedBean tfs;
private final int time = 60;
@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
ServletContext servletContext = servletContextEvent.getServletContext();
try{
// create the timer and timer task objects
Timer timer = new Timer();
TwitterTimerTask task = new TwitterTimerTask(tfs);
timer.schedule(task, 0, 1000 * time);
// save our timer for later use
servletContext.setAttribute ("timer", timer);
} catch (Exception e) {
servletContext.log ("Problem initializing timer task every "+ time +" seconds: "
+ e.getMessage ());
}
}
@Override
public void contextDestroyed(ServletContextEvent servletContextEvent) {
ServletContext servletContext = servletContextEvent.getServletContext();
Timer timer = (Timer)servletContext.getAttribute ("timer");
if (timer != null)
timer.cancel();
servletContext.removeAttribute ("timer");
}
class TwitterTimerTask extends TimerTask {
TwitterFeedBean bean;
TwitterTimerTask(TwitterFeedBean t) {
this.bean = t;
}
public void run() {
try {
bean.getFeeds();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
Here is the TwitterHandler which is a ServerSentEventHandler
/**
* TwitterHandler class which will send messages using Server Sent Events
*
* @author Bhakti Mehta
*/
@ServerSentEvent("/twittersse")
public class TwitterHandler extends ServerSentEventHandler {
@Override
public void onConnected(ServerSentEventConnection client) {
super.onConnected(client);
}
public void sendMessage(String data) {
System.out.println("Handler="+this+" Sending data="+data);
try {
connection.sendMessage(data);
} catch(IOException ioe) {
// May be client is already disconnected. Just close it
try {
connection.close();
} catch(Exception e) {
//ignore if the connection close threw an exception
}
}
}Here is the TwitterFeedBean which gets the data from the Twitter search url
@Named
@ApplicationScoped
public class TwitterFeedBean {
@Inject @ServerSentEventContext("/twittersse")
ServerSentEventHandlerContext<TwitterHandler> sc;
final private String SEARCH_URL =
"http://search.twitter.com/search.json?q=glassfish&rpp=5&include_entities=true" +
"&with_twitter_user_id=true&result_type=mixed";
public TwitterFeedBean() {
}
public void getFeeds() throws IOException {
for(TwitterHandler handler : sc.getHandlers()) {
handler.sendMessage(composeMessage());
}
}
private String composeMessage() {
return getFeedData();
}
private String getFeedData() {
StringBuilder sb = new StringBuilder();
try {
URL twitter = new URL(SEARCH_URL);
URLConnection yc = null;
yc = twitter.openConnection();
BufferedReader in = new BufferedReader(
new InputStreamReader(
yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
System.out.println("Input line" + inputLine);
sb.append(inputLine) ;
}
in.close();
return sb.toString();
} catch (IOException e) {
e.printStackTrace();
}
return new String("Error in getting data from the feeds ") ;
}
}
Finally here is the app.js which will create the EventSource. It also parses the JSON feeds
var network = function (eventSource) {
return {
initialize: function() {
var url = 'http://' + document.location.host
+ '/sse-twitter-sample/twittersse';
eventSource = new EventSource(url);
eventSource.onmessage = function (event) {
var feeds = event.data.toString();
console.log(feeds);
var theNewParagraph = document.createElement('p');
var theBreak = document.createElement('br');
theNewParagraph.setAttribute('title','The feeds');
var data = JSON.parse(feeds);
var theText;
var divTag ;
var tweetInfo ;
// Before we continue we check that we got data
if(data !== undefined) {
for (var k = 0;k<5;k++) {
tweetInfo = data.results[k];
divTag = document.createElement("div");
divTag.id = "div"+k;
divTag.setAttribute("align","left");
divTag.style.margin = "0px auto";
divTag.className ="outerDiv";
divTag.innerHTML =
'<a href="https://twitter.com/#!/search/%23glassfish'+'">'+ tweetInfo.text+'<\/a>'+
' Created on ' + tweetInfo.created_at ;
document.body.appendChild(divTag);
document.body.appendChild(theBreak);
}
}
document.body.appendChild(theNewParagraph);
};
},
send: function(commandn) {
eventSource.send(command);
}
}
};
var APP = {
network: network(null),
initialize: function () {
APP.network.initialize();
}
};
window.onload = APP.initialize;To run the sample deploy the sse-twitter-sample.war to the latest nightly of glassfish 4.0 and you can run http://localhost:8080/sse-twitter-sample/ You may have to wait for a minute before the feeds start appearing. Also since this is a sample to stop the timer you should undeploy the application otherwise it will keep getting the tweets..
Jitu has another sample here
Note this is a work in progress so apis may change.
| Attachment | Size |
|---|---|
| sse-twitter-sample.zip | 18.65 KB |
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 1572 reads
Glassfish 3.1.2 and Netbeans 7.1.1 are here!
We are pleased to announce the release of Glassfish 3.1.2 .
These are the highlights of some of the main features in Glassfish 3.1.2
Main Features
- Improved Administration Console with better startup time and option to load in background after server startup. [blog]
- Improved clustering with new DCOM Support for Windows (as an alternative to SSH for remote management of GlassFish instances) and Non-Multicast clustering.
- Improved EclipseLink integration with EclipseLink MOXy support and TopLink Grid support (Coherence as 2nd level data cache)
- WebSocket (RFC 6455) Support
- Transaction recovery using database (in addition to the existing file system support)
- Improved Security (secure admin requires password, Oracle GlassFish Server secure by default with new password required be set during installation or on first use), and
SSL Encrypted traffic between the Domain Administration Server and remote instances - NetBeans 7.1.1 ships with GlassFish Server 3.1.2
As you can see the newly released Netbeans 7.1.1 ships with Glassfish 3.1.2.
We have added 3 new samples which will work out of the box using Netbeans 7.1.1 and Glassfish 3.1.2.
This blog talks about the new samples.
To download Netbeans 7.1.1 go to http://netbeans.org/downloads/index.html Choose the Javaee supported technology
Once Netbeans is installed you can try the samples by clicking File->New Project->Samples->JavaEE

You will see 3 new samples which are introduced in Netbeans 7.1.1
1.Embedded Glassfish
This is a simple maven sample which shows the Embedded API in Glassfish 3.1.2 and demonstrates
1. Start/stop GlassFish Server
2. Deploy & Undeploy an application
3. Scattered Archive
4. Running asadmin commands from CommandRunner
You can right select the sample as shown above right click and Click Build. It will download the maven dependency glassfish-embedded-all jar.
Under the Source Packages you can see the embedded.telephonedirectory.client and embedded.telephonedirectory.server packages
The embedded.telephonedirectory.server has few JPA entities defined and a PersistenceManager CDI bean.
The embedded.telephonedirectory.client has all the code which shows how to use the embedded apis in Glassfish. You can see we define an http-listener,
then the JDBC pool and resource required for the application is created, the application is deployed using org.glassfish.embeddable.Deployer API.
To access the application launch the URL in the bowser http://localhost:9590/td
Once the user finishes accessing the application type quit in the Tasks panel, the application is undeployed and embedded glassfish is stopped.
2.EjbContainer sample in Glassfish
This sample demonstrates the use of Maven to test EJB's using the standard EjbContainer support in Glassfish 3.1.2.
Open the project in Netbeans and right click and click Build.
Under the Source Packages tab you will see the org.glassfish.embedded.tempconverter package and see a StatelessSession bean called TemperatureConverter
which does basic conversion from Farenheit to Celcius and vice versa.
Under the Test Packages tab you will see the TemperatureConverterTest.java which is a simple junit test which
1. Creates the EjbContainer
2. Gets the Context object and does a lookup for the TemperatureConverterBean
3. Invokes the methods on the TemperatureConverterBean
3.Application scoped resources sample in Glassfish
This is a simple sample which shows Application scoped resources in Glassfish. You can right click and click on Run to run this project.
When you open the project you will see ApplicationScopedResources-app-client and ApplicationScopedResources-ejb modules.
The ApplicationScopedResources-ejb module defines a StatelessSessionBean HelloBean which takes in a DataSource
and does a lookup and returns the name of the datasource or the default if it does not find any matching datasource.
The main file of interest is the glassfish-resources.xml which you can see under the Files tab which is next to the Projects tab.
You can see it the jdbc-resource java:app/app-scoped-resource in java:app : namespace which is shared by all components, modules in an application
(eg: application-client, web component, ejb component in an application, .ear). The application client looks for the "java:app/app-scoped-resource and prints
it since the application client is part of the ear it can access it.
Please try these samples in Netbeans 7. 1.1.and give us your feedback. Also go ahead download and try Glassfish 3.1.2 and we look forward to hear from you!
References
- Download http://glassfish.java.net/downloads/3.1.2-final.html
- Blogs: https://blogs.oracle.com/theaquarium/entry/glassfish_3_1_2_final
| Attachment | Size |
|---|---|
| Screen_Shot_2012-03-02_at_11.11.46_AM.png | 86.69 KB |
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 3211 reads
Quick tip Felix shell and Glassfish
Here is a pointer to a blog which shows how to use the felix shell with Glassfish 3.2 to inspect dependencies.
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 1304 reads
Classloader.getResources() and IBM JDK
This blog shows some interesting differences between classloader implementation of IBM JDK vs Sun/Oracle JDK
https://blogs.oracle.com/bhaktimehta/entry/ibm_jdk_and_classloader_getre...
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 641 reads
mod_jk and EJB Webservices and Glassfish 3.1
One of the nice bug fixes we added in v3.1 was support for mod_jk with ejb webservices issue 12458.
Amy has a very nice blog on setting up mod_jk here
Download Glassfish v3.1 from here and try it out and give us feedback at users@glassfish.dev.java.net
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 516 reads
change-master-password command in glassfish 3.1
We are proud to announce the release of glassfish 3.1. https://blogs.oracle.com/bhaktimehta/entry/change_master_password_comman... is an entry on the command change-master-password in 3.1.
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 625 reads
Update to deploying webservices on Glassfish 3.1 cluster
This blog is a minor update to the previous entry of www.java.net/blog/bhaktimehta/archive/2010/07/23/deploying-webservices-glassfish-31-cluster
Glassfish 3.1 is in active development and there are some changes since the last time I posted this blog.
Most of the steps remain same and I am using the same setup on 2 machines.
Steps
1. Install Glassfish 3.1 b23 from http://dlc.sun.com.edgesuite.net/glassfish/3.1/promoted/latest-glassfish.zip
2. DAS is my mac and other instance is on adc2180404
3. asadmin start-domain
Waiting for the server to start ..........
Successfully started the domain : domain1
domain Location: /Users/bhakti/b23/glassfishv3/glassfish/domains/domain1
Log File: /Users/bhakti/b23/glassfishv3/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Debugging is enabled. The debugging port is: 9009
Command start-domain executed successfully.
4.asadmin create-cluster mycluster
Command create-cluster executed successfully.
5.asadmin create-node-config --nodehost adc2180404.us.oracle.com adcconf
Command create-node-config executed successfully.
6.Additional step (You need to specify the installdir param )
asadmin update-node-config --installdir
/scratch/bhamehta/b23/glassfishv3/glassfish adcconf
Command update-node-config executed successfully.
7.asadmin create-instance --cluster mycluster --node adcconf mycluster_i1
The instance mycluster_i1 was registered with the DAS. You must run the following comand on the instance host to complete the instance creation:
asadmin --host bhakti-mehtas-macbook-pro.local --port 4848 create-local-instance --node adcconf mycluster_i1
Command create-instance executed successfully.
(On adc2180404)
8.asadmin --host dhcp-santaclara22-1fl-west-10-132-178-100.usdhcp.oraclecorp.com --port 4848 create-local-instance --node adcconf mycluster_i1
Rendezvoused with DAS on dhcp-santaclara22-1fl-west-10-132-178-100.usdhcp.oraclecorp.com:4848.
Command create-local-instance executed successfully.
9.asadmin start-local-instance mycluster_i1
Waiting for the server to start ............
Successfully started the instance: mycluster_i1
instance Location: /scratch/bhamehta/b23/glassfishv3/glassfish/nodes/adcconf/mycluster_i1
Log File: /scratch/bhamehta/b23/glassfishv3/glassfish/nodes/adcconf/mycluster_i1/logs/server.log
Admin Port: 24849
Command start-local-instance executed successfully.
On Das
./asadmin deploy --target mycluster /Users/bhakti/ejbwsinwar/dist/ejbwsinwar.war
I tried deploying the war which we developed as part of this blog
http://weblogs.java.net/blog/bhaktimehta/archive/2010/06/24/ejb-webservi... and could access the wsdl from the instance.
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 1178 reads
Deploying webservices on Glassfish 3.1 cluster
Byron Nevins has posted a very nice blog on offline configuration for Glassfish v3.1 here.
The following blog will show how to deploy a webservices application to a Glassfish 3.1 cluster . You can do additional tasks using the Glassfish Administration Console.
For this blog I tried with the latest promoted b13 of Glassfish 3.1 available here.
Steps
1.Install Glassfish b13 on both machines (jwsdp and adc2180404)
2.DAS is on adc2180404 other instance is on jwsdp
3.asadmin start-domain
Waiting for the server to start .....
Successfully started the domain : domain1
domain location: /scratch/bhamehta/gf-install/glassfishv3/glassfish/domains/domain1
Log File: /scratch/bhamehta/gf-install/glassfishv3/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command start-domain executed successfully.
4.asadmin create-cluster mycluster
Command create-cluster executed successfully.
5. asadmin create-node-config --nodehost jwsdp jwsdpconf
Command create-node-config executed successfully.
6.asadmin create-instance --cluster mycluster --node jwsdpconf mycluster_i1
Successfully created instance mycluster_i1 in the DAS configuration, but failed to create the instance files. Please run:
asadmin --host adc2180404.us.oracle.com --port 4848 create-local-instance --node jwsdpconf mycluster_i1
on jwsdp to complete the transaction.
Command create-instance failed.
7(On jwsdp)asadmin --host adc2180404.us.oracle.com --port 4848 create-local-instance --node jwsdpconf mycluster_i1
Attempting to rendezvous with DAS on host adc2180404.us.oracle.com port 4848
Uptime: 1 minutes, 58 seconds
The instance has rendezvoused with the DAS and will be using host adc2180404.us.oracle.com port 4848 for future communication.
servers.server.mycluster_i1.config-ref=mycluster-config
servers.server.mycluster_i1.lb-weight=100
servers.server.mycluster_i1.name=mycluster_i1
servers.server.mycluster_i1.node=jwsdpconf
servers.server.mycluster_i1.property.rendezvousOccurred=true
Command create-local-instance executed successfully.
8(On jwsdp)./asadmin start-local-instance mycluster_i1
Waiting for the server to start ............
Successfully started the instance: mycluster_i1
instancelocation: /Users/bhakti/gf-install/glassfishv3/glassfish/nodeagents/jwsdpconf/mycluster_i1
Log File: /Users/bhakti/gf-install/glassfishv3/glassfish/nodeagents/jwsdpconf/mycluster_i1/logs/server.log
Admin Port: 24848
Command start-local-instance executed successfully.
Now deploy a webservice I tried deploying the war which we developed as part of this blog http://weblogs.java.net/blog/bhaktimehta/archive/2010/06/24/ejb-webservi... and could access the wsdl from the instance.
9.(on adc180404 DAS) asadmin deploy --target mycluster /scratch/bhamehta/ejbwsinwar.war
The application should be deployed on the instance. You can test it using the tester. In my case the machine on which the instance was running was jwsdp
I tried deploying the war which we developed as part of this blog http://weblogs.java.net/blog/bhaktimehta/archive/2010/06/24/ejb-webservi... and could access the wsdl from the instance.
http://jwsdp:28080/WeatherService/Weather?wsdl
To deploy on the das you will need to create an application ref like this
10./asadmin create-application-ref ejbwsinwar
Now you can access the wsdl on the DAS too http://localhost:8080/WeatherService/Weather?wsdl
You can also launch the Glassfish Admin Console on the DAS (Note admin console will not be available on the instances)
in my case we launch the Glassfish Administration console on this location http://adc2180404:4848/
The following image shows a snapshot of the Glassfish Administration Console
Under the applications tab you can see the ejbwsinwar .

You can also click on Common Tasks and List the deployed applications, deploy applications, manage the targets etc.
| Attachment | Size |
|---|---|
| adminconsole.png | 158.39 KB |
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 3329 reads
JavaEE 6: EJB Webservices in war
This is a new series of blogs which will cover what is new in JavaEE 6 with respect to WebServices
One of the new features of JavaEE 6 is ability to package ejb in a war. The EJB specification has always required that enterprise beans
be packaged in an enterprise module called an ejb-jar file.
Since it is common for Java EE web applications to use enterprise beans, this packaging requirement can be burdensome.
EJB 3.1 addresses this packaging complexity by removing the restriction that enterprise bean classes must be packaged in an ejb-jar file.
You can now place EJB classes directly in the .war file, using the same packaging guidelines that apply to web application classes.
This means that you can place EJB classes under the WEB-INF/classes directory or in a .jar file within the WEB-INF/lib directory.
The EJB deployment descriptor is also optional. If you need it, you can package the EJB deployment descriptor as a WEB-INF/ejb-jar.xml file.
So we extend the above idea to demonstrate ejb webservices in a war file.
The following blog shows how simple it is to create and deploy ejb webservices in war using Netbeans 6.9 (http://netbeans.org) and Glassfish 3.0.1 (https://glassfish.dev.java.net/downloads/3.0.1-final.html)
Lets begin by creating a Web Application using Netbeans 6.9

Next we specify the project location

Select Glassfish 3.0.1 which is bundled with Netbeans 6.9 as the server. Note I use JavaEE 6 as the version .

Now we create a WebService say a Weather service which will show the temperature for a zip code. We implement the WebService as a Stateless Session Bean

Click Finish
Here is the code to the WebService . Note I have added a WebMethod. I have also specified an Interceptors annotation. EJB 3.0 interceptors provide developer
with fine grained control over method invocation flow. In this example we print the method from which the Interceptor was called.

Here is the code of SimpleInterceptor.java. This prints the name of the the method obtained from the InvocationContext.

Next we Clean and Build the project
Then click on Deploy.
You can browse the wsdl from here
http://localhost:8080/WeatherService/Weather?wsdl
Note (Ejb WebServices in war is merely a packaging convenience. The URL at which the endpoint is deployed is the same as if an ejb was deployed in a ejb-jar file. There was a bug in
Glassfish v3 where ejb webservices in war were being treated as webapps. This has been addressed in GF 3.0.1 and the GF 3.1)

So you see with Netbeans it is very easy to build, deploy ejb webservices in war. You can also test the webservice by
using the tester app at http://localhost:8080/WeatherService/Weather?tester and enter a zip code (Ofcourse you will get the hardcoded 70 degress)
- Login or register to post comments
- Printer-friendly version
- bhaktimehta's blog
- 4680 reads




Comments
<p>I have an ejb web service in a war. The web service ...
by flafora - 2011-05-09 01:52
I have an ejb web service in a war. The web service class has a @RolesAllowed annotation. As the web service is not treated as a webapp any more, how can I execute the service from a Java Client?. If I execute the following method in the client:
private static void setCredentials( UserManager eif ) {
Map<String, Object> context = ((BindingProvider) eif).getRequestContext();
context.put( BindingProvider.USERNAME_PROPERTY, "tracy");
context.put( BindingProvider.PASSWORD_PROPERTY, "tracy");
}
There is no role associated to the call, and the web service container refuses to execute the web service.
Regards,
GF 3.1 has problem with Stateless SessionBeans as WebService
by puspendu_banerjee - 2010-09-12 09:01
Hi, I had a requirement to use WELD >=1.1.0Beta1 to avoid a WELD bug related to overridden methods with covariant return types. So I had upgraded to GlassFish 3.1-b19 and found that SLSBs annotated with @WebService in war package are causing an exception in org.glassfish.ejb.startup.EjbDeployer load method. After A long analysis I found the issue and removed all javax.jws.* annotations from those SLSBs to get rid of the problem. Any Idea? What could be the reason? Is this just another bug with GlassFish or Somehow the profile that GF is using doesn't contain support for Web-service Regards, Puspendu BanerjeeGF 3.1 has a problem with Stateless SessionBeans as Webservice
by bhaktimehta - 2010-09-13 10:30
This seems to be a bug caused by some recent changes. WIll look into this and post an update soon
bhaktimehta wrote: This seems
by sellerjd - 2011-03-01 10:39
Any update on this? I'm using GlassFish Server Open Source Edition 3.1-b34 (build 34) and am deploying a WS inside a WAR. It's working just fine, however when I view the application inside the GF Admin Console, it doesn't recognize my WS as a WS, its listed as a StatelessSessionBean and there is no "View Endpoint" link.
I can view the wsdl by manually entering the url and clients are able to connect to the WS, so it seems to be an issue with the GF Admin Console.
Thanks,
-sellerjd