[Remoting] - timeout specification
by login4jbr
Hi!
Consider a client-server application using socket transport.
the client side app is in a machine called CM
the server side app is in a machine called SM
Suppose that the machine SM is not accessible (is turned off or IP address is wrong or network cable is disconnected, etc.).
You launch the client side and:
The Client object is created and the connect() method succeeds. why?
And when you call the invoke() method it get stuck for long time (10 min aprox).
How can limit this waiting time (may be some kind of timeout)?
When you do a remote call, how do you specify a timeout?
In other words.
I do a remote call and want to specify how long must wait until the call throws the exception.
Thank you very much.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027673#4027673
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027673
19Â years, 1Â month
[Clustering/JBoss] - Re: get partition(cluster)
by JerryGauth
I'm not clear on whether you're trying to access the DistributedReplicantManager service remotely or if you're looking for something else. Here's an example of how to use the DRM service remotely in JBoss 4.0.5. Note that your remote client will need various JBoss jars on its classpath. You'll get runtime errors on your client until the classpath is set properly.
// method 1 - using JBoss RMIAdaptor
//RMIAdaptor server1 = (RMIAdaptor)ic.lookup("jmx/invoker/RMIAdaptor");
//System.out.println("MBean count=" + server1.getMBeanCount());
// method 2 - using javax.management in JDK 1.5, same object type is returned in JBossAS
MBeanServerConnection server2 = (MBeanServerConnection)ic.lookup("jmx/invoker/RMIAdaptor");
System.out.println("MBean count=" + server2.getMBeanCount());
ObjectName clusterService = new ObjectName("jboss:partitionName=DefaultPartition,service=DistributedReplicantManager");
String drm_content = (String)server2.invoke(clusterService, "listContent", null, null);
System.out.println(drm_content);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027669#4027669
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027669
19Â years, 1Â month
[Security & JAAS/JBoss] - Re: Active Directory and LdapExtLoginModule?
by ksiva_rajesh
Hi Neelixx,
The LdapExtLoginModule is awesome. Thanks a lot for your timely and valuable help.
Finally our LdapExtLoginModule started working fine. Below is our configuration. Hope this would help someone else, who is searching for similar information.
This configuration information completely depends on the way Active Directory or any Directory Services has been setup with Users, Groups/ roles etc.
| <!-- Attempt 1 with LdapExtLoginModule -->
| <application-policy name="HMActiveDirecotry">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required" >
| <module-option name="java.naming.provider.url">ldap://<ldap host ip address>:389/</module-option>
| <module-option name="java.naming.security.authentication">simple</module-option>
| <module-option name="bindDN">CN=<>User Name who is having privileges for searching thru the directory service,OU=<Groups>,DC=company,DC=<domain classification></module-option>
| <module-option name="bindCredential"><Password></module-option>
| <module-option name="baseCtxDN">OU=<Top level group>,dc=company,dc=<domain classification></module-option>
| <module-option name="baseFilter">(CN={0})</module-option>
| <module-option name="rolesCtxDN">OU=<Top level group>,dc=company,dc=<domain classification></module-option>
| <module-option name="roleFilter">(member={1})</module-option>
| <module-option name="roleAttributeID">CN</module-option>
| <module-option name="roleRecursion">-1</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
Here I've mention the HTML just to let every one know what are the parameters I have configures to connect with AD.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027668#4027668
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027668
19Â years, 1Â month
[EJB/JBoss] - Does JBoss validate EntityBean length setting?
by tonylmai
Hi all,
Would JBoss validate an Entity's attribute for length?
@Entity
| public class ExampleName implements Serializable {
| ...
| private String name;
|
| @Column(nullable = false, length=25)
| public String getName() {
| ...
| }
when I invoke the following code
ExampleName ex = new ExampleName();
| ex.setName("A long line that violates the max length set for ExampleName");
The server threw the following exception:
anonymous wrote :
| 12:35:37,312 WARN [JDBCExceptionReporter] SQL Error: 8152, SQLState: 22001
| 12:35:37,312 ERROR [JDBCExceptionReporter] String or binary data would be truncated.
| 12:35:37,312 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
| org.hibernate.exception.DataException: could not insert: [com.judots.ExampleName]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
| ...
| Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.
| at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
|
while on the client junit test, I would receive the following error:
anonymous wrote :
| java.lang.reflect.UndeclaredThrowableException
| at $Proxy5.createExchange(Unknown Source)
| at com.judots.test.Tests.createExampleName(Tests.java:29)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
| ...
| Caused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerException
| at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
| ...
|
It would be nice to have JBoss validate the length automatically without us having to declare Hibernate's validation explicitly. After all, we are using Hibernate within JBoss are we not?
Thanks
-tony
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027664#4027664
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027664
19Â years, 1Â month