[Remoting] - Exceptions in calls and callbacks
by login4jbr
Hello, I'm a begginer with JBoss remoting and any help will be great.
What happens if something bad happens during a remote call or callback?
The remote call throws some special exception like the RemoteException in RMI?
How can I know that something bad happened?
How can I know exactly what happened?
For a remote call you use the invoke() and invokeOneWay() methods in the Client class. These method declare that throws a Throwable, but what does it mean?
I've looked at the javadoc, but there are no explanations.
I've looked at the JBoss remoting guide but found nothing.
Where can find information about this?
I wish to determinate if the problem ocurred:
when the call was going to the server.
when the request was being processed in the server.
when the call was returning to the client.
Analogously:
For a remote callback you use the handleCallback() method in the InvokerCallbackHandler implementation. This method throws a CallbackHandleException.
I need to know the meaning of that exception and the exact situation.
Thanx
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016775#4016775
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016775
19Â years, 2Â months
[JBoss Seam] - Re: Restrict
by supernovasoftware.com
I also use the following in components.xml
| <factory name="basePath"
| value="#{facesContext.externalContext.request.scheme}://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}#{facesContext.externalContext.request.contextPath}/"/>
|
Note this is all one line the forum wrapped
and
<base href="#{basePath}" />
So i can have the view files in different directories, but still resolve the images and css to the root of the webapp with out having to do ../../images/myimage.jpg
I used to use something like this
@Create
| public void setup() {
| request = (HttpServletRequest) facesContext.getExternalContext().getRequest();
| }
|
|
| @Factory("basePath")
| public void loadBasePath()
| {
| basePath = request.getScheme() + "://" +
| request.getServerName() + ":" +
| request.getServerPort() + request.getContextPath() + "/";
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016752#4016752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016752
19Â years, 2Â months
[JBossCache] - Listener receives both a nodeCreated AND nodeModified for ne
by jmcclure
Using JBoss AS 4.0.5GA, JBoss Cache 1.4.1 SP1, Java 1.5.0_10, WinXP Pro
Hi,
I have created a tree cache instance in which I am adding a node via the method put(fqn, key, value). From the documentation, if that node does not exist, which is the situation in my test, a nodeCreated notification will be emitted. However, this is not the case. My listener receives both a nodeCreated AND nodeModified notification for that single action.
My listener extends the abstract listener and overrides a couple of methods:
public class CacheListener extends AbstractTreeCacheListener
| {
| public CacheListener()
| {
| System.err.println("listener created");
| }
|
| @Override
| public void nodeCreated(Fqn fqn)
| {
| System.err.println("node created");
| }
|
| @Override
| public void nodeModified(Fqn fqn)
| {
| System.err.println("node modified");
| }
| }
My main class creates the cache instance, reigisters the listener and creates a node with data:
public static void main(String[] args)
| {
| try
| {
| System.err.println("starting test");
| TreeCache tree = new TreeCache();
| CacheListener listener = new CacheListener();
| tree.addTreeCacheListener(listener);
|
| tree.setClusterName("test");
| tree.setClusterProperties("default.xml");
| tree.setCacheMode(TreeCache.LOCAL);
| tree.createService();
| tree.startService();
| tree.put("/a", "name", "James");
| tree.stopService();
| tree.destroyService();
| System.err.println("end of test");
| }
| catch(Exception ex)
| {
| System.err.println("Got an exception: " + ex.getMessage());
| }
| }
The output is as follows:
starting test
listener created
node created
node modified
end of test
Is this the expected behavior with incorrect documentation? Or am I not utilizing the API properly? Any pointers are appreciated.
Thanks.
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016751#4016751
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016751
19Â years, 2Â months