Search Results

Search found 13 results on 1 pages for 'jsw'.

Page 1/1 | 1 

  • Ubuntu 9 & 10 ignore .xinitrc?

    - by JSW
    In Ubuntu 9.x, 10.x, the .xinitrc file is apparently not used. So, where do you put your xinit stuff? Note: asking this here, answering it myself, in light of http://serverfault.com/questions/87156/ubuntu-karmic-ignores-xinitrc

    Read the article

  • TIBRV: Remote vs Local RVD

    - by jsw
    When connected to a local RVD a sending application is shielded from network interruptions and the send message methods will only block for the time it takes for the message to reach the local RVD process. With remote RVD the sending application is no longer shielded from network interruptions and the send message methods will block for the time it takes to hop across the network to reach the remote RVD process. Is my understanding correct? The documentation is vague regarding remote daemons. I'm mostly concerned with how reliable and performant the send message will be from the perspective of a sending application. Introducing unnecessary blocking on the client side due to sending a message (especially a network hop) is a big no-no in this application. The speed at which the messages reach the consumer is not of the utmost importance. With this in mind is a remote RVD out of the question?

    Read the article

  • Testing a Non-blocking Queue

    - by jsw
    I've ported the non-blocking queue psuedocode here to C#. The code below is meant as a near verbatim copy of the paper. What approach would you take to test the implementation? Note: I'm running in VS2010 so I don't have CHESS support yet. using System.Threading; #pragma warning disable 0420 namespace ConcurrentCollections { class QueueNodePointer<T> { internal QueueNode<T> ptr; internal QueueNodePointer() : this(null) { } internal QueueNodePointer(QueueNode<T> ptr) { this.ptr = ptr; } } class QueueNode<T> { internal T value; internal QueueNodePointer<T> next; internal QueueNode() : this(default(T)) { } internal QueueNode(T value) { this.value = value; this.next = new QueueNodePointer<T>(); } } public class ConcurrentQueue<T> { private volatile int count = 0; private QueueNodePointer<T> qhead = new QueueNodePointer<T>(); private QueueNodePointer<T> qtail = new QueueNodePointer<T>(); public ConcurrentQueue() { var node = new QueueNode<T>(); node.next.ptr = null; this.qhead.ptr = this.qtail.ptr = node; } public int Count { get { return this.count; } } public void Enqueue(T value) { var node = new QueueNode<T>(value); node.next.ptr = null; QueueNodePointer<T> tail; QueueNodePointer<T> next; while (true) { tail = this.qtail; next = tail.ptr.next; if (tail == this.qtail) { if (next.ptr == null) { var newtail = new QueueNodePointer<T>(node); if (Interlocked.CompareExchange(ref tail.ptr.next, newtail, next) == next) { Interlocked.Increment(ref this.count); break; } else { Interlocked.CompareExchange(ref this.qtail, new QueueNodePointer<T>(next.ptr), tail); } } } } Interlocked.CompareExchange(ref this.qtail, new QueueNodePointer<T>(node), tail); } public T Dequeue() { T value; while (true) { var head = this.qhead; var tail = this.qtail; var next = head.ptr.next; if (head == this.qhead) { if (head.ptr == tail.ptr) { if (next.ptr == null) { return default(T); } Interlocked.CompareExchange(ref this.qtail, new QueueNodePointer<T>(next.ptr), tail); } else { value = next.ptr.value; var newhead = new QueueNodePointer<T>(next.ptr); if (Interlocked.CompareExchange(ref this.qhead, newhead, head) == head) { Interlocked.Decrement(ref this.count); break; } } } } return value; } } } #pragma warning restore 0420

    Read the article

  • Is there a definitive reference document for Ruby syntax?

    - by JSW
    I'm searching for a definitive document on Ruby syntax. I know about the definitive documents for the core API and standard library, but what about the syntax itself? For instance, such a document should cover: reserved words, string literals syntax, naming rules for variables/classes/modules, all the conditional statements and their permutations, and so forth. I know there are many books and tutorials, yes, but every one of them is essentially a tutorial, each one having a range of different depth and focus. They will all, by necessity of brevity and narrative flow, omit certain details of the language that the author deems insignificant. For instance, did you know that you can use a case statement without an initial case value, and it will then execute the first true when clause? Any given Ruby book or tutorial may or may not cover that particular lesser-known functionality of the case syntax. It's not discussed in the section in "Programming Ruby" about case statements. But that is just one small example. So far the best documentation I've found is the rubyspec project, which appears to be an attempt to write a complete test suite for the language. That's not bad, but it's a bit hard to use from a practical standpoint as a developer working on my own projects. Am I just missing something or is there really no definitive readable document defining the whole of Ruby syntax?

    Read the article

  • Rails: getting logic to run at end of request, regardless of filter chain aborts?

    - by JSW
    Is there a reliable mechanism discussed in rails documentation for calling a function at the end of the request, regardless of filter chain aborts? It's not after filters, because after filters don't get called if any prior filter redirected or rendered. For context, I'm trying to put some structured profiling/reporting information into the app log at the end of every request. This information is collected throughought the request lifetime via instance variables wrapped in custom controller accessors, and dumped at the end in a JSON blob for use by a post-processing script. My end goal is to generate reports about my application's logical query distribution (things that depend on controller logic, not just request URIs and parameters), performance profile (time spent in specific DB queries or blocked on webservices), failure rates (including invalid incoming requests that get rejected by before_filter validation rules), and a slew of other things that cannot really be parsed from the basic information in the application and apache logs. At a higher level, is there a different "rails way" that solves my app profiling goal?

    Read the article

  • What's the deal with rubygems on Debian? It's different and strange.

    - by JSW
    I've noticed at least the following oddities around rubygems on Debian (5.0 lenny in my case): Packages go into a different installation location: /var/lib/gems vs /usr/lib/ruby/gems The debian package is rubygems 1.3.6, and updating rubygems to the latest version (1.3.7) doesn't work: $ sudo gem update --system ERROR: While executing gem ... (RuntimeError) gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get. Not all gems appear to work like they do on other systems. For instance, when installing Phusion Passenger, it did not detect the "rack" gem even though it was definitely installed. Manually installing rubygems using the source tarball and reinstalling all my gems (to /usr/lib/ruby/gems) made my problems go away. What's the deal? Why is debian's package different?

    Read the article

  • iPhone or Android apps that use SMS based authentication?

    - by JSW
    What are some iPhone or Android applications that use SMS as their primary means of user authentication? I'm interested to see such apps in action. SMS-auth seems like a natural approach that is well-situated to mobile contexts. The basic workflow is: to sign up, a user provides a phone number; the app calls a backend webservice which generates a signed URL and sends it to the phone number via an SMS gateway; the user receives the SMS, clicks the link, and is thus verified and logged in. This results in a very strong user identity that is difficult to spoof yet fairly easy. It can be paired with a username or additional account attributes as needed for the product requirements. Despite the advantages, this does not seem to be in much use - hence my question. My initial assumption is that this is because products and users are wary of asking for / providing phone numbers, which users consider sensitive information. That said, I hope this becomes an increasingly more commonplace approach.

    Read the article

  • is appassembler plugin broken for java service wrapper on windows 64bit?

    - by Paul McKenzie
    Hi I'm developing on 32bit windows and am using appassembler to create a java service wrapper assembly, and it works ok. But I need to also create a 64bit assembly for deployment to a dev server. In the following config I have substituted the 32bit platform with the 64bit, see the <includes> section. But it no longer places the wrapper jar and dll in the lib folder. If I omit the includes completely, I get linux, solaris, Mac OSX and Win32 libraries, but no win64. Anyone got this working? <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>appassembler-maven-plugin</artifactId> <version>1.1-SNAPSHOT</version> <configuration> <target>${project.build.directory}/appassembler</target> <repositoryLayout>flat</repositoryLayout> <defaultJvmSettings> <initialMemorySize>256M</initialMemorySize> <maxMemorySize>1024M</maxMemorySize> </defaultJvmSettings> <daemons> <daemon> <id>MyApp</id> <mainClass>com.foo.AppMain</mainClass> <platforms> <platform>jsw</platform> </platforms> <generatorConfigurations> <generatorConfiguration> <generator>jsw</generator> <includes> <include>windows-x86-64</include> </includes> <configuration> <property> <name>set.default.REPO_DIR</name> <value>../../repo</value> </property> </configuration> </generatorConfiguration> </generatorConfigurations> </daemon> </daemons> </configuration> <executions> <execution> <goals> <goal>generate-daemons</goal> <goal>create-repository</goal> </goals> </execution> </executions> </plugin>

    Read the article

  • Init.d script gets return code 1 when calling itself, how can I get output?

    - by Per
    My question is, how can I modify the script so that it will tell me what goes wrong? The scenario is this: I'm trying to get Sonatype Nexus to start as a service in Ubuntu 10.04, and it just will not work. (I'm not looking for help on how to run Nexus, but on how to get some useful output from a script) It works when invoking it with sudo /etc/init.d/nexus start but fails when using sudo service nexus start I have run the update-rc.d command on it, and done everything according to instructions. The nexus init.d-script has a point where it calls itself when it detects that it should run as another user ('nexus'): su -m $RUN_AS_USER -c "\"$REALPATH\" $2" which expands to su -m nexus -c '"/opt/nexus-2.0.2/bin/jsw/linux-x86-64/nexus" start' when adding the -x debug flag to the script. This command results in return code 1. It never executes - I've set -x debug flag on the script, placed echo commands with redirect to file at the start of script to trace, etc. I cannot get any output telling me why the command will not execute. I've tried appending redirect to file after the above script line, inside the quotes, outside, any way I could imagine. All info I can get is by inserting a line echo $? after the su line, which outputs '1'. Is there a way I can see what happens when the su command runs?

    Read the article

  • Run Java Application as a Service

    - by Jason
    I would like to run a Java application as a service. Unfortunately, I am limited in that I can't use something like the Java Service Wrapper (which does appear to be an excellent tool). Is there any way of running an executable JAR, as a service, without relying on external applications? I currently have the service installed, but it fails to start. This is where I am getting stuck and I haven't been able to find anything on Google other than information about the JSW. Thanks.

    Read the article

  • Connection details & timeouts in a java web service client

    - by f1sh
    Hello fellow Coders, I have to implement a webservice client to a given WSDL file. I used the SDK's 'wsimport' tool to create Java classes from the WSDL as well as a class that wrap's the webservice's only method (enhanceAddress(auth, param, address)) into a simple java method. So far, so good. The webservice is functional and returning results correcty. The code looks like this: try { EnhancedAddressList uniservResponse = getWebservicePort().enhanceAddress(m_auth, m_param, uniservAddress); //Where the Port^ is the HTTP Soap 1.2 Endpoint }catch (Throwable e) { throw new AddressValidationException("Error during uniserv webservice request.", e); } The Problem now: I need to get Information about the connection and any error that might occur in order to populate various JMX values (such as COUNT_READ_TIMEOUT, COUNT_CONNECT_TIMEOUT, ...) Unfortunately, the method does not officially throw any Exceptions, so in order to get details about a ConnectException, i need to use getCause() on the ClientTransportException that will be thrown. Even worse: I tried to test the read timeout value, but there is none. I changed the service's location in the wsdl file to post the request to a php script that simply waits forever and does not return. Guess what: The web service client does not time out but waits forever as well (I killed the app after 30+ minutes of waiting). That is not an option for my application as i eventually run out of tcp connections if some of them get 'stuck'. The enhanceAddress(auth, param, address) method is not implemented but annotated with javax.jws.* Annotations, meaning that i cannot see/change/inspect the code that is actually executed. Do i have any option but to throw the whole wsimport/javax.jsw-stuff away and implement my own soap client?

    Read the article

  • Which Java Service or Daemon framework would you recommend?

    - by blwy10
    I have encountered many different ways to turn a Java program into a Windows Service or a *nix daemon, such as Java Service Wrapper, Apache Commons Daemon, and so on. Barring licensing concerns (such as JSW's GPL or pay dual-license), and more advanced features, which one would you recommend? All I intend to do is convert a simple Java program into a service; I don't need anything fancy, just something that runs as a service or a daemon, so I can start it or stop it in the service manager, or it runs for the lifetime of my *nix uptime. EDIT: I've decided to make this community wiki. I didn't start this question with an intention to find an answer for a problem I really had. I was just doing some reading and researching and chanced upon this question, so I was looking for recommendations and the like. Sorry for not doing this sooner or doing this at first. I didn't know what community wiki was for when I first started, and I completely forgot about this question until now. Many thanks for the answers!

    Read the article

1