[JBoss Tools] New message: "Code Assist and Validation of Static Methods (3.1 CR2)"
by Cody Lerum
User development,
A new message was posted in the thread "Code Assist and Validation of Static Methods (3.1 CR2)":
http://community.jboss.org/message/528918#528918
Author : Cody Lerum
Profile : http://community.jboss.org/people/clerum
Message:
--------------------------------------------------------------
I just upgraded to 3.1 CR2 for my seam ear project and for the first time enabled JSF and validated the syntax of my project.
I got everything cleaned up except for static methods in EL
for example I have
a seam POJO
@Name("searchTools")
public class SearchTools
{
public static String getClassName(Object object)
{
if(object.getClass().getSimpleName().contains("$$"))
{
return object.getClass().getSuperclass().getSimpleName();
}
else
{
return object.getClass().getSimpleName();
}
}
}
which is called by
<h:outputText value="Organization" rendered="#{searchTools.getClassName(result) == 'Organization'}" />
This code works fine but it throws a warning "getClassName" cannot be resolved" and autocomplete doesn't work.
This same problem happens when using seams
<h:outputText value="#{_invoiceLineItem.dateServiceEnd.time}">
<s:convertDateTime type="date" pattern="MM/dd/yyyy" timeZone="#{timeZone.getTimeZone('GMT')}"/>
</h:outputText>
The code works fine but since getTimeZone is a static method on java.util.Timezone (timeZone is a builtin seam component)
Any ideas? AFAIK this wasn't working in CR1 either.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528918#528918
14 years, 10 months
[JBoss Web Services] New message: "Re: 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/528912#528912
Author : Bonnie Kenison
Profile : http://community.jboss.org/people/bkenison
Message:
--------------------------------------------------------------
Well, something new at least....
Now I am failing on all attempts, regardless of the username/password combination. Here is the exception produced:
c:\>java com.xxx.testClient.TestWSClient test
Invoking the sayHello operation on the port.
javax.xml.ws.WebServiceException: java.io.IOException: Could not transmit message
at org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:397)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:303)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:170)
at org.jboss.ws.core.jaxws.client.ClientProxy.invoke(ClientProxy.java:150)
at $Proxy15.ping(Unknown Source)
at com.utah.webservice.testClient.TestWSClient.doTest(TestWSClient.java:47)
at com.utah.webservice.testClient.TestWSClient.main(TestWSClient.java:19)
Caused by: java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:264)
at org.jboss.ws.core.client.SOAPProtocolConnectionHTTP.invoke(SOAPProtocolConnectionHTTP.java:71)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:340)
at org.jboss.ws.core.jaxws.client.ClientImpl.invoke(ClientImpl.java:291)
... 5 more
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Invalid HTTP server response
[403] - Access to the requested resource has been denied. Response: Access to the requested resource has been denied/403
.
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:348)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.ws.core.client.HTTPRemotingConnection.invoke(HTTPRemotingConnection.java:242)
... 8 more
Caused by: org.jboss.ws.WSException: Invalid HTTP server response [403] - Access to the requested resource has been deni
ed
at org.jboss.ws.core.soap.SOAPMessageUnMarshallerHTTP.read(SOAPMessageUnMarshallerHTTP.java:75)
at org.jboss.remoting.transport.http.HTTPClientInvoker.readResponse(HTTPClientInvoker.java:518)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:307)
... 13 more
Here is my jbossws-roles.properties file:
# A sample roles.properties file for use with the UsersRolesLoginModule
kermit=friend
wstest=friend
jbossws-users.properties:
# A sample users.properties file for use with the UsersRolesLoginModule
kermit=thefrog
Do I need to define the role in the webservice java file somewhere?
Bonnie
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528912#528912
14 years, 10 months
[jBPM] New message: "Re: Create process instance without starting it"
by M M
User development,
A new message was posted in the thread "Create process instance without starting it":
http://community.jboss.org/message/528911#528911
Author : M M
Profile : http://community.jboss.org/people/gubespam
Message:
--------------------------------------------------------------
My system allows an outside client to trigger the start of a process instance, using the latest version of the process definition. I have three requirements:1. Emit a notification whenever I start a new process instance ("start"); that notification must include the effective version (ie. the process definition version used to create the process instance).
2. Emit a notification whenever I reach a certain custom activity (this gets handled by code in the custom activity itself)
3. The start notification must occur before the custom activity notification.
It appears that the easy way would be to simply use executionService.startProcessInstanceByKey, use the returned ProcessInstance reference to determine the effective version, and then emit the start notification.
However, if I do that, the start notification will only get emitted after I've reached a wait state, which is guaranteed to be after the custom activity executes. This breaks requirement #3 above.
If, on the other hand, I can create a process instance without starting it, I can:
1. create the process instance, and from that reference, determine the effective version
2. emit the start notification, including the version determined above
3. start the process instance; when I reach the custom activity, emit the custom activity notification.
So, does that make sense? I had trouble clearly explaining this.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528911#528911
14 years, 10 months
[JBoss Cache] New message: "my jboss cache is not replicating"
by robert walker
User development,
A new message was posted in the thread "my jboss cache is not replicating":
http://community.jboss.org/message/528910#528910
Author : robert walker
Profile : http://community.jboss.org/people/robertwalker
Message:
--------------------------------------------------------------
Hi all, I got example 12 from jboss in action working with the clustering, very fun indeed.
basically one client sends in numbers 0-99 to jboss cluster, (2 nodes) and each node
gets the request randomly.
i decided to take it a step further and add jboss cache to it. So when the clients sens a number to the random node (node1 or node2) I print it out AND then add it to my arraylist cache, which should get replicated to the other node.
when sending numbers to cluster is done, the client makes one last call that says print cache. I expect either node (1 or 2) , whomever get chosen to service the request, to print out the arraylist (my jboss cache) showing all the numbers, ones handled by node1 and the numbers handled by node2. BUT, the cache is not replicating, i.e, if node1 is printing 15, it does not replicate this to node2 cache.
here is my code, can someone help (this is jboss 5.01, jdk1.5)
=========================
{code}
package com.manning.jbia;
import javax.ejb.Stateless;
import org.jboss.ejb3.annotation.Clustered;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import org.apache.log4j.Logger;
import org.jboss.cache.Cache;
import org.jboss.cache.CacheFactory;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import java.util.ArrayList;
import java.util.Iterator;
@Stateless
@Clustered
public class CounterBean implements Counter
{
public static boolean jbossCacheCreated = false;
private static Node numberCache = null;
public static Node getNumbersCache()
{
if(numberCache==null)
{
System.out.println("Initializing the cache");
initializeCache();
}
return numberCache;
}
public void printCount(int countNumber)
{
System.out.print(countNumber +" ");
// add number to cache, but does not replicated to other node's cache
Node numberCache = CounterBean.getNumbersCache();
ArrayList al = (ArrayList)numberCache.get("numbersList");
al.add(countNumber);
}
public static void initializeCache()
{
CacheFactory factory = new DefaultCacheFactory();
Cache cache = factory.createCache();
// Have to create and start cache before using it
cache.create();
cache.start();
Node rootNode = cache.getRoot();
// JBoss Cache stores data in a tree structure.
// All nodes in the tree structure are identified by Fqn objects.
Fqn cersFqn = Fqn.fromString("/jboss/cache/numbers");
// Create a new Node
numberCache = rootNode.addChild(cersFqn);
// let's store some data in the node
numberCache.put("numbersList", new ArrayList());
}
public void printCache()
{
System.out.println("start CounterBean.printCache()\n");
ArrayList al = (ArrayList)numberCache.get("numbersList");
Iterator alIterator = al.iterator();
System.out.println("cache=[");
while(alIterator.hasNext())
{
System.out.print( alIterator.next() +" ");
}
System.out.println("]");
System.out.println("\n\nend CounterBean.printCache()");
}
@PostConstruct
public void initialize ()
{
// Initialize here objects which will be used
// by the session bean
System.out.println("CounterBean initialize()");
}
@PreDestroy
public void destroyBean()
{
// Free here resources acquired by the session bean
System.out.println("CounterBean destroyBean()");
}
}
{code}
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528910#528910
14 years, 10 months
[jBPM] New message: "getVariables for multiple instances at once?"
by aaron ehrensberger
User development,
A new message was posted in the thread "getVariables for multiple instances at once?":
http://community.jboss.org/message/528909#528909
Author : aaron ehrensberger
Profile : http://community.jboss.org/people/aehrensberger
Message:
--------------------------------------------------------------
We use a unique setup, showing the user a queue of process instances that they may choose to work on at a given point in time. This queue can range from a small personal queue to a large common queue that may be cherrypicked by the users.
In this case where the queue is a larger queue, say containing 2000 process instances, we have determined through java profiling that the getVariables call on a specific process (which we are calling individually through a loop of process instances) is where most of the time is spent.
Is there a way to combine those 2000 calls into one call, getting all the variables for a set of process instances at one time? Does anyone have another recommendation on how to achieve our desired user experience?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/528909#528909
14 years, 10 months