Web Service Architecture Question

I am a J2EE newbie. I am a certified J2SE developer, but still learing J2EE. I currently have a web-application that monitors a database. The Web application consists of a group of JSPs that create JDBC connections to a database and retrieve information via sql queries.
I would like to make the application more generic so that I use connection pooling and do not have to hide the user name and passwords in the JSPs. I would like to use Enterprise beans to poll the database and the JSPs would simply request the information from the beans to display a table in the webpage.
But like I said I am still pretty new to J2EE and do now know the best way to do this, or if this is even the best way. What technologies should I be using on my simple web application?
Please Help

Since it is a monitoring application that may depend peformance I prefer to avoid Enterprise Java Beans(EJBS) and use a connection pooling freely available from the book "Java Servelts from Marty Hall" and configure your database login info in java property files. Or you can use your application server's connection pooling feature by configuring the jndi data sources and other connection pooling info in the interface provided by your application server.
for more clarity contact me at [email protected],
Ravi.

Similar Messages

  • EJB vs web services - architecture question

    I am about to be involved in architecting a new system that will have a very large amount of business rules. The application will be 3-tiered with the client application being a swing based java desktop application making requests of objects (ejb or other) to a j2ee application server.
    Im rather new to ejb development, having only built sample apps in the past. What im wondering is if there is a way to get around the RMI dependency for communitation between the client app and the server components. this is one reason im considering at least partial use of web services. ive become pretty good with apache soap, xml and seb services todate. however, i also need transaction support and im not sure if web services will do this yet. ive read about some work in this area.
    does anyone know of an (hopefully opensource) implentation of a SOAP-EJB and/or EJB-SOAP implementation layer ?
    The crux of the problem is that i need things like transactions and session management but i would like to communicate via soap and/or xml.

    Ive also seen a few examples of using a servlet as a request dispatcher to service the SOAP requests to EJB's. im just wondering if there was something available that will do this without having to roll my own so to speak. I want to be able to communicate with my ejb's over port 80, but in a secure way.
    Im also anxiously waiting for Apache Geronimo.

  • Web services deployment question

    My employer has a deployment environment typically requiring an application
    to be deployed in a multi-tier architecture (i.e. JSP/Servlets in one
    cluster, EJBs in a second cluster). They do however have this one
    application that requires a combined tier architecture and it is currently
    deployed this way. This application will shortly have a small web services
    layer added to it to support another application that needs information from
    this application.
    The IT staff that manage this environment wants to now create two clusters
    for this application on the same hardware, cluster A would contain the
    original application and be responsible for presentation and cluster two
    would contain the second app plus the web services layer and be responsible
    solely for handling web services. Their reasoning for doing so is that the
    web services are not considered presentation and thus this should be
    logically seperated. This seems strange to me, now your maintaining two
    clusters with identical code bases, doing identical work with the only
    difference being the entry point. There is no scalability advantage to two
    clusters that I can see, just a lot of extra work to create a logical
    seperation that isn't even real.
    Before I go back to them I just want to be sure I'm not missing some obvious
    reason why this would be a good idea.
    Thanks,
    George

    Tim
    You can change this behavior by passing notestconsole to the
    startweblogic.cmd or by setting the testConsoleFlag variable to false in
    the startweblogic.cmd script. Also testconsole is turned off by default for
    all EAR files.
    Please refer to the following document for more information on this
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/reference/commands/cmdStartWebLogicCommand.html
    Regards,
    Raj Alagumalai
    Backline Workshop Support
    "Tim " <[email protected]> wrote in message
    news:3f8af6cc$[email protected]..
    >
    How do you configure Workshop 8.1 to hide the Web Services test page fordeployment.
    This question has been posted and answered, but the answer had to do withediting
    the
    web-service.xml file. Workshop does not deploy a web-service.xml file.

  • Best SOAP Web Services Architecture for E-Commerce

    Hi there,
    I have developed an E-Commerce system following the normal way of
    developing Java web applications (all classes and JSP files in one Eclipse web project).
    I want to modularize the application, I want to split the application into
    two applications:
    1. The core app, with SOAP web services methods
    2. The client (front-end JSP files and some servlets to request/receive responses from the SOAP web services core app)
    Basically, I want the servlets in the client app to call the core SOAP web services app for data such as
    get product by ID, get customer by ID, etc...
    The core SOAP web services app would then return a response in an XML format, which I then
    would map to Java objects at the client application.
    My questions are:
    1. Is this the right way to go?
    2. Where should the session management be? At the client app?
    Hope you can help?
    I have been thinking about a proper architecture for 2 years and honestly it's been giving me sleeping problems.
    Thanks!

    It works. Thanks,
    Ioana
    "Neal Yin" <[email protected]> wrote:
    The error means your EJB is not deployed.
    Adding a EJB module to your application.xml file of the ear should fixe
    it.
    <application>
    <display-name />
    <module>
    <web>
    <web-uri>dox_sdi.war</web-uri>
    </web>
    </module>
    <module>
    <ejb>DocumentService.jar</ejb>
    </module>
    </application>
    "Ioana Meissner" <[email protected]> wrote in message
    news:3cf640cc$[email protected]..
    I have used the following example for my own web service with EJBcomponent and SOAP
    Message Handler Chain:
    http://e-docs.bea.com/wls/docs70/webServices/dd.html#1058208
    I have a deployment error:
    javax.naming.NameNotFoundException: Unable to resolve'app/ejb/DocumentService.j
    ar#DocumentService/home' Resolved: 'app/ejb'Unresolved:'DocumentService.jar#Doc
    umentService' ; remaining name 'DocumentService.jar#DocumentService/home'
    In attachement is the ear file.
    Is there a problem in web-services.xml?
    Thanks

  • Web Service Security Question

    I have created a web service in the NetWeaver portal using a Portal Service.  I have marked the service as requiring basic http authentication.  However, when I call the web service from the Enterprise Portal Web Services Checker in NWDS it just let's me supply the params of the web service and no authentication.  Any ideas?
    I also noticed that my web service does not appear under the Web Services Container or Web Services Security section in Visual Administrator.  Anybody have any idea why this is?
    Thanks in advance.
    Curtis

    Hi Curtis,
    My guess is that since you are logged into the Portal while calling this web service, it will use the current session cookie to authenticate automatically. I'm not sure on the second question, tried a restart?
    Regards,
    Raj

  • Web Services General Question

    Hi All,
    Does web services in Java mean to simply provide a SOAP container that wraps around an EJB (or even a web container)?
    If this is true, all of the work that's been done with the development of EJBs can be preserved, and other system will make calls to the SOAP container in order to get access to the web services provided.
    I'm trying to understand the big picture and slowly get into Web Services in Java.
    Thanks

    I don�t know if this answers your question, but I think that SOAP indeed can be used to expose existing EJB�s to non-Java-Systems.

  • Securing Web Service--Beginner question

    Hi--
    I am trying to follow the document "Securing WelbLogic Web Service 10g Release 3" and can't get past the initial steps to verify that my service has been deployed with the Wssp1.2-2007-Wss1.1-UsernameToken-Plain-X509-Basic256.xml policy
    I have a basic question.
    I add the aforementioned policy to my web service using :
    *@WebService*
    *@Policy(uri = "policy:Wssp1.2-2007-Wss1.1-UsernameToken-Plain-X509-Basic256.xml",attachToWsdl=true)*
    and then rebuild and redeploy.
    If I then access the URL for the web service with "?wsdl" apppended, shouldn't the WSDL returned now include policy information?
    Karl

    Thanks, that's what I've come to understand. Is this restiction due to the fact the the @Policy annotations are not standard or is this a limitation on the Weblogic eclipse plugin
    What I've had to due is generate the JWS from the WSDL and then go back to the bottom up approach with the generated JWS source files. A bit of a pain but what can you do.
    I tried adding the security policies as suggested by Bethune but they don't seem to "stick" after a restart of weblogic server. This may be due to running weblogic server under Eclipse. I havent had time to investigate this further
    Once again thanks all for the help
    Karl

  • Web Service/ JDBC question

    Hi,
    I have to design an automatic -and periodic- process that performs next tasks:
    1) Read Oracle table to build a XML file
    2) Connect with a Web Service and send the XML. (In the specification says that SOAP with attachments is not supported , so we have to use a "proxy J2EE client" to interact with this web service)
    3) Also this web service uses security sign with a X.509 v3 certificate in BASE64, which must be passed as a 'string' parameter when is invoked.
    I'm new in these subjects, and I need some help, my questions:
    1) Is it possible to define an automatic process with JDEVELOPER that connects to the DB, build the XML file and invoke the Web service?
    2) How could I make this proccess automatic and periodic, for example every friday.
    3) What are the tools I have to use:
    3.1.- To Connect with DB -> JDBC?
    3.2.- To Build XML, programmatically? or is there any tool?
    3.3.- To define it as a periodic proccess??
    4) Others alternatives? Is it possible to develope this directly in PL/SQL as a job in ORACLE?
    thanks in advance...

    This is what we call "Database Web Services" covered in chapter 15 of my book http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html
    See also
    a) Oracle Application Server Web Services Developer’s Guide 10g Release 3 (10.1.3.x) for a complete coverage of Oracle AS Web Services Security.
    b) Calling External Web services from stored procedure (it contains an example of batch scheduling for call-out but you are looking for call-in): http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html
    Kuassi

  • Web service simple question

    I am using a Web Service to publish some data, and this question is, I'm sure, stemming from my limited knowledge and use of web servers.
    I am able to set up an "add" method, pass 2 numbers to the web server, and have the web server return a value. Simple. But, I am not sure what to do when I want to get the current value of something that is being updated in a loop.
    For example, let's say I have a VI like the one below, and the user wants to display the current loop iteration in their browser, not continuously, but only when they ask for it. I don't want to use this VI as the method to call. Instead, I'd rather this VI pass the current value to a VI designated only to return the numeric control value to the webserver. But, I have no idea how (or if) I can pass the iteration value to a method to be called. Does this make sense?
    I have thought about using session variables, but this requires continually writing to the session variable in my code, which probably isn't a big deal, but it would be nice if it only queried the current iteration when the user asked for it (much like 2 numbers are only added when the user asks for it in the NI example). I'm looking for a way to just return the current value, only when the user asks for it. 
    CLA, LabVIEW Versions 2010-2013
    Solved!
    Go to Solution.
    Attachments:
    loop.png ‏14 KB

    You'll probably want to go through more LabVIEW basics before trying this, or consider another means of communication between your VIs such as shared variables.
    A functional global variable is a VI that stores data in an uninitialized shift register.  The simplest implementation has a boolean input indicating whether to read or write, an input for data (when writing), and an output for data (when reading).  Search this forum for more information.  You will also see the term "Action Engine" which is a more sophisticated version of a functional global that implements additional actions that manipulate the data.
    The LabVIEW web server runs in its own application instance - almost a separate program.  That means it cannot directly share data with the application that hosts the web server.  VI Server is a mechanism to allow one LabVIEW instance to access VIs in another instance.  In your main program, you would store the data in a functional global variable.  In the web server, use VI Server to get access to the same functional global.  You can then run that VI remotely, within the web server instance, and read data from it.  See the help and examples for VI Server.

  • Web service basic question

    Well I am new to web services. I have a small doubt. We are trying to develop a tool which uses web service that standards the communication between my tool and different surveillance
    systems.
    What my tools should do is, it needs to get data from different surveillance
    system using common API.
    My first question is
    1) Should I implement a web service or a client. I guess the answer should be, implement a client. if so, should I make my WSDL public and tell them and if you want to provide me the data you have implement a web service definition corresponding to my client. I am a bit confused here. So pleeeeeeeease help. I need to submit my design to my professor by the end of the week.

    If your tool needs to be called from the surveillance systems, you could publish a web service and give the wsdl to the various surveilance systems. Then when they need to contact you they can invoke your web service.

  • Java web services basic question

    Hi all,
    I'm new to web services programming, and I'm having trouble getting my head around a few conceptual ideas about web services. I'm in a graduate class right now where our project needs to use web services to create a distributed system. We're using Axis2 and jUDDI for development.
    In terms of distributed systems, I am a CORBA programmer, and so when I'm given a problem, my mind immediately goes to how I would implement it in CORBA. Web services seem similar (the WSDL is like an IDL, an jUDDI is like the CORBA naming service, etc) but I'm having difficulty figuring out how to instantiate two (or more) web services that implement the same interface.
    From the simple 'hello, world' web services I've done, I have created a java class, compiled it, packaged it into a .aar, and deployed tye aar using Axis2 on Tomcat, my application server (which somehow creates the WSDL file - I'm not exactly sure how that happens either). From there, it's simple to write a client to connect to the web service, which seems to always be running in the application server.
    Now, for the system I'm working on, we need to have multiple 'instances' of a service. For example (note this isn't the actual project assignment), say there is a 'GPS_Service' web service with a simple interface with two methods: getLocation(), and setLocation(point p). In my 'application', I want to deploy 15 'instances' of GPS_Service, and set and view their location independently.
    Here's where my lack of knowledge hurts. From my point of view, I would need 15 different java classes (i.e. GPS_Service0, GPS_Service1, etc) and 15 different .aar files. Each .aar file would go into the application server, and I would access each service at a different web address.
    In CORBA, this is much easier. Classes implement a CORBA interface, and your 'main' method can instantiate as many 'GPS_Service' objects as it wants. This seems to be because CORBA doesn't have an 'application' server where the object is always running.
    Does anyone have any suggestions for me, or does anyone have an example of what I'm trying to do?
    Thanks,
    Eric

    I forgot to answer your question.
    You have to consume the webservice :
    http://gerardnico.com/wiki/ide/eclipse/eclipse_how_to_consume_a_webservice_with_wtp
    It will create for you the package
    com.siebel.analytics.web.soap.v5
    See my example. I think it's enough complete.
    Success
    Nico

  • Java Web Services Newbie Questions

    I have some questions concerning developing Web Services in java. I understand the basic technology and concepts, but am not familiar with the available Java pieces to accomplish what I need to.
    1. What application do I need to service a Web Service? I would prefer to run apache (running on an AS/400). Can apache do this? What in addition to apache (plug-in?) do I need to service the Web Service?
    2. What application (plug-in?) do I need to provide the UDDI lookup for my Web Services? Again, I would prefer to do this in apache. Do I need a plug-in, etc.
    3. Is there an IDE or package that will make creating the Web Service easier. I am currently using Eclipse for some other java work, so it would be nice if this IDE would work well for this. I am hoping for some plug-in that will make it easy for me to provide a method prototype, and the WSDL and perhaps client proxy classes get generated from this?
    4. How should I create my WSDL? (this may be answered by the previous question)
    5. How should I create the client proxy classes? (this may be answered by the previous question)
    6. Anything else (tools, API's, plug-ins) I need to know how to make this happen quickly. I need to implement a couple web services in just a few weeks.
    Thanks.

    1. There are 3 ways i can think of:
    a. J2EE 1.4 App Server (e.g., 1.4 Beta 2 from Sun)
    b. JWSDP
    c. 1.3 IDE with Web Services support (WebShere, Sun One...)
    2. You need to register with a public registry, such as those by IBM, Microsoft, etc.
    3. Partly answered in 1... I prefer working with 1.4, because that is a new standard coming up, so no serious changes will be needed later.
    WSDL and stubs/ties are generated for you by tools like wscompile, but you do have to code the client itself :)
    4. wscompile, etc. can be invoked by tools like ant based on your build file, or by IDE.
    5. Automatically done...
    6. I think i covered the tools above. For the rest, I'd recommend going through J2EE 1.4 Tutorial, or cases like those provided by some IDEs.
    HTH,
    Reshat.

  • Adobe Interactive Form / Web Service - Connection question

    Hi
    We have CRM 2007 and want to use Adobe Interactive forms for our sales managers to upload customer information when they're out in the field. Before they leave all information about the customer will be downloaded to an Adobe Interactive Form. The client sees the customer and then enters the information required to e.g. create a sales order. He has an Internet connection but is not neccessarily logged into CRM 2007. He is a registered user in CRM 2007.
    My question is: if we create the web services to send and receive data to the CRM 2007 system, does the sales manager have to be online and signed into the CRM system to upload the Adobe Interactive Forms back to the server, or does the web service handle this?
    Kind regards
    Declan

    Hello Declan,
    You can send the information captured in an SAP Interactive Form by Adobe to your CRM system in two ways based on the way in which your form is designed -
    1] By making a direct web service call : A typical use case is that the user fills out all the necessary fields in the form and simply clicks a submit button; on clicking, the particular web service is called and the input data is transferred to SAP CRM. It should be noted that the web service authorizations should be in place to enable this kind of usage.
    2] By utilizing SAP CRM via Email scenario : A typical use case here would be that the user fills out all the necessary fields in the form and simply clicks a submit via email button; on clicking, an email is composed with all the form input infomration added as an attachment. The user can then send this email to the SAP CRM system. It should be noted that SAP CRM via Email application should be setup on the SAP CRM system and the particular SAP CRM via Email service & web service should have proper authorizations.
    An interesting point to note here is that while scenario 1] would require the user to have just internet access for this to work, scenario 2] could work in a fashion such that if the user isn't having internet access, he/she could still fill out the forms thereby creating emails which would then reside in the outbox of the user's email client. Once the user is having internet acces, the email client would send these emails automatically, thereby achieving a different flavour of "offline functionality".
    Hope this info helps!
    Best regards,
    Sandeep.

  • A web service design question

    Hello,
    I�d like to ask for your help in the following design issue:
    I need to create an email sending web service (with Axis). Only just one method which returns with an integer return code. This handles the following:
    - based on the given parameters gets the email addresses from an
    LDAP server (with netscape ldap for java)
    -     makes a cache from them (only after a timeout period will be the cache
    refreshed) (don�t know what tool to use for this)
    -     selects html templates which to be sent based on the given parameters
    -     sends emails with the appropriate templates (with Velocity)
    -     the whole process is logged (with log4j)
    I have to write the code as generic as possible. I know that some design pattern should be used for this. (some from GoF , and I know there exists design patterns specially created for web services as well).
    Could you enumerate me which patterns (and for what part of the program) would be the best choice to solve this problem? I have read through some books about patterns, but don�t have the knowledge to pick up the right one for a concrete problem like this..
    Thank you in advance,
    nagybaly

    This sounds like a known issue which is tracked in ADAPT01103681. Code from a .NET DataProvider is executed twice if the provider has input parameters.
    At this time there's no known solution for this. This was submitted to the development team and a fix is expected in Service Pack 2. At this time we have not announced a release date for SP2.
    Edited by: David Hilton on Jun 18, 2009 3:02 PM
    Corrected spelling.

  • Simple web service authentication question

    I'm using the application server included with Sun ONE Identity Server 6.1 (and Apache Axis) to deploy a very simple sample web service. Accessing it from a web browser works fine. (After entering the url to my service, I'm redirected to the authentication page. After authenticating, my service is executed as expected.)
    The problem comes when I attempt to execute this same web service from a Java application (using Apache Axis). I authenticate programmatically and have a valid SSOToken. How do I pass my authentication information along to the IS server when invoking the web service programmatically? Can I do this somehow with the SSOToken I have? Every time I invoke the service programmatically, a "(302)Moved Temporarily" HTML response is received.
    Thanks for your help.
    David

    This solved the problem for me (using Axis):
         call.setProperty(org.apache.axis.transport.http.HTTPConstants.HEADER_COOKIE,
                          "iPlanetDirectoryPro=" + token.getTokenID().toString());
         call.setMaintainSession(true);Hope this helps.

Maybe you are looking for

  • How can i delete an apple id account?

    I have 2 apple id's. I no longer need 2. How can i delete an apple id? is it possible? or just stop using it and deleting all my info...? thanks!

  • Can't download songs to ipod and can't restore it

    This morning my new 30 GB ipod (it has 3 weeks and only used ir a few times)was working fine with itunes installed on my Dell Inspiron 600m running on Windows XP. When I triend to dowload new songs to it I got this message:"Attempting to Copy to the

  • Ipad mini screen flickers

    My screen is conti uously flickerring have reset as well butnot solved. Pls guide.

  • Basic Excise Duty + VAT and Basic Excise Duty + CST in Indian Scenario

    Friends, How weu2019ll manage Basic Excise Duty + VAT and Basic Excise Duty + CST in Indian Scenario. Thanks Expert, Sukhjinder Singh

  • Where are Keywords stored in Bridge?

    I am going to have to reload my computer from scratch, reinstalling all of the programs I need on a new hard drive.  Nevermind why, it is necessary. However, I have an extensive collection of images all of which were given keywords in Bridge.  If you