[JBoss Remoting] - JBoss Remoting and JBoss AS 6
by Ian Mitchell
Ian Mitchell [http://community.jboss.org/people/imitchell] created the discussion
"JBoss Remoting and JBoss AS 6"
To view the discussion, visit: http://community.jboss.org/message/566107#566107
--------------------------------------------------------------
Hi folks,
I'd like to investigate the use of Remoting on JBoss for a large project with many different technologies.
We are currently using JBoss AS 6 but it looks like there is no Remoting available for JBoss AS 6.
I have found the following information JBoss Remoting site:
For Remoting 2:
2.5.3.SP1: Versions 2.5.x are targeted to JBoss Application Server 5.0/5.1 and EAP 5.0/5.1
2.2.3.SP2: Versions 2.2.x are targeted to JBoss Application Server 4.2 and EAP 4.2/4.3
For Remoting 3:
Remoting 3 is the next generation of Remoting.
It will support a variety of modules in JBoss Application Server 6.
But... I also find this:
3.1.0.Beta2 Beta - NOT for production systems
Does Remoting 2.5.x work with JBoss AS 6?
As anyone tried this before?
Any hints on making it work?
Thanks,
Ian
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/566107#566107]
Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[JBoss Web Services] - EJB3 JBossWS Authentication in 5.1.0 GA not working
by Judes Tumuhairwe
Judes Tumuhairwe [http://community.jboss.org/people/tumuhairwe] created the discussion
"EJB3 JBossWS Authentication in 5.1.0 GA not working"
To view the discussion, visit: http://community.jboss.org/message/565984#565984
--------------------------------------------------------------
Hi
I've read this [1] and [2] and [3] and a whole bunch of others (including the JBoss In Action book) and they all say the same thing:
1. Configure a data-source (*-ds.xml file)
2. Define a domain (conf/login-config.xml)
3. Tell the app about it:
a. put the <security-domain> in jboss-web.xml and in the
b. META-INF/jboss.xml
c. add a security constraint in web.xml
4. Annotate the EJB/Web-service with the security annotations (@SecurityDomain, @WebContext and @RolesAllowed in addition to @Stateless and @Webservice)
5. build, package & deploy as an ear
6. Add the values to the request-context map of the BindingProvider when calling...and everything should work.
But nothing is working for me i.e. I keep getting a 401 error (Unauthorized). (I've been struggling with this for days now) Question is can anyone see what I'm doing wrong.
Environment: Java version: 1.5.0_22, JBoss 5.1.0 GA, JBoss Web Services - Stack Native Core (3.1.2.GA)
conf/login-config.xml (fragment)
[still gives a HTTP 401 even if I use the default JBossWS]
The datasource (I've verified that this works)
jboss-web.xml (the article [1] says its only for POJO's but it doesn't make a difference if I remove the <security-domain> tag)
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
<loader-repository-config>
java2ParentDelegation=false
</loader-repository-config>
</loader-repository>
</class-loading>
<context-root>/verifiq</context-root>
<security-domain flushOnSessionInvalidation="false">verifiq-domain</security-domain>
</jboss-web>
jboss.xml (in the ejb jar's META-INF) Same as above i.e. doesn't make a difference if I uncomment.
<?xml version="1.0" encoding="UTF-8"?>
<jboss>
<security-domain>verifiq-domain</security-domain>
<!--
<webservices>
<context-root>/service</context-root>
</webservices>
<enterprise-beans>
<session>
<ejb-name>ExpulsionStatusBean</ejb-name>
<jndi-name>ExpulsionStatusBean</jndi-name>
<security-domain>verifiq-domain</security-domain>
<port-component>
<port-component-name>ExplusionStatusServicePort</port-component-name>
<port-component-uri>/ExplusionStatusBeanPort</port-component-uri>
<auth-method>BASIC</auth-method>
<transport-guarantee>NONE</transport-guarantee>
<secure-wsdl-access>false</secure-wsdl-access>
</port-component>
-->
<!--
<resource-ref>
<res-ref-name>jdbc/postgresql</res-ref-name>
<jndi-name>java:/VerifiqDS</jndi-name>
</resource-ref>
-->
<!--
<clustered>true</clustered>
<cluster-config>
<partition-name>DefaultPartition</partition-name>
<load-balance-policy>org.jboss.ha.framework.interfaces.RandomRobin</load-balance-policy>
</cluster-config>
-->
<!--
</session>
</enterprise-beans>
-->
</jboss>
ExpulsionStatusBean.java [intentionally skipped the contextRoot in @WebContext because:
1. it puts the context (e.g. /service) outside the app's (/verifiq) i.e. security-constraint definitions in web.xml become useless since we now have localhost:8080/services and localhost:8080/verifiq.
2. It applies that service to all the web-services in that ejb jar (even though I've explicitly asked for a different contextRoot on another web-service)
Either way, even when I access them at a different location /services/serviceName?wsdl the result is the same i.e. HTTP 401]
@Stateless
@WebService
@Local(ExplusionStatusService.class)
@SecurityDomain(value="JBossWS")
@RolesAllowed("friend")
@WebContext(authMethod="BASIC", transportGuarantee="NONE", secureWSDLAccess=false)
public class ExplusionStatusBean implements ExplusionStatusService, Serializable {
@Resource
private SessionContext context;
@WebMethod
public String expell(@WebParam(name="person") Person person) {
String retVal = "Expelling " + person.getSchoolAssignedID();
System.out.println("ExplusionStatusBean.expell(): invoked");
System.out.println("ExplusionStatusBean.expell(): Student: " + person);
System.out.println("ExplusionStatusBean.expell(): caller: " + context.getCallerPrincipal());
System.out.println("ExplusionStatusBean.expell(): returning " + retVal);
return retVal;
}
}
Expeller.java (snipped just main() )
public static void main(String[] args) {
try {
log.info("Constructing...");
ExplusionStatusBeanService esb = new ExplusionStatusBeanService(new URL("http://127.0.0.1:8080/verifiq-verifiq-ejb/ExplusionStatusBean?wsdl"));
ExplusionStatusBean service = esb.getExplusionStatusBeanPort();
log.info("Computing password");
String password = "thefrog";
//password = DigestUtils.md5Hex(password);
//String pass =
log.info("Setting authentication info");
//BindingProvider bp = (BindingProvider)service;
//Map<String, Object> authentication = bp.getRequestContext();
((BindingProvider)service).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermit");
((BindingProvider)service).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);
System.out.println("Using username kermit and password=" + password);
log.info("Invoking...");
Person person = getJudes(); // Person is just a regular JPA pojo (mapped) (with name & schoolId)
String response = service.expell(person);
log.info("Response receieved successfully! " + response);
} catch (Exception ex) {
ex.printStackTrace();
log.log(Level.SEVERE, null, ex);
}
}
server.log
(I'm 100% certain the user kermit->thefrog exists in both the props/jbossws-*.properties file (when I use the default JBossWS) and in the database.)
2010-10-12 01:09:07,797 DEBUG org.jboss.security.auth.spi.DatabaseServerLoginModule org.jboss.security.auth.spi.DatabaseServerLoginModule (http-127.0.0.1-8080-1) Bad password for username=kermit
2010-10-12 01:09:07,797 DEBUG org.jboss.security.auth.spi.DatabaseServerLoginModule org.jboss.security.auth.spi.DatabaseServerLoginModule (http-127.0.0.1-8080-1) Bad password for username=kermit
Like I said, I'm 100% certain the kermit exists & has the role 'friend' (see attached screenshot)
Is there anything I'm missing?
web.xml (supposedly for POJOs only but I've included a snippet anyway. Doesn't matter if I comment or uncomment it out. Same result "Bad password" error)
<security-constraint>
<web-resource-collection>
<web-resource-name>All webservices</web-resource-name>
<description>Protects all webservices</description>
<url-pattern>/service</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admissions-viewer</role-name>
<role-name>friend</role-name>
</auth-constraint>
</security-constraint>
<security-role>
<role-name>admissions-viewer</role-name>
</security-role>
<security-role>
<role-name>friend</role-name>
</security-role>
<security-role>
<role-name>admissions-manager</role-name>
</security-role>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Verifiq Webservices Realm</realm-name>
</login-config>
I've gone over it countless times & I'm just frustrated. It really shouldn't be that hard to get it to work...in theory :-)
Is there anything I'm missing?
TIA,
Judes Tumuhairwe
References:
[1] http://community.jboss.org/docs/DOC-13533 http://community.jboss.org/wiki/JBossWS-Authentication
[2] http://www.coderanch.com/t/477889/JBoss/Securing-Application-JBoss http://www.coderanch.com/t/477889/JBoss/Securing-Application-JBoss
[3] http://thatjavathing.blogspot.com/2009/05/authentication-and-authorizatio... http://thatjavathing.blogspot.com/2009/05/authentication-and-authorizatio...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/565984#565984]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - jbpm5 and maven
by michael melsen
michael melsen [http://community.jboss.org/people/piratew] created the discussion
"jbpm5 and maven"
To view the discussion, visit: http://community.jboss.org/message/573733#573733
--------------------------------------------------------------
Hi everyone,
I'm hoping any one of you guys can help me out and that my question isn't a bit too noobish ;) . I'm trying to run jbmp5 in a test setup. After using the jbpm5 installer and the ant script everything works quite well. However I'm trying to setup a new jbpm5 / maven project to start a prototype. Unfortunately after finding and adding the dependency jpbm 5.0-Snapshot my pom editor in eclipse keep stating that it is missing artifact org.jbpm:jbpm:pom:5.0-SNAPSHOT:compile. Older versions of jbpm work like a charm.
Is there anybody who knows what I'm doing wrong or is there a problem related to the repository itself?
thanks in advance,
Michael
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/573733#573733]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[IronJacamar] - Re: Embedded JCA with Glassfish
by John SMITH
stackpeek [http://community.jboss.org/people/stackpeek] created the discussion
"Re: Embedded JCA with Glassfish"
To view the discussion, visit: http://community.jboss.org/message/573674#573674
--------------------------------------------------------------
Hi Jesper,
Thanks for your help. I used "new EmbeddedJCA(false)" to boot a clean environment, and deployed the following XML files: transaction.xml, stdio.xml, jca.xml.
I didn't deploy the naming.xml and comment all the dependencies to the "NamingServer" bean in each of these XML files.
I assume IronJacamar (IJ) can find the local naming environment (the Glassfish one), cause I could see the bindings of the different tx beans (UserTransaction, TransactionPropagationContextImporter, TransactionPropagationContextExporter, TransactionSynchronizationRegistry, TransactionManager) in the JNDI tree.
I still get the NotSerializableException from org.jboss.jca.core.connectionmanager.ccm.CachedConnectionManager (@see the stack at the end of this post).
I don't get any error at archive validation (I changed the BeanValidation namespace in order to prevent NamingException with java:comp namespace modification). I only get a warning when I use IJ in standalone, but the deployment is OK. I could browse the IJ administration console, and view my connection factory and its different configuration properties.
Below the initialization of the JCA container:
{code}
embeddedJca = new EmbeddedJCA(false);
embeddedJca.startup();
embeddedJca.deploy(getUrl("transaction.xml"));
embeddedJca.deploy(getUrl("stdio.xml"));
embeddedJca.deploy(getUrl("jca.xml"));
RAActivator raa = embeddedJca.lookup("RAActivator", RAActivator.class);
if (null == raa) throw new IllegalStateException("RAActivator not defined");
raa.setEnabled(false);
embeddedJca.deploy(getUrl("MyArchive.rar"));
embeddedJca.deploy(getUrl("my-ra.xml"));
raa.setEnabled(true);
{code}
Content of my-ra.xml:
<?xml version="1.0" encoding="UTF-8"?>
<resource-adapters>
<resource-adapter>
<archive>MyArchive.rar</archive>
<transaction-support>XATransaction</transaction-support>
<connection-definitions>
<connection-definition jndi-name="eis/MyArchive" use-java-context="false" enabled="true" class-name="com.xxx.MCF">
</connection-definition>
</connection-definitions>
</resource-adapter>
</resource-adapters>
Thanks for your help.
Caused by: java.lang.RuntimeException: com.github.fungal.spi.deployers.DeployException: Deployment file:/.../my-ra.xml failed
...
Caused by: com.github.fungal.spi.deployers.DeployException: Deployment file:/.../application-ra.xml failed
at org.jboss.jca.deployers.fungal.RaXmlDeployer.doDeploy(RaXmlDeployer.java:291)
at org.jboss.jca.deployers.fungal.RaXmlDeployer.deploy(RaXmlDeployer.java:174)
at com.github.fungal.impl.MainDeployerImpl.deploy(MainDeployerImpl.java:162)
at com.github.fungal.impl.MainDeployerImpl.deploy(MainDeployerImpl.java:77)
at org.jboss.jca.embedded.EmbeddedJCA.deploy(EmbeddedJCA.java:169)
...
... 72 more
Caused by: java.lang.RuntimeException: Cant copy Serializable object:
at com.sun.enterprise.naming.NamingUtils.makeCopyOfObject(NamingUtils.java:82)
at com.sun.enterprise.naming.LocalSerialContextProviderImpl.bind(LocalSerialContextProviderImpl.java:89)
at com.sun.enterprise.naming.SerialContext.bind(SerialContext.java:472)
at org.jboss.util.naming.Util.bind(Util.java:105)
at org.jboss.util.naming.Util.bind(Util.java:91)
at org.jboss.jca.core.naming.ExplicitJndiStrategy.bindConnectionFactories(ExplicitJndiStrategy.java:140)
at org.jboss.jca.deployers.fungal.AbstractFungalRADeployer.bindConnectionFactory(AbstractFungalRADeployer.java:209)
at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1344)
at org.jboss.jca.deployers.fungal.RaXmlDeployer.doDeploy(RaXmlDeployer.java:273)
... 77 more
Caused by: java.io.NotSerializableException: org.jboss.jca.core.connectionmanager.ccm.CachedConnectionManager
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at com.sun.enterprise.naming.NamingUtils.makeCopyOfObject(NamingUtils.java:64)
... 85 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/573674#573674]
Start a new discussion in IronJacamar at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months