[JBoss Seam] - Re: Injection and remoting
by sbryzak2
The login() method in your example is clearly intended to be invoked within a JSF context - it adds messages via FacesMessages and returns an action string. Remoting is not intended to be used to call action methods such as this.
If however this is just an experiment to see how remoting works, and you're wondering why "cliente" isn't being injected from your form, it's because remoting calls need to explicitly specify any parameters that you require to be passed. I.e. your login method prototype would need to be:
| public String login(Cliente client)
|
On the client side you would need to create a new Cliente object and populate it with the username and password, then pass this object as a parameter in your remote call.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985648#3985648
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985648
19Â years, 7Â months
[JNDI/Naming/Network] - JNDI Newbie - Please help !!!
by mrroger
This is my code:
package test.main;
import org.jboss.jmx.adaptor.rmi.RMIAdaptor;
import java.util.*;
import javax.management.*;
import javax.naming.*;
public class TestMain {
public static void main(String args[]) throws Exception {
System.out.println("Starting");
Properties props=new Properties(); props.put(InitialContext.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(InitialContext.PROVIDER_URL, "jnp://localhost:1099"); props.put(InitialContext.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
InitialContext ic = new InitialContext(props);
Hashtable icHash = ic.getEnvironment();
Enumeration enumHash = icHash.keys();
System.out.println("Key num: " + icHash.size());
while(enumHash.hasMoreElements()) {
Object nextIc = enumHash.nextElement();
System.out.print("Keys: "+nextIc.toString());
System.out.println(" = "+icHash.get(nextIc));
}
System.out.println("Initial Context ok: ");
NamingEnumeration names = ic.list("");
System.out.println("Has More: " + names.hasMoreElements());
while(names.hasMoreElements()) {
System.out.println((String) names.nextElement().toString());
}
RMIAdaptor server = (RMIAdaptor) ic.lookup("jmx/invoker/RMIAdaptor");
System.out.println("RMIAdaptor ok: "+server.getMBeanCount());
System.out.println("Name: " + server.getDefaultDomain());
===> ObjectName nameTest = new ObjectName("jboss:service=JNDIView");
MBeanInfo info = server.getMBeanInfo(nameTest);
System.out.println("Name: " + info.getClassName());
System.out.println("Finished");
}
}
This is the error where arrow is:
Exception in thread "main" java.lang.NullPointerException
at java.io.ObjectStreamClass.setClass(libgcj.so.7)
at java.io.ObjectInputStream.readClassDescriptor(libgcj.so.7)
at java.io.ObjectInputStream.readObject(libgcj.so.7)
at java.io.ObjectInputStream.readObject(libgcj.so.7)
at java.rmi.MarshalledObject.get(libgcj.so.7)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:119)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
at org.jboss.jmx.connector.invoker.client.InvokerAdaptorClientInterceptor.invoke(InvokerAdaptorClientInterceptor.java:51)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:59)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy0.getMBeanInfo(Unknown Source)
at test.main.TestMain.main(TestMain.java:50)
PLEASE HELP !!!!
WHERE I AM WRONG ???
Thank a lot
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985647#3985647
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985647
19Â years, 7Â months
[JBoss Eclipse IDE (users)] - Re: JBossIDE 2.0beta2 and JBoss 4.0.5 launch problem
by rob.strykerï¼ jboss.com
This is the usage for start args for jboss:
usage: run.bat [options]
options:
-h, --help Show this help message
-V, --version Show version information
-- Stop processing options
-D[=] Set a system property
-d, --bootdir= Set the boot patch directory; Must be absolute
or url
-p, --patchdir= Set the patch directory; Must be absolute or u
rl
-n, --netboot= Boot from net with the given url as base
-c, --configuration= Set the server configuration name
-B, --bootlib= Add an extra library to the front bootclasspat
h
-L, --library= Add an extra library to the loaders classpath
-C, --classpath= Add an extra url to the loaders classpath
-P, --properties= Load system properties from the given url
-b, --host=<host or ip> Bind address for all JBoss services
-g, --partition= HA Partition name (default=DefaultDomain)
-u, --udp= UDP multicast address
-l, --log=<log4j|jdk> Specify the logger plugin type
Press any key to continue . . .
I see no --user option there.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985645#3985645
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985645
19Â years, 7Â months
[JBoss Seam] - Re: seam-security example
by sbryzak2
The security API is still under heavy construction and I've yet to write documentation for it. The @Secure annotation is used to "secure" access to a component or component method by specifying which roles or permissions are required to be able to invoke it.
Within the security API there are two types of permissions; "static" and "dynamic" (those are the best descriptions I can come up with). Static permissions are intended to be allocated to roles at initialization time, and to answer your question about how to set up user/roles with permissions, this bit isn't implemented yet.
Dynamic permissions are used when you need to make a decision based on some contextual information whether a permission should be granted or not.
The checkPermission() call is necessary because it performs an explicit permissions check against the specified object using its ACL - something that you can't do with an annotation. This is the functionality I'm currently working on, and as a result the security example may break occasionally.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985641#3985641
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985641
19Â years, 7Â months