Search Results

Search found 14 results on 1 pages for 'raticulin'.

Page 1/1 | 1 

  • Use MTOM/streaming from C# calling a webservice in java exposed via jaxws

    - by raticulin
    We have this webservice created with jax-ws @WebService(name = "Mywebser", targetNamespace = "http://namespace") @MTOM(threshold = 2048) @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) public class Mywebser { @WebMethod(operationName = "doStreaming", action = "urn:doStreaming") @WebResult(name = "return") public ResultInfo doStreaming(String username, String pwd, @XmlMimeType("application/octet-stream") DataHandler data, boolean overw){ ... } } The generated client side looks like this: @WebMethod(action = "urn:doStreaming") @WebResult(targetNamespace = "") @RequestWrapper(localName = "doStreaming", targetNamespace = "http://namespace", className = "com.mypack.client.doStreaming") @ResponseWrapper(localName = "doStreamingResponse", targetNamespace = "http://namespace", className = "com.mypack.client.doStreamingResponse") public ResultInfo doStreaming( @WebParam(name = "arg0", targetNamespace = "") String arg0, @WebParam(name = "arg1", targetNamespace = "") String arg1, @WebParam(name = "arg2", targetNamespace = "") DataHandler arg2, @WebParam(name = "arg3", targetNamespace = "") boolean arg3); By using it this way it uses streaming properly (verified we can pass an argument of 80mb when the jvm had less allowed. MywebserService serv = ...; Mywebser wso = serv.getMywebserPort(new MTOMFeature()); Map<String, Object> ctxt = ((BindingProvider) wso).getRequestContext(); ctxt.put(JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, 8192); DataHandler dataHandler = new DataHandler(new FileDataSource("c:\\temp\\A.dat")); arcres = wso.doStreaming("a", "b", dataHandler, true); We generate a clienet for .net, with VS2008, using "Add Web Reference", we get this C# code: [System.Web.Services.Protocols.SoapDocumentMethodAttribute("urn:doStreaming",RequestNamespace="http://namespace",ResponseNamespace="http://namespace",Use=System.Web.Services.Description.SoapBindingUse.Literal,ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] [return: System.Xml.Serialization.XmlElementAttribute("return",Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] public ResultInfo doStreaming( [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg0, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string arg1, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified,DataType="base64Binary")] byte[] arg2, [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool arg3) Apparently this is not using streaming? The type base64Binary of arg2 seems not the right one? In java it's a DataHandler. By testing it with low memory on the java side we can see it is not using streaming as it fails with OOM. Does someone knows if this is possible, and if so how? Our environment: server: jdk1.6, jaxws 2.1.7 client: C# 2.0, visual studio 2008

    Read the article

  • in x64 Windows is there a way to run a Runtime.exec() process avoiding 'Registry redirection'

    - by raticulin
    Our app runs in jvm 32 bit, even when in windows x64. Now, at some point, I need to access some registry values, for example HKEY_LOCAL_MACHINE/SOFTWARE/mycomp. I do this by executing cmd /C reg query HKEY_LOCAL_MACHINE\SOFTWARE\mycop from Runtime.exec() and parsing the output. This works fine when running on windows 32b, the problem is when on x64, I cannot find the key, as the shell I run is a 32 bit process, and due to Registry Redirection I would get the key if it was on HKEY_LOCAL_MACHINE/SOFTWARE/wow6432Node/mycop Any idea?

    Read the article

  • evaluation of a java thread dump

    - by raticulin
    I got a thread dump of one of my processes. It has a bunch of these threads. I guess they are keeping a bunch of memory so I am getting OOM. "Thread-8264" prio=6 tid=0x4c94ac00 nid=0xf3c runnable [0x4fe7f000] java.lang.Thread.State: RUNNABLE at java.util.zip.Inflater.inflateBytes(Native Method) at java.util.zip.Inflater.inflate(Inflater.java:223) - locked <0x0c9bc640 (a java.util.zip.Inflater) at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.read(ZipArchiveInputStream.java:235) at com.my.ZipExtractorCommonsCompress.extract(ZipExtractorCommonsCompress.java:48) at com.my.CustomThreadedExtractorWrapper$ExtractionThread.run(CustomThreadedExtractorWrapper.java:151) Locked ownable synchronizers: - None "Thread-8241" prio=6 tid=0x4c94a400 nid=0xb8c runnable [0x4faef000] java.lang.Thread.State: RUNNABLE at java.util.zip.Inflater.inflateBytes(Native Method) at java.util.zip.Inflater.inflate(Inflater.java:223) - locked <0x0c36b808 (a java.util.zip.Inflater) at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.read(ZipArchiveInputStream.java:235) at com.my.ZipExtractorCommonsCompress.extract(ZipExtractorCommonsCompress.java:48) at com.my.CustomThreadedExtractorWrapper$ExtractionThread.run(CustomThreadedExtractorWrapper.java:151) Locked ownable synchronizers: - None I am trying to find out how it arrived to this situation. CustomThreadedExtractorWrapper is a wrapper class that fires a thread to do some work (ExtractionThread, which uses ZipExtractorCommonsCompress to extract zip contents from a compressed stream). If the task is taking too long, ExtractionThread.interrupt(); is called to cancel the operation. I can see in my logs that the cancellation happened 25 times. And I see 21 of these threads in my dump. My questions: What is the status of these threads? Alive and running? Blocked somehow? They did not die with .interrupt() apparently? Is there a sure way to really kill a thread? What does really mean 'locked ' in the stack trace? Line 223 in Inflater.java is: public synchronized int inflate(byte[] b, int off, int len) { ... //return is line 223 return inflateBytes(b, off, len); }

    Read the article

  • choose a tool to create/maintain custom eclipse distrib

    - by raticulin
    I would like to settle on a tool to create/maintain my custom eclipse distrib (starting with next 3.6). By studying previous questions main contenders seem: Pulse Yoxos doing it yourself in eclipse Has anyone experiences in several of them and can comment on advantages etc?? My wishes are: by 'distrib' I mean: plugins, settings & preferences... be able to use the same eclipse setup in several workstations MAYBE sharing with other members of the team works across 3.5 and next 3.6: I don't know if it's possible. And anyway I would not object to customize the distrib once per new eclipse major release

    Read the article

  • what is the exact way to use Endorsed directory in jdk1.6

    - by raticulin
    I want to upgrade my jaxws to 2.2 (jdk1.6 comes bundled with jaxws 2.1). My jdk is (I did not install public jre): java version "1.6.0_20" Java(TM) SE Runtime Environment (build 1.6.0_20-b02) Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode) In jaxws' own doc they explain how to do it: One way to fix this is to copy jaxws-api.jar and jaxb-api.jar into JRE endorsed directory, which is $JAVA_HOME/lib/endorsed (or $JDK_HOME/jre/lib/endorsed) But I am not sure this is having any effect in my installation. For starters I have only defined %JAVA_HOME%. And folder $JAVA_HOME/lib/endorsed is inexistant, so I created and copied the two jars. But if I do (wsgen is a tool from jaxws) wsgen -version I still get: JAX-WS RI 2.1.6 in JDK 6 I also tried creating folder JAVA_HOME\jre\lib\endorsed (notice that in the doc they say JDK_HOME, but as I only have JAVA_HOME I used this path). Still same wsgen output. My questions are: What is the difference between JAVA_HOME and JDK_HOME in the doc page? anything significant or just two ways to refer to JAVA_HOME ? Is 'wsgen -version' a valid way to check jaxws version that is used or this always calls the exe in the original jdk, but it does not mean endorsed jars will be used? Anyone knows very detailed steps to install jaxws2.2 in a jdk.16?

    Read the article

  • can a OOM be caused by not finding enough contiguous memory?

    - by raticulin
    I start some java code with -Xmx1024m, and at some point I get an hprof due to OOM. The hprof shows just 320mb, and give me a stack trace: at java.util.Arrays.copyOfRange([CII)[C (Arrays.java:3209) at java.lang.String.<init>([CII)V (String.java:215) at java.lang.StringBuilder.toString()Ljava/lang/String; (StringBuilder.java:430) ... This comes from a large string I am copying. I remember reading somewhere (cannot find where) what happened is these cases is: process still has not consumed 1gb of memory, is way below even if heap still below 1gb, it needs some amount of memory, and for copyOfRange() it has to be continuous memory, so even if it is not over the limit yet, it cannot find a large enough piece of memory on the host, it fails with an OOM. I have tried to look for doc on this (copyOfRange() needs a block of continuous memory), but could not find any. The other possible culprit would be not enough permgen memory. Can someone confirm or refute the continuous memory hypothesis? Any pointer to some doc would help too.

    Read the article

  • best way to set up a VM for development (regarding performance)

    - by raticulin
    I am trying to set up a clean vm I will use in many of my devs. Hopefully I will use it many times and for a long time, so I want to get it right and set it up so performance is as good as possible. I have searched for a list of things to do, but strangely found only older posts, and none here. My requirements are: My host is Vista 32b, and guest is Windows2008 64b, using Vmware Workstation. The VM should also be able to run on a Vmware ESX I cannot move to other products (VirtualBox etc), but info about performance of each one is welcomed for reference. Anyway I guess most advices would apply to other OSs and other VM products. I need network connectivity to my LAN Guest will run many java processes, a DB and perform lots of file I/O What I have found so far is: HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs: it's and old post, and about Virtual PC, but I guess most things still apply (and also apply to vmware). I guess it makes a difference to disable all unnecessary services, but the ones mentioned in 1 seem like too few, I specifically always disable Windows Search. Any other service I should disable?

    Read the article

  • how to detect an IMAPMessage is not an email but a Task or Calendar item

    - by raticulin
    I am accessing Lotus and Groupwise using javamail via IMAP, recursively accessing all folders and processing email I find. But in folders like Tasklist and Calendar (those are from Groupwise but I think I remember Lotus had similar things), I get the items in there as instances of IMAPMessage, and so they are processed as if they were mail. I understand those items get exposed as mail through the IMAP protocol (either by design or by mistake), but I only want to process proper mail. Is there a way to do this? I have dismissed following approaches so far: Make sure the message has a message-id, at least in Groupwise Calendar items have it. Ignore folders by name (such as Calendar and Tasklist): is not totally correct as a user can move mail inside those folders. What I am looking is some IMAP api call I have missed so far or something in those lines...

    Read the article

  • IMAP protocol support in different email servers

    - by raticulin
    Having to interact with several different email servers via IMAP (using javamail), I have found that there is a very different level of support for IMAP features among them. The lack of support of some features has resulted in more developing time, more complicated code to deal with different support, worse perforamance due to not being able to SEARCH etc. So I would like to get some info on other servers and what level of support they provide. So far I have dealt with Lotus Domino and Novell GroupWise (and to a lesser extend Exchange 2003 and 2007). I am particularly interested in most used one in unix/linux (Courier, Cyrus, Dovecot, UW IMAP) and also Zimbra, but feel free to add any you know. Also welcomed info about online services like gmail. Features that I consider (comment if you are interested in others and I'll add them. Custom flags Searching Custom flags Searching arbitrary headers Partial fetching Proxy authentication And what I have found so far (correct if I am wrong anywhere): Lotus Domino Custom flags yes Searching Custom flags yes Searching arbitrary headers yes Partial fetching ? Proxy authentication sort of, you can give some user permissions to access other users mailboxes and he will see them under his '\Other Users' folder Novell GroupWise Custom flags No Searching Custom flags No Searching arbitrary headers No Partial fetching ? Proxy authentication yes, you can use what is called a Trusted Application

    Read the article

  • How to deal with 'bad' decision forced on you regarding basic software for your product

    - by raticulin
    Here is my situation, our product used to support several of the major databases. Now management has decided to move all products to MaxDB (aka SapDB previously), and even if we keep supporting some of the previous dbs, all new installations are on MaxDB. I am sure MaxDB is a great db and can support huge SAP installations. But from the point of view of a software developper, its a nightmare. Every time you need to do something not trivial (write an stored procedure, some fancy trigger...) and you google for some info, you get like 0.1% of the hits you would with things like MySql, PostgreSql or MSSql. Mailing lists are nearly non existant. SAP does support it commercially but it is not clear wether we'll buy support. And the decision cannot be rolled back. The product works with MaxDB, but with lots of inefficiency on development and a lot of frustration, is there something one could do?

    Read the article

  • how to design this relation in a DB schema

    - by raticulin
    I have a table Car in my db, one of the columns is purchaseDate. I want to be able to tag every car with a number of Policies (limited to 10 policies). Each policy has a time to life (ttl, a duration of time, like '5 years', '10 months' etc), that is, for how long since the car's purchaseDate the policy can be applied. I need to perform the following actions: when inserting a Car, it will be set with a number of Policies (at least one is set) sometimes a Car will be updated to add/remove a Policy searches must be done taking into account date/policies, for example: 'select all cars that are not covered by any policy as of today' My current design is (pol0..pol9 are the policies): CREATE TABLE Car ( id int NOT NULL IDENTITY(1,1), purchaseDate datetime NOT NULL, //more stuff... pol0 smallint default NULL, pol1 smallint default NULL, pol2 smallint default NULL, pol3 smallint default NULL, pol4 smallint default NULL, pol5 smallint default NULL, pol6 smallint default NULL, pol7 smallint default NULL, pol8 smallint default NULL, pol9 smallint default NULL, PRIMARY KEY (id) ) CREATE TABLE Policy ( id smallint NOT NULL, name varchar(50) collate Latin1_General_BIN NOT NULL, ttl varchar(100) collate Latin1_General_BIN NOT NULL, PRIMARY KEY (id) ) The problem I am facing is that the sql to perform the query above is a nightmare to write. As I don't know in which column each policy can be, so I have to check all columns for every policy etc etc. So I am wondering wether it is worth changing this. My questions are: The smallint as Policy id was chosen instead of an 'int IDENTITY' in order to save some space as there are going to be millions of Car records. It just adds complexity when creating a Policy as we must handle the id etc. Was it worth doing this? I am thinking that maybe there is a much better design? Obviously we could move the policy/car relation to its own table CarPolicy, benefits would be: no limit on 10 policies per car adding/removing etc much easier when only the default policy is applied (when no others are applied one called Default policy is applied), we could signal that by not having any entry in CarPolicy, now this is just done inserting the Default policy id in one of the columns. The cons are that we would need to change the DB, ORM classes etc. What would you recommend? Maybe there is another smart way to implement this that we are not aware without using the CarPolicy table?

    Read the article

  • what \bin to add to system Path env var from a jdk

    - by raticulin
    If you install the latest java 1.6 jdk, without installing the public jre option, you end up having two \bin dirs with java.exe: %JAVA_HOME%\jre\bin %JAVA_HOME%\bin if you compare those dirs, there are a few files that are identical (java.exe etc), and a bunch that are either in one or the other. So far I used to add %JAVA_HOME%\bin to my Path environment var, but now I am wondering, does it make a difference? Is there any side effect to choose one or the other? And would not be much cleaner if the installation had only one java.exe and \bin folder?

    Read the article

  • a way to use log4j pass values like java -DmyEnvVar=A_VALUE to my code

    - by raticulin
    I need to pass some value to enable certain code in may app (in this case is to optionally enable writing some stats to a file in certain conditions, but it might be anything generally). My java app is installed as a service. So every way I have thought of has some drawbacks: Add another param to main(): cumbersome as customers already have the tool installed, and the command line would need to be changed every time. Adding java -DmyEnvVar=A_VALUE to my command line: same as above. Set an environment variable: service should at least be restarted, and even then you must take care of what user is the service running under etc. Adding the property in the config file: I prefer not to have this visible on the config file so the user does not see it, it is something for debugging etc. So I thought maybe there is some way (or hack) to use log4j loggers to pass that value to my code. I have thought of one way already, although is very limited: Add a dummy class to my codebase com.dummy.DevOptions public class DevOptions { public static final Logger logger = Logger.getLogger(DevOptions.class); In my code, use it like this: if (DevOptions.logger.isInfoEnabled()){ //do my optional stuff } //... if (DevOptions.logger.isDebugEnabled()){ //do other stuff } This allows me to use discriminate among various values, and I could increase the number by adding more loggers to DevOptions. But I wonder whether there is a cleaner way, possibly by configuring the loggers only in log4j.xml??

    Read the article

1