[Remoting] - Re: Socket keep alive with client EJB
by slimamar
Yes, i understand the two behaviors.
Sorry, i think my question is not cleary and needs some precisions.
With JBossAS 5.0.0Beta4, we have set the value of the parameter 'timeout' , for the server side, in the file 'JBOSS_HOME/server/<your_configuration>/deploy/ejb3-connectors-service.xml'.
And it's woks fine.
But, with JBossAS 5.0.0GA, we don't manage to specify a value of this parameter and we don't know where to do this. Apparently, this is the file BOSS_HOME/server/<your_configuration>/deploy/ejb3-connectors-jboss-beans.xml.
In the documentation, there is this :
"You can configure JBoss Remoting through the JBoss Messaging service configuration file JBOSS_HOME/server/<your_configuration>/deploy/messaging/remoting-service.xml."
But this file doesn't exist and does reference to 'messaging'.
The problem is how to set this parameter on the server side.
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199540#4199540
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199540
17 years, 3 months
[JBossWS] - J2EE Webservice and C lang -
by RajaRamana
Hi,
I am looking for help to provide a service between J2EE and C lang.
1. I have created the following Web Service in J2EE
/*
* @WebService indicates that this is webservice interface and the name
* indicates the webservice name.
*/
@WebService(name = "Hello")
/*
* @SOAPBinding indicates binding information of soap messages. Here we have
* document-literal style of webservice and the parameter style is wrapped.
*/
@SOAPBinding
(
style = SOAPBinding.Style.DOCUMENT,
use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED
)
public class Hello
{
/**
* This method takes a input parameter and appends "Hello" to it and
* returns the same.
*
* @param name
* @return
*/
@WebMethod
public String greet( @WebParam(name = "name")
String name )
{
return "Hello " + name;
}
}
2. Configured in web.xml
<servlet-name>Hello</servlet-name>
<servlet-class>com.carrefour.cmt.central.webservice.Hello</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Hello</servlet-name>
<url-pattern>/Hello</url-pattern>
</servlet-mapping>
3. Started Jboss421. After that it created a wsdl file in DATA folder.
4 Now i want to write a Client to consume the service in 'C' LANG .
Please Assist me.
Thanks and Reg,
Raja
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199536#4199536
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199536
17 years, 3 months
[Beginners Corner] - Re: problems with MD5 encoding
by rohithadg
This may be help you.
public String getMD5(String str) throws NoSuchAlgorithmException {
| MessageDigest digest = java.security.MessageDigest.getInstance("MD5");
| digest.update(str.getBytes());
| byte[] hash = digest.digest();
|
| return hexStringFromBytes(hash);
| }
|
| public String hexStringFromBytes(byte[] b){
| char[] hexChars ={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
| String hex = "";
|
| int msb;
|
| int lsb = 0;
| int j;
|
| // MSB maps to idx 0
|
| for (j = 0; j < b.length; j++){
|
| msb = ((int)b[j] & 0x000000FF) / 16;
| lsb = ((int)b[j] & 0x000000FF) % 16;
| hex = hex + hexChars[msb] + hexChars[lsb];
| }
| return(hex);
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199530#4199530
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199530
17 years, 3 months
[JBoss Cache: Core Edition] - Re: TcpDelegatingCacheLoader
by lovelyliatroim
Just a comment on the TcpCacheServer as well.
I dont like this
| Thread serverThread = new Thread("TcpCacheServer")
| {
| @Override
| public void run()
| {
| try
| {
| while (running)
| {
| Socket client_sock = srv_sock.accept();
| Connection conn = new Connection(client_sock, cache);
| conns.add(conn);
| conn.start();
| }
| }
| catch (SocketException se)
| {
| if (!running)
| {
| // this is because of the stop() lifecycle method being called.
| // ignore.
| log.info("Shutting down TcpCacheServer");
| }
| else
| {
| log.error("Caught exception! Shutting down server thread.", se);
| }
| }
| catch (IOException e)
| {
| log.error("Caught exception! Shutting down server thread.", e);
| }
| }
| };
|
The reason i dont like it, is that as soon as there is a problem or an exception thrown the TcpCacheServer listening thread shutsdown, so that means no other nodes are no longer able to connect and thus a restart of this node is needed in order to recover.
Any reason why this is this way?? Should be catching inside the loop and trying to recover, not just stop listening completely.
Cheers,
LL
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199528#4199528
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199528
17 years, 3 months