JUNIT USING AT SERVER SIDE

Hi,
i hava one dought
regarding JUNIT
it is testing client programs.
how to test Server side programs
plz send any information on this JUNIT testing on server side

JUnit is doing unit tests, regardless of client or server. You seem to want to do integration tests or system tests.

Similar Messages

  • Accessing LCDS Persistence Layer for use in Server-Side Business Logic

    Within server-side business logic, I want to be able to get a persisted object from LCDS, manipulate  that object, and then use LCDS to persist those changes to the database  as well as send those changes to the client.
    Is it possible to access LCDS' persistence layer (Hibernate) to be used by server-side business logic?
    I have attempted to use DataServiceTransaction.getItem(...).  However, for objects that contain a collection of other objects I get this error:
    [LCDS] Runtime exception while trying to fetch a property from hibernate: flex.data.DataServiceException: There is no current message broker to return.
    When calling DataServiceTransaction.updateItem(...) for objects that contain a collection of other objects, I get this error:
    org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.sd.pojo.Book.chapters, no session or session was closed
    Also, it appears that DataServiceTransaction.updateItem does NOT update the database?
    I have resorted to building my own Hibernate SessionFactory, but that seems unnecessary.
    One other piece of information is that I am using the Fiber modeling tool to build and deploy the model to the server.  I am generating the Java classes with Fiber and making them available to be used on the server.
    Thanks,
    Collin

    Thanks for the help guys.
    I guess what I'm really trying to get straight in my own mind is whether supporting interraction and control of eJB database interraction is still using the same functionality as having a stand alone app interracting with a db.
    I'm thinking about; the implications of using eJBs specific query language and the different way in which eJBs use db connections (either for the period of their lifetime or just for the duration of one interaction) compared with a stand alone app, which would maintain a connection to the database(s) while it is open.
    Connection pooling and caching of DB objects is often quoted as being a middle tier activity, but what does this mean when all 3 tiers reside on the same machine?
    Once again thanks for your comments and advice.
    Mark

  • FMS 3.5 - How to use remoting Server Side

    I am very interested in using Remoting in order to connect to a Drupal AMFPHP service module.  On the client side this is easily done and I have had limited success on the Server side, but a good guide on how to do this properly and be able to get the data being returned would be great.
    Thanks,
    Chris
    ChrisMcIntoshDesigns.com

    I don't know if Drupal's AMFPHP implementation is any different than a straight install of AMFPHP, but this article should help to get you started:
    http://www.sephiroth.it/tutorials/flashPHP/flashcomm_AMFPHP/index.php

  • What language should I use if I am a beginner to using SSI (server side includes)?

    I want to start using server side includes and understand how to also code them by hand.  What is the easiest way to begin?  Do I just php?
    -Kate

    First question you need to ask your Host is if they support server-side includes and which document extensions you can use.
    Common extensions:
    .shtml, .shtm, .php, .asp, .cf.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics |  Print | Media Specialists
    www.alt-web.com/
    www.twitter.com/altweb

  • Using a server side package to copy and delete flat files.

    Can anyone tell me if it is possible to copy or delete flat files using comands issued from within a PL/SQL program unit on the server. I know of the package UTL_FILE for the reading and writing of flat files.

    Malcolm,
    if you use 8i, you can create a Java class to do that for you, and call one of it's metohds from PL/SQL, see http://www.oracle.com/oramag/oracle/00-Mar/o20java.html
    null

  • Spry accordion widget - SSI (server side include) as content in the panel

    After having inserted the following command <!--# include file = "content2.asp" -> in the accordion Panel Content I get an error in Dreamweaver - every time I open the file. See the error in the attached picture.
    Once all files are uploaded to the server it works apparently without problems or script errors.
    Is there anyone who can help me to use SSI "server side include" as content in accordion panels?

    Thanks for your reply.
    The fault lay in the SSI file. This file contained these tag:
    </ html>
    And of course the tag </ html> generate an error if the tag is inserted in the content of the accordion panel via ssi file.

  • Server side rule filtering and message colorization

    I've been using server side rule filtering (Sieve) to handle all my mail filtering, mainly because I don't have a .Mac account and I have multiple machines that I access my mail from. This setup works really well except I have not been able to figure out how to color a message.
    I've searched and read through emails, but I haven't seen anything else about this problem. I even found a message that had been colorized by Mail's Junk filter, and found that Mail adds an additional mime part onto the message which is a property list that specifies the color of the message.
    What I really want is some way that I can set a header on my message, which Mail will see and apply that color to the message when it caches it on my Mac. A lot of my messages get moved to specific folders, but I still want to colorize them, and as far as I've seen, Mail's rules only work on messages that end up in the INBOX.
    Although I fear that its not possibly, I figured I'd ask for help if anyone has encountered similar problem and solved it.
    -d

    The IMAP-protocol (I suppose that's the one you use, otherwise server side mail filtering won't be visible in Mail.app) does not have any mechanism to transmit colorization information to the client. You have to set up these manually on each client.

  • Write to text file without server side

    Hi,
    I need to write data into a text file for saving data from my
    flash movie, but I didn't have the possibility to use a
    server-side.
    Because my flash movies are stored on a CD and it must be
    compatible with Windows and MacOS.
    Is it possible to write data into a text file?
    If no, can I use a third party software? Which one?
    Regards
    YamNet

    A SharedObject might work for you. Otherwise, you'll need a
    'wrapper' app.
    Adobe's own Director works very well for this, and AIR would
    work as well.
    There are also a good number of 3rd party apps, such as Zinc
    and others.
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Server Side Includes

    I would like to create a website that allows the business owner to post information by simply updating a Word or Excel document and uploading it to the server.  I'm using a Server Side Include to bring in the .doc and .xls files.  It kind of works... I can see the data from these files, but the formatting is crazy and includes a bunch of extra characters.  I've set the extension as .shtml and selected "virtual" for the Apache server.
    I've searched the forums for an answer, but it doesn't look as this has been addressed.  Thanks in advance for you time!

    Ah, very good point.  I've actually tried that with some sample text and it shows up fine in my browser, but I had assumed that creating a page in Word or Excel wouldn't allow for the same level of functionality and aesthetic that I've created with the original page in Dreamweaver.  I will go ahead and play with Word to see what can be achieved.  Thanks and sorry for the newbie question!

  • Server Side Includes with Server Behaviors

    Is it possible to include pages that have server behaviors attached to them, or are these behaviors limited to pulling in just plain html from the included pages?
    For example, I want two pages, index.php and login.php.
    I want the login.php page to have all of the user login behaviors/links/fields/buttons/etc. and then Include that on the index.php page. Am I supposed to be able to do this using ADDT server side includes?
    I've been successful using server side includes to include static text on a page, but not dynamic content with behaviors attached. I'm not sure if I'm just have a mistake, or if this won't work in the first place.
    thanks!

    Hi,
    this is generally possible, as the included files sure can have their own server hehaviours -- did that several times, where the "container" page had about no server behaviours embedded, but the included file did.
    ADDT´s server side includes will, loosely said, basically just "dynamically" strip the included document´s "head", but leave other components like server behaviours untouched
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Server-side includes not working

    Running CF9.x on Apache 2.2 Win 7.
    I inherited an older html multiple page site that we are breaking down into includes using html server-side includes:
    e.g. <!--#include file="includes/sidebar.html" -->,  and saving the page as a .html file, which is then <cfincluded> in a .cfm file.
    Is there a way to get <!--#include file="includes/sidebar.html" --> include working on a CF page? All I see is the contents of the page, but none of the sidebar.html, or header.html, etc.
    I know I could switch to cfincludes, but the boss LOVES to muck around with the html side of things.
    TIA,
    Doug

    I know I could switch to cfincludes, but the boss LOVES to muck around with the html side of things.
    All the more reason to do it, surely?
    But anyway...
    I've never used a server-side include, but it looks to me that they just load the file and return it at that position in the document.
    For CF code to be executed, the file needs to be REQUESTED, so it won't be a starter with server-side includes.
    Adam

  • JNI via Server-Side Language

    I'd like to use the following post as a reference: http://72.5.124.102/thread.jspa?threadID=788137&messageID=4479784
    "The DLL will remain loaded between calls, so if you use a global variable to store the connection then it should be ok. "
    Of course this makes logical sense. However, JNI doesn't have a handle from my understanding... JNI looks like this:
    private native void nativeMethodInvoke();
    static {
        System.load(path+dllName) // many alts to this, but yea.
    // somewhere in main thread....
    SelfClass varRefToSelf=new SelfClass();
    // where SelfClass is the current class running.
    // This doesn't make sense to me, considering usage of 'this' - so if anyone can explain that, I would greatly appreciate it.
    varRefToSelf.nativeMethodInvoke();So.... am I supposed to keep a global reference within my class, to itself?!?
    The actual problem is that I'm using a server-side language to invoke Java, and thus C++ via JNI. However, the server-side language is creating a new instance of the JAR upon each invocation. So my plan was to pass a reference to the module handle, and somehow manage to get that back to server-side language, and then furthermore back to Java JNI. Am thinking about moving to a servlet instead, since this doesn't appear to be possible - as unfortunate as that is.
    Would SingleThreadModel work in this case? Or should I have C++ thread itself, so when Java makes a call, I can let C++ handle data by forwarding to correct module in memory? Assuming the above mentioned post is accurate, then the DLL, when loaded by Java, will stay in memory until unloaded. If the jvm is exiting after each server-side invocation, I must assume multiple instances of the dll are being created. So, am thinking this prospect will work... servlets aside...
    Any help is appreciated. I clearly do not understand JNI as well as I should.
    *Edit:
    I have already tried this, and found that C++ DLL's thread is definitely active in memory post-jvm exit. The DLL also appears to be loaded multiple times, as the data I'm dealing with appears to be unique, in that it's not "stepping into itself" and overwriting pointers, or anything.
    Am I going to have to create an instance of my class, via itself, to launch itself in the jvm manually - to keep the reference to dll in memory?
    Although that statement sounds terribly redundant... I believe it's accurate...
    1.) Create instance of class that's called by server-side, launch it under new jvm
    2.) Have orig class return to server-side as normal, and forward any new requests to the jvm-launched "self"; based on detection of class/jvm in memory...
    For being cross-platform "magical", Java sure makes it difficult to perform pretty basic tasks....

    Thanks for the great information jschell, this clears up alot. I'll play around with these new prospects and see if I can get this running properly.
    Also, let me define more what I'm actually doing.
    I'm using Railo, and a CFX "tag" to invoke a JAR. This Jar contains the JNI to execute a DLL's code. This dll's code is merely in place to perform some server tasks - mostly routine file maintenance, and checks to ensure normal operation. Some of this includes db queries. Yes this can be done in Java for the most part, but we plan to use the DLL exports later in a deployment scenario.
    So, "Did you mean it is loading the jar each time?", I do believe so. However, the instances appear to be different. If i were to create a thread within the JNI invoking class, which i have tried by the way, and create a global variable with some value, the second calling of the JAR file reports that it has not been defined yet on class initialization. Additionally, the thread I mentioned also halts, and does not exist within the second calling.
    Let me show some actual code...
    Test.cfm...
    <cfx_mytag Library="myLibrary.dll" task="function1">
    <cfscript>
    ... // do some stuff.
    </cfscript>If I were to alter that to:
    <cfx_mytag Library="myLibrary.dll" task="function1">
    <cfx_mytag Library="myLibrary.dll" task="function2">
    <cfscript>
    ... // do some stuff.
    </cfscript>I found that function2 in the same JAR, loaded via "cfx_mytag", reports inexistance of function1's execution - which registered a value into a global var.
    This is why I must assume that the JAR is being loaded independantly - each time. Correct me if wrong. Perhaps my terminology is off - the class within the jar file is multi-instanced, as far as I can tell. Or rather... Railo is creating mutliple instances of this class - and thus I lose my handle to my dll - every call... Seemingly at least.
    //Java...
    import com.allaire.cfx.*;
    public final class myClass implements CustomTag {
         private Request req;
         private Response res;
            public boolean igetresetoften;
         private native void gogoGadgetDLL();
         public myClass() {
        public void processRequest(Request request,Response response) throws Exception {
             this.req=request;this.res=response;
              if (!this.igetresetoften) {
                     igetresetoften=true;
                     res.write("yea... this is annoying");
                // in actual code - function1() assigns global var.
                // and function2() reports to response buffer the value of the global var , which is constantly false each run.
    }Notice the similarity to a servlet (request/response buffers). I've dealt with servlets, so I know that all requests are threaded.. but the global vars in a servlet are, in fact, ... global. Not in this case, it would seem.
    Thanks again, I'll let you know of my results, late tonight.
    Edited by: jSD7 on Nov 13, 2009 4:20 PM

  • NetStream.Play.InsufficientBW when streaming server side playlist

    Hi
    I am streaming pre recorded audio files (mp4) to an AIR client. I have tried two different solutions,
    streaming the file directly with the NetStream.play("mp4:xxxxx.m4a") and creating a server side playlist, adding the
    same sound clip and then streaming the playlist. The problem is, when streaming the playlist i get a few NetStream.Play.InsufficientBW, this does not happen when streaming the file direct. Both solutions uses bufferTime=1.0
    I would like to use a server side playlist to implement a simple key solution so that the client dont know the full path to
    the file, but instead sends a key to a custom server side function that looks up the file path and creates a stream for the client.
    TIA
    Ruben Chadien
    FMS 4.0(linux)

    Subscribing via playlist and playing file directly are two different things , as first one is live mode of play while other is playing recorded file - so the way streams are delivered are also quite different. Can you try setting higher buffer and see if that helps or if you don't want to set higher buffer, see if disabling AggregateMessages (you will find the tag in Application.xml under Live/Queue) helps

  • Get client Id on server side.

    Hi,
    I hace a scenario where there are 4 dynamic regions where taskFlows circulate at runtime. The problem is that I have a pageFragment in on off the taskFlow which includes a pie chart. This pie chart needs to exported as image when a button is clicked inside the pageFragment. This requires the clientId (relative to the region currently occupied) of the pieChart component to be used in server side as
    FacesContext fctx = FacesContext.getCurrentInstance();
    UIViewRoot root = fctx.getViewRoot();
    root.invokeOnComponent(fctx,*clientId*,new DvtContextCallBack());
    Is this possible somehow to get the clientId in sever side to do the above operation dynamically ?
    Regards,
    Vijai

    Bump I found the solution myself,
    UIComponent copm = findComponentInRoot("pieGraph1");
    System.out.println(copm.getClientId(facesContext));
    * Locate an UIComponent in view root with its component id. Use a recursive way to achieve this.
    * @param id UIComponent id
    * @return UIComponent object
    public static UIComponent findComponentInRoot(String id) {
    UIComponent component = null;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
    UIComponent root = facesContext.getViewRoot();
    component = findComponent(root, id);
    return component;
    * Locate an UIComponent from its root component.
    * Taken from http://www.jroller.com/page/mert?entry=how_to_find_a_uicomponent
    * @param base root Component (parent)
    * @param id UIComponent id
    * @return UIComponent object
    public static UIComponent findComponent(UIComponent base, String id) {
    if (id.equals(base.getId()))
    return base;
    UIComponent children = null;
    UIComponent result = null;
    Iterator childrens = base.getFacetsAndChildren();
    while (childrens.hasNext() && (result == null)) {
    children = (UIComponent)childrens.next();
    if (id.equals(children.getId())) {
    result = children;
    break;
    result = findComponent(children, id);
    if (result != null) {
    break;
    return result;
    }

  • Server side rule and procCall - only in es_mail schema

    I am trying to call procedures in the procCall tag of a server side rule, but I cannot make it work for procedures that are not in the es_mail schema.
    I tried creating synonyms and I am dead sure my grants are correct, but as soon as I add a schema name in front of the call it stops working.
    Is this correct, people of Oracle, and why?
    Wendy

    The IMAP-protocol (I suppose that's the one you use, otherwise server side mail filtering won't be visible in Mail.app) does not have any mechanism to transmit colorization information to the client. You have to set up these manually on each client.

Maybe you are looking for

  • Error while running application with Tomcat 5.0

    Hi, I am trying to run my application on Tomcat 5.0. I have java environment version 1.4 I am getting the following error during the server start up : Mar 30, 2007 3:51:03 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP

  • One Computer No Longer Recgonizes My Toshiba Canvio Portable 500 GB Hard Drive

    Hello. I have a Toshiba Canvio Portable 500 GB Hard Drive. I used it to back up my files on my main computer and connected it to that computer every now and again to download more files. Suddenly, it stopped being recognized by my main computer a whi

  • Cannot launch Photoshop, no error message

    I have been using Photoshop Elements 7 for many years, but all of a sudden today it will no longer work.  The first time it launched as normal, and I clicked the "edit" option to open the editor.  But the editor never opened, and now no matter how ma

  • Synaptics clickpad: Can't rest finger on button area and move pointer

    I have a new laptop with a clickpad touchpad.  I don't like tap to click, so I've disabled that.  I'm trying to get the bottom clickpad area of the touchpad to behave as close to standalone buttons as possible.  On my old laptop I developed a habit o

  • Pages resizing my doc

    Pages is resizing my document when I try to print or convert to PDF.  It is CLEARLY an 8.5 x 11 document but tries to print like a tabloid.  I have already chosen US Letter as my paper size.  This is the ONLY document that is doing this.  It is 70 pa