[Beginner's Corner] New message: "Re: How do I enable pass-by-reference for EJB3 in JBoss AS container?"
by Jerry Simone
User development,
A new message was posted in the thread "How do I enable pass-by-reference for EJB3 in JBoss AS container?":
http://community.jboss.org/message/528868#528868
Author : Jerry Simone
Profile : http://community.jboss.org/people/jlsimone
Message:
--------------------------------------------------------------
Here is some more information. I apologize for continuing to reference old documentation, but I am still searching and will eventually find my way to the current JBoss 5.1 docs. Anyway, I did some more searching on "JBoss call by value" and found this link:
http://docs.jboss.org/jbossas/whatsnew40/html_single/
which talks about what's new in JBoss AS 4.0.1. In paragraph 2.1, it talks about optimizing performance for components deployed in the same JVM and goes on to say, "As a result, this configuration is not fully J2EE 1.4 compliant", which agrees with jaikiran's comments in an earlier post on this thread.
One thing that I find interesting, though, and something that keeps nagging at me, is the fact that there are three xml/configuration files in JBoss that I have found so far that all contain "call-by-value" semantics and they all are setting call-by-value to FALSE, which to me means call-by-reference is TRUE which is what I need. But I am not getting call by reference in the container. I am running a non-clustered JBoss 5.1.0 default server. These are the files that I have found so far that all have some form of "call by value = false".
server\default\deployers\ear-deployer-jboss-beans.xml
server\default\conf\jboss-service.xml
server\default\conf\standardjboss.xml
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528868#528868
15 years, 10 months
[jBPM] New message: "Re: Custom Activity"
by Sam Manning
User development,
A new message was posted in the thread "Custom Activity":
http://community.jboss.org/message/528865#528865
Author : Sam Manning
Profile : http://community.jboss.org/people/dondragon2
Message:
--------------------------------------------------------------
<custom name="print dots" class="com.test.process.Prompt">
<property name="properties">
<object class="java.util.HashMap">
<map>
<entry>
<key>
<string value="testprop" />
</key>
<value>
<string value="test" />
</value>
</entry>
</map>
</object>
</property>
<transition to="end" />
</custom>
public class Prompt implements ActivityBehaviour{
HashMap properties = new HashMap();
public void execute(ActivityExecution ae) throws Exception {
System.out.println(properties.get("testprop")+"------>");
}
public HashMap getProperties() {
return properties;
}
public void setProperties(HashMap properties) {
this.properties = properties;
}
}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528865#528865
15 years, 10 months
[JBoss Web Services] New message: "JbossWS username authentication not working"
by Bonnie Kenison
User development,
A new message was posted in the thread "JbossWS username authentication not working":
http://community.jboss.org/message/528837#528837
Author : Bonnie Kenison
Profile : http://community.jboss.org/people/bkenison
Message:
--------------------------------------------------------------
I am having trouble getting my webservice to authenticate the username/password sent in the wsse header. I am using Pramod's example code. The service works just fine, it returns the expected "Hello: Pramod" string. However, it works regardless of what username/password is sent. So obviously, the authentication is not happening. I have looked all over for a solution and can't figure out where the problem is. Any suggestions would be greatly appreciated as I need to put some level of security on this webservice. The users of this service aren't very techo-savvy, so I'd prefer not to require them to use a certificate. Username/password is just what we want.
Using Jboss 4.2.3.GA
login-config.xml (located in jboss/server/default/conf):
<application-policy name="JBossWS">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/jbossws-users.properties</module-option>
<module-option name="rolesProperties">props/jbossws-roles.properties</module-option>
<module-option name="unauthenticatedIdentity">anonymous</module-option>
</login-module>
</authentication>
</application-policy>
jbossws-users.properties (located in jboss/server/default/conf/props):
# A sample users.properties file for use with the UsersRolesLoginModule
kermit=thefrog
jboss-wsse-server.xml:
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
<config>
<timestamp ttl="300"/>
<requires>
<username/>
</requires>
</config>
</jboss-ws-security>
Service:
@Stateless
@WebService
(name="TestWSEJB",
targetNamespace = "http://localhost:8080/uttestservice",
serviceName = "TestWSEJBService")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@EndpointConfig(configName = "Standard WSSecurity Endpoint")
@SecurityDomain("JBossWS")
public class TestWSEJB {
@Resource
WebServiceContext wsContext;
@WebMethod
public String ping (String name)
{
MessageContext msgCtx = (MessageContext)wsContext.getMessageContext();
try
{
System.out.println(msgCtx);
SOAPMessage soapMessage = ((SOAPMessageContext)msgCtx).getMessage();
soapMessage.writeTo(System.out);
System.out.println("");
} catch (Exception se) { se.printStackTrace();}
return "Hello : " + name;
}
}
jboss-wsse-client.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-ws-security xmlns="http://www.jboss.com/ws-security/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/ws-security/config http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
<config>
<username />
</config>
</jboss-ws-security>
Client Interface:
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.1.1-b03-
* Generated source version: 2.0
*
*/
@WebService(name = "TestWSEJB", targetNamespace = "http://localhost:8080/uttestservice")
public interface TestWSEJB {
/**
*
* @param arg0
* @return
* returns java.lang.String
*/
@WebMethod
@WebResult(targetNamespace = "")
@RequestWrapper(localName = "ping", targetNamespace = "http://localhost:8080/uttestservice", className = "test.Ping")
@ResponseWrapper(localName = "pingResponse", targetNamespace = "http://localhost:8080/uttestservice", className = "test.PingResponse")
public String ping(
@WebParam(name = "arg0", targetNamespace = "")
String arg0);
}
Client Test:
public class TestWSClient {
public static void main(String[] args) {
try {
TestWSClient client = new TestWSClient();
client.doTest(args);
} catch(Exception e) {
e.printStackTrace();
}
}
public void doTest(String[] args) {
try {
URL url = new URL("http://localhost:8080/uttestservice?wsdl");
QName qn = new QName("http://localhost:8080/uttestservice","TestWSEJBService");
Service s = Service.create(url, qn);
TestWSEJB port = s.getPort(TestWSEJB.class);
URL securityURL = new File("jboss-wsse-client.xml").toURL();
((StubExt)port).setSecurityConfig(securityURL.toExternalForm());
((StubExt)port).setConfigName("Standard WSSecurity Client");
((BindingProvider)port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermitabc");;
((BindingProvider)port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrogdef");;
System.out.println("Invoking the sayHello operation on the port.");
String response = port.ping("Pramod") ;
System.out.println(response);
} catch(Exception e) {
e.printStackTrace();
}
}
}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528837#528837
15 years, 10 months
[JBoss Microcontainer Development] New message: "DeclaredStructure Deployer and Mounting Archives"
by John Bailey
User development,
A new message was posted in the thread "DeclaredStructure Deployer and Mounting Archives":
http://community.jboss.org/message/528820#528820
Author : John Bailey
Profile : http://community.jboss.org/people/johnbailey
Message:
--------------------------------------------------------------
JIRA --> https://jira.jboss.org/jira/browse/JBDEPLOY-242
In order for the DeclaredStructure structure deployer to work correctly with archive, the archive must be mounted in order for the META/jboss-structure.xml to be available. The fix is making the DeclaredStructure extendAbstractVFSArchiveStructureDeployer to ensure the archive is mounted prior to the execution of the determineStructure method.
This works for a simple case of a JAR or WAR as a top-level deployment. Where it becomes an issue is when the top-level deployment is an EAR and it declares its structure. This works to build the structure, but causes problems down the road as the nested archives are not actually mounted, and it will result in invalid deployments.
What needs to happen in this case is any top-level deployments that declare their structure, need to ensure the child deployment archives are mounted.
Haven't had time to work through the details yet, but I will be looking to add some tests to highlight the issue.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528820#528820
15 years, 10 months
[Performance Tuning] New message: "JBoss 3.2.6 - pauses for a minute during startup"
by Mike Curwen
User development,
A new message was posted in the thread "JBoss 3.2.6 - pauses for a minute during startup":
http://community.jboss.org/message/528816#528816
Author : Mike Curwen
Profile : http://community.jboss.org/people/mike.curwen
Message:
--------------------------------------------------------------
Hello,
I'm currently migrating a production application from older physical hardware, to a new vmware host.
I've confirmed that all components (java version, jboss version, application and libraries) are the same between platforms. I've also made the platforms as close as possible, recognizing that vmware HD space, RAM and CPU are not the same as 'real' ones. The remaining differences would be that our existing production server is (I think) some flavour of redhat running linux 2.6.8 on reiserfs, and the new vmware host is ubuntu linux 2.6.24 using ext3.
I recognize that there's quite a difference between plain hardware and VMWare hosts. But...
When I start this application on my localhost (also ubuntu) for development it takes about 17 seconds for the whole thing to start. On production it takes about the same. But on the new VM host, it takes a minute and 17 seconds, and nearly the whole minute extra is experienced right here (3rd line from bottom):
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/foo/java/jboss-3.2.6
JAVA: /usr/foo/java/j2sdk1.4.2_19/bin/java
JAVA_OPTS: -server -Xms700m -Xmx700m -Djava.awt.headless=true -Dprogram.name=run.sh
CLASSPATH: /usr/foo/java/jboss-3.2.6/bin/run.jar:/usr/foo/java/j2sdk1.4.2_19/lib/tools.jar
=========================================================================
me@oldhost:/usr/foo/java/jboss-3.2.6/bin$ 10:06:41,010 INFO [Server] Starting JBoss (MX MicroKernel)...
10:06:41,011 INFO [Server] Release ID: JBoss [WonderLand] 3.2.6 (build: CVSTag=JBoss_3_2_6 date=200410140106)
10:06:41,012 INFO [Server] Home Dir: /usr/foo/java/jboss-3.2.6
10:06:41,012 INFO [Server] Home URL: file:/usr/foo/java/jboss-3.2.6/
10:06:41,012 INFO [Server] Library URL: file:/usr/foo/java/jboss-3.2.6/lib/
10:06:41,013 INFO [Server] Patch URL: null
10:06:41,013 INFO [Server] Server Name: default
10:06:41,013 INFO [Server] Server Home Dir: /usr/foo/java/jboss-3.2.6/server/default
10:06:41,013 INFO [Server] Server Home URL: file:/usr/foo/java/jboss-3.2.6/server/default/
10:06:41,013 INFO [Server] Server Data Dir: /usr/foo/java/jboss-3.2.6/server/default/data
10:06:41,014 INFO [Server] Server Temp Dir: /usr/foo/java/jboss-3.2.6/server/default/tmp
10:06:41,014 INFO [Server] Server Config URL: file:/usr/foo/java/jboss-3.2.6/server/default/conf/
10:06:41,014 INFO [Server] Server Library URL: file:/usr/foo/java/jboss-3.2.6/server/default/lib/
10:06:41,014 INFO [Server] Root Deployment Filename: jboss-service.xml
10:06:41,016 INFO [Server] Starting General Purpose Architecture (GPA)...
10:06:41,250 INFO [ServerInfo] Java version: 1.4.2_19,Sun Microsystems Inc.
10:06:41,250 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.4.2_19-b04,Sun Microsystems Inc.
10:06:41,250 INFO [ServerInfo] OS-System: Linux 2.6.24-23-generic,i386
10:06:41,422 INFO [Server] Core system initialized
10:07:34,053 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
10:07:39,116 INFO [WebService] Using RMI server codebase: http://oldhost:8083/
See how it takes nearly a minute after "Core system initialized" to proceed with the rest of the startup?
Has anyone seen this before, or have ideas what it could be, or where I should start looking for my lost minute?
Thanks.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528816#528816
15 years, 10 months