How Do I Disable Metro On Glassfish? - glassfish

is there anyway that I could tell glassfish 3 to disable metro?
i'm currently using CXF as my library. CXF is working but it is also publishing its own web services.
Is there anyway that I could tell glassfish not to publish these additional web services?
These are the benans that were annotated by #WebService
I tried declaring a sun-web.xml that contains this but it's still not working
Glassfish 3 i automatically publishing it and it's creating two instances of the web service instead of one.
thanks a lot

CXF Interceptors will not work in Glassfish without this sun-web.xml file to configure the classloader. By default, Glassfish will use Metro for JAX-WS services so the classloader needs to be configured to allow CXF libraries to provide JAX-WS services. The following sun-web.xml xml source was added to /WEB-INF to resolve this issue:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD
Application Server 9.0 Servlet 2.5//EN'
'http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd'>
<sun-web-app>
<class-loader delegate="false"/>
</sun-web-app>
The explaination from CXF website :
http://cxf.apache.org/docs/application-server-specific-configuration-guide.html#ApplicationServerSpecificConfigurationGuide-Glassfish

To disable Metro monitoring, go to admin console, Configurations -> server-config, and add the following JVM option:
-Dcom.sun.xml.ws.monitoring.endpoint=false
Restart the server to apply this setting.

Related

How to deploy j2ee application on apache http server?

I want to deploy my j2ee application on apache http server. can anyone provide me a reference on how to set up and deploy j2ee application war in Apache http server?
is it possible to deploy war file to AHS?
Thanks,
Ezhil
No, Apache doesn't have a Web Container.

Configure Apache CXF in Geronimo

I have installed Apache Geronimo 3.0.1 with Tomcat 7 and Axis2 Application server to deploy my application. I made my application work in Geronimo. I want to know what are the components can be configure to Apache geronimo especially Apache CXF, Through this link I come to know about component of Geronimo.
Now I want to configure Apache CXF in Geronimo. The link Configure JAX-WS engine says how to configure Apache CXF in Geronimo. Since I installed Apache Geronimo 3.0.1 with Tomcat 7 and Axis2, Apache Axis2 is bundled with Apache Geronimo as per given link. So, I can't configure cxf in geronimo as per the procedure in Configure JAX-WS engine guide like
1.Remove the condition attribute and add the load="false" attribute to org.apache.geronimo.configs/axis2-deployer/2.0/car module.
2.Remove the condition attribute and add the load="true" attribute to org.apache.geronimo.configs/cxf-deployer/2.0/car module.
I did set the environment variable as well as
GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=axis2"
but no use.
Can any one tell me how can I Configure Apache CXF in Geronimo and how to use this service in my application?
Note: I want to use RESTfull Http and Local Transport service from Apache cxf that's why I wanted to use Apache cxf instead of Apache axis
Go to \var\config directory. Open config.xml file.
check "org.apache.geronimo.configs/cxf/3.0.1/car", "org.apache.geronimo.configs/cxf-deployer/3.0.1/car"
Set load="true" if it exist. Otherwise, Download and install it.
Set GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.provider=cxf"

WSO2 admin console restriction to localhost

I have a question about restricting the Admin Console access in version 4.0.3. I would like the admin console to be accessed only from the server in which WSO2 ESB is installed and not from the machines outside.
In tomcat I can do that using the address attribute of the Connector element in the server.xml
like this:
Connector port="8080" address="127.0.0.1"
The issue is I am not finding the server.xml within the 4.0.3 directory strcutre.
I found the file catalina-server.xml under wso2esb-4.5.0/repository/conf/tomcat in the latest version. I am not finding a similar file within 4.0.3 however.
Earlier it used mgt-transports.xml file for transport configurations in ESB_HOME/repository/conf. After the improvements for tomcat layer by adding it as a proper OSGi bundle in the new release tomcat configurations are offered directly to the user to adjust

issues on download Apache Tomcat

I am trying to install Apache Tomcat, but I find to different files:
one is CORE while another is Deployer
which one should I choose?
Download CORE. From the documentation:
the Client Deployer, which is a command shell based script that interacts with the Tomcat Manager but provides additional functionality such as compiling and validating web applications as well as packaging web application into web application resource (WAR) files
The deployer is just a tool. It does not include the Tomcat server.

OSGi bind object to JNDI in Glassfish

New to OSGi and Glassfish. I have an OSGi bundle written that creates a non-serializable manager object that I would like to expose via JNDI so that my web applications can utilize it. (Previously with JBoss I utilized org.jboss.naming.NonSerializableFactory to do this, but I can't seem to find any analogous approach with Glassfish.)
Assuming this can't be done with GF, is there some other way to access this object that is bound in the BundleContext from within my web application?
You can deploy your web application as a bundle and there by access the "non-serializable manager object" as an OSGi service. You can either change the web app to make a bundle or you can convert it into a bundle on the fly using the following commands:
start glassfish
telnet localhost 6666
install webbundle:file:/tmp/foo.war?Web-ContextPath=/foo
start
I don't watch this forum, I watch glassfish forum - you can ask there if you wish.