Using @webserviceref annotation

Hi,
I'm using webServiceRef annotation accessing a web service.
It is working if you supply a wsdl located under web service client project.
I mean you need to copy service wsdl and mapping under meta-inf of current client project and reference this wsdl as an attribute.
Such as
@WebServiceRef(name="DepartmentService",wsdlLocation="META-INF/DepartmentServiceInterfaceService.wsdl")
I will deploy this client project to same server with the service itself. So isn't that better to point the published service wsdl as url, and not to copy wsdl under client project...
isn't that the way it should be as jax-ws?
Any Comments?

we're using soasuite10.1.3.1.
(if we have to supply the wsdl under project, what would be the best approach then?
i mean suppose that you have many web services published, for each client project even that would be deployed and run on the same server instance, you have to copy each wsdl and mapping.
Can't we produce an jar archieve contains all wsdls and mappings and we reference this jar from each client project. At least we would be copying the same jar to all clients.)

Similar Messages

  • Message-Driven Bean using @Resource annotation

    I am trying to run a Message-Driven Bean very simple example in https://glassfish.dev.java.net/javaee5/ejb/examples/MDB.html
    I configured MDBQueueConnectionFactory and MDBQueue properly on glassfish admin console.
    I cannot run the example using @Resource annotation. I don't understand why.
    @Resource(mappedName="MDBQueueConnectionFactory")
    private static QueueConnectionFactory queueCF;
    @Resource(mappedName="MDBQueue")
    private static Queue mdbQueue;But I can run this example modifying the source code using InitialContext instance and looking up for JMS Resources.
    InitialContext ctx = new InitialContext();
    QueueConnectionFactory queueCF=(QueueConnectionFactory)ctx.lookup("MDBQueueConnectionFactory");
    QueueConnection queueCon = queueCF.createQueueConnection();
    Queue mdbQueue=(Queue)ctx.lookup("MDB");
    queueSender.send(mdbQueue, msg);
    ...I want to figure out why @Resource annotation do not work well. Any help?
    Thanks in advanced any help.

    Thanks for your reply.
    The error that I get is a simple NullPointerException. Nothing else.
    Like you said, I develop a servlet and I can use @Resource annotation without static reference, and it works.
    public class TestMDB extends HttpServlet {
         private static final long serialVersionUID = 1L;
         @Resource(mappedName="MDBQueueConnectionFactory")
         private QueueConnectionFactory queueCF;
         @Resource(mappedName="MDB")
         private Queue mdbQueue;
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              PrintWriter out = response.getWriter();
              out.println("TEST MDB "+queueCF);
              QueueConnection queueCon;
              try {
                   queueCon = queueCF.createQueueConnection();
                   QueueSession queueSession = queueCon.createQueueSession
                   (false, Session.AUTO_ACKNOWLEDGE);
                   QueueSender queueSender = queueSession.createSender(null);
                   TextMessage msg = queueSession.createTextMessage("hello");
                   queueSender.send(mdbQueue, msg);
                   out.println("Sent message to MDB");
                   queueCon.close();
              } catch (JMSException e) {
                   e.printStackTrace();
    }But my question were about using @Resource annotation on a standalone client. I always get NullPointerException.
    public class MDBClient {
        @Resource(mappedName="MDBQueueConnectionFactory")
        private static QueueConnectionFactory queueCF;
        @Resource(mappedName="MDB")
        private static Queue mdbQueue;
        public static void main(String args[]) {
         try {
                QueueConnection queueCon = queueCF.createQueueConnection();
                QueueSession queueSession = queueCon.createQueueSession
                    (false, Session.AUTO_ACKNOWLEDGE);
                QueueSender queueSender = queueSession.createSender(null);
                TextMessage msg = queueSession.createTextMessage("hello");
                queueSender.send(mdbQueue, msg);
                System.out.println("Sent message to MDB");
                queueCon.close();
            } catch(Exception e) {
                e.printStackTrace();
    }

  • Editing Pdfs using the Annotations and Drawing Markups

    I regularly use the Annotations and Drawing markups on Pdfs on Mac to edit, but since updating to Adobe Reader 11 everything has gone haywire. The Pdf freezes constantly. Although I can still edit on screen, none of the Markup shows in the toolbar so I can't use it to review or navigate around the Pdf. I can't delete the Pop-ups or markup by right clicking as usual. The Save button in the top toolbar doesn't work - I have to go to the Drop down menu, which takes longer. It's impossible to close any Pdfs by clicking the red top left button - I have to go to the Drop down menu to close. It's hopeless! Any suggestions?

    I have Adobe Reader XI version 11.0.9 and Mac OS X version 10.6.8. I wonder now if I have the right version ...

  • Advantage(s) of using Metadata(Annotations)

    What are the advantages of using Metadata(Annotations) and why????
    Help me to understand PLZ.

    g o o g l e

  • WebServiceRef annotation does nothing

    Okay so I've followed all the examples and I can't figure this out....
    I'm trying to consume a web service that I've already deployed - it works 100%.
    So, I follow the example in the JWSDP tutorial and do something like this in my class:
    class MyClass {
    @WebServiceRef(wsdlFile=http://blah?wsdl)
    static MyService service = null;
    Problem is, service is always NULL! But there are never any exceptions thrown before hand so I can't tell what's going on - seems like the service object is never being created...
    Now when I try something like this:
    MyService service = new MyService(new URL("http://localhost:8080/Team12WebCalService/webcalservice?wsdl"), null);
    It works fine, I can get the port, query the service without a problem. What am I doing wrong with the WebServiceRef annotation?
    Thanks!

    I have a similar problem but with the following server stack trace:
    [webapp] -- com.sun.enterprise.deployment.annotation.context.WebBundleContextat com.sun.enterprise.deployment.
    annotation.AnnotationInfo@31f1f8
    at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:362)
    at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:395)
    at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(WebModuleDeployer.java:155)
    at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:160)
    at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
    at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:87
    1)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:263)
    at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:281)
    at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:534)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:353)
    at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:336)
    at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:448)
    at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
    at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
    at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
    at $Proxy1.invoke(Unknown Source)
    at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
    at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:413
    at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:394)
    at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:253)
    at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployCont
    rollerImpl.java:358)
    at java.util.TimerThread.mainLoop(Timer.java:512)
    at java.util.TimerThread.run(Timer.java:462)
    Caused by: java.lang.IllegalStateException: com.sun.enterprise.deployment.annotation.context.WebBundleContexta
    t com.sun.enterprise.deployment.annotation.AnnotationInfo@31f1f8
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:350)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:305)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:200)
    at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:
    750)
    at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openArchive(ApplicationArchivist.java:
    731)
    at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:327)
    ... 32 more
    Caused by: com.sun.enterprise.deployment.annotation.context.WebBundleContextat com.sun.enterprise.deployment.a
    nnotation.AnnotationInfo@31f1f8
    at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorIm
    pl.java:347)
    at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorIm
    pl.java:355)
    at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.processAnnotations(Annotation
    ProcessorImpl.java:269)
    at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorIm
    pl.java:175)
    at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorIm
    pl.java:116)
    at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:432)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:333)
    ... 37 more
    Caused by: java.lang.ClassCastException: com.sun.enterprise.deployment.annotation.context.WebBundleContext
    at com.sun.enterprise.deployment.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHan
    dler.java:152)
    at com.sun.enterprise.deployment.annotation.impl.AnnotationProcessorImpl.process(AnnotationProcessorIm
    pl.java:324)
    ... 43 more
    |#]

  • How to use pdf annotation data generated by Digital Edition to different Pdf reader?

    Hi,
    I am working on an application which is suppose to use Adobe Digital Edition PDF annotation data in another pdf reader.
    Using Digital Edition Annotation Data we need to generate highlights and notes.
    My question is : How we can read this Adobe Digital Edition annotation data to generate highlight and notes in different reader.
    E.g of annotation data:
    http://codebeautify.org/xmlviewer/32b3b7
    Thanks
    Mrityunjay

    HI,
    Try this Standard program
    RSTXLDMC  -->    Uploading TIFF Files to SAPscript Texts
    Regrads,
    S.Nehru

  • Server status constantly = republish when using @HandlerChain annotation

    I'm just learning web services and have developed a very simple 'HelloWorld' type web service to play with. The service works fine with the test client that comes with Workshop.
    The actual service I develop in the future will have to make use of a SOAP Message handler chain, so I've been following the directions in [this document|http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webserv_adv/handlers.html] When I add the @HandlerChain annotation to the JWS file and save, the WebLogic server status changes to "republish," as expected. However, when I publish the server, the status remains "republish." Stopping/starting and restarting the server does not change this behavior. If I remove the annotation from the JWS file and publish the server, the status will change to "synchronized."
    Has anyone who has worked with Handler Chains in web services using Workshop seen this behavior, or can you recommend a solution?

    Answering my own question...
    I eventually found the error log view and it told me what the problem was (an error in the XML file defining my handler chain).

  • Using Chart Annotation Element

    I have a rather strange issue which I just can't get my head around. Basically I have a function which looks like the below - This simply draws a box around half of the data canvas.
    private function draw():void
                    canvas.clear();
                    canvas.beginFill(0x62dce1);
                    var canvasWidth:Number = canvas.width;
                    var canvasHeight:Number = canvas.height;
                    var minPt:Array = canvas.localToData(new Point(0, 0));
                    var maxPt:Array = canvas.localToData(new Point(canvasWidth/2,canvasHeight));
                    canvas.drawRect(minPt[0]-1, maxPt[1], maxPt[0]-1, minPt[1]);
                    canvas.endFill();
    This works perfectly well when using data that is loaded locally - i.e. data that is stored within an array collection with the MXML file. However, the momeny I use a HTTP:Service to pull in the data, once the button is click to draw the rectangle - NOTHING appears on the data canvas.
    Does anyone know why this might be happening? Im assuming its something to do with the data canvas updating as soon as the chart is loaded and isn't waiting for the asyncronose HTTP service?
    Any ideas would be greatly appreciated.
    Thanks
    Full Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="getGoogleData.send()">
        <mx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                import mx.collections.ArrayCollection;
                import mx.containers.HBox;
                  import mx.charts.LinearAxis;
                  import mx.containers.Box;
                import mx.collections.ArrayCollection;
                   import mx.charts.series.items.ColumnSeriesItem;
                import mx.charts.ChartItem;
                import mx.charts.chartClasses.CartesianCanvasValue;
                import mx.charts.chartClasses.CartesianTransform;
                 [Bindable]
                 public var profits:ArrayCollection = new ArrayCollection([
            {Month:1, Profit:1300},
            {Month:2, Profit:750},
            {Month:3, Profit:1100},
            {Month:4, Profit:1000},
            {Month:5, Profit:980},
            {Month:6, Profit:1500},
            {Month:7, Profit:2060},
            {Month:8, Profit:1700},
            {Month:9, Profit:1690},
            {Month:10, Profit:2200},
            {Month:11, Profit:2550},
            {Month:12, Profit:3000}
                [Bindable]
                private var summaryGoogleData:ArrayCollection = new ArrayCollection;
                [Bindable]
                public var folderLocation:String = "http://79.99.65.19/VISA/PHP";
                import mx.rpc.events.ResultEvent;
                private function recieveGoogleData(evt:ResultEvent):void
                    var tmpArray:Object = new Object;
                    tmpArray = evt.result.data.graphdata;
                    for each (var o : Object in tmpArray)
                        if (o.pagepath == "/bbva")
                            summaryGoogleData.addItem(o);
                    test.dataProvider = summaryGoogleData;
                public var drawnOnChart:Boolean = false;
                private function drawOnChart(evt:Event):void
                    if (drawnOnChart == false)
                        var p:Point = canvas.dataToLocal(10,600);
                        if (isNaN(p.x) || isNaN(p.y))
                            trace ("Nan");
                        else
                            trace ("Not NaN");
                            var x:Number = p.x;
                              var y:Number = p.y;
                              //drawSquareBox();       
                //updateComplete="drawOnChart(event)"
                 private function draw():void
                    canvas.clear();
                    canvas.beginFill(0x62dce1);
                    var canvasWidth:Number = canvas.width;
                    var canvasHeight:Number = canvas.height;
                    var minPt:Array = canvas.localToData(new Point(0, 0));
                    var maxPt:Array = canvas.localToData(new Point(canvasWidth/2,canvasHeight));
                    canvas.drawRect(minPt[0]-1, maxPt[1], maxPt[0]-1, minPt[1]);
                    canvas.endFill();
            ]]>
        </mx:Script>
        <!-- GET THE SUMMARY OF VISITS (GOOGLE) -->
        <mx:HTTPService id="getGoogleData" showBusyCursor="true" result="recieveGoogleData(event)" fault="getGoogleData.send()" method="GET" url="{folderLocation}/get_summaryGoogleData.php" useProxy="false"/>
        <mx:Legend dataProvider="{linechart1}" x="755" y="10"/>
        <mx:DataGrid x="357" y="315" id="test">
        </mx:DataGrid>
        <mx:Button x="52" y="323" label="Button" click="draw()"/>
        <mx:Panel x="10" y="10" width="830" height="265" layout="absolute">
            <mx:LineChart x="0" y="0" id="linechart1" height="222" width="800" dataProvider="{profits}">
                <mx:horizontalAxis>
                    <mx:CategoryAxis categoryField="Month"/>
                </mx:horizontalAxis>
                <mx:series>
                    <mx:LineSeries displayName="Series 1" yField="Profit"/>
                </mx:series>
                <mx:annotationElements>
                    <mx:CartesianDataCanvas alpha=".25" id="canvas" includeInRanges="true"  />
                </mx:annotationElements>
            </mx:LineChart>
        </mx:Panel>
    </mx:Application>

    I have a rather strange issue which I just can't get my head around. Basically I have a function which looks like the below - This simply draws a box around half of the data canvas.
    private function draw():void
                    canvas.clear();
                    canvas.beginFill(0x62dce1);
                    var canvasWidth:Number = canvas.width;
                    var canvasHeight:Number = canvas.height;
                    var minPt:Array = canvas.localToData(new Point(0, 0));
                    var maxPt:Array = canvas.localToData(new Point(canvasWidth/2,canvasHeight));
                    canvas.drawRect(minPt[0]-1, maxPt[1], maxPt[0]-1, minPt[1]);
                    canvas.endFill();
    This works perfectly well when using data that is loaded locally - i.e. data that is stored within an array collection with the MXML file. However, the momeny I use a HTTP:Service to pull in the data, once the button is click to draw the rectangle - NOTHING appears on the data canvas.
    Does anyone know why this might be happening? Im assuming its something to do with the data canvas updating as soon as the chart is loaded and isn't waiting for the asyncronose HTTP service?
    Any ideas would be greatly appreciated.
    Thanks
    Full Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="getGoogleData.send()">
        <mx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                import mx.collections.ArrayCollection;
                import mx.containers.HBox;
                  import mx.charts.LinearAxis;
                  import mx.containers.Box;
                import mx.collections.ArrayCollection;
                   import mx.charts.series.items.ColumnSeriesItem;
                import mx.charts.ChartItem;
                import mx.charts.chartClasses.CartesianCanvasValue;
                import mx.charts.chartClasses.CartesianTransform;
                 [Bindable]
                 public var profits:ArrayCollection = new ArrayCollection([
            {Month:1, Profit:1300},
            {Month:2, Profit:750},
            {Month:3, Profit:1100},
            {Month:4, Profit:1000},
            {Month:5, Profit:980},
            {Month:6, Profit:1500},
            {Month:7, Profit:2060},
            {Month:8, Profit:1700},
            {Month:9, Profit:1690},
            {Month:10, Profit:2200},
            {Month:11, Profit:2550},
            {Month:12, Profit:3000}
                [Bindable]
                private var summaryGoogleData:ArrayCollection = new ArrayCollection;
                [Bindable]
                public var folderLocation:String = "http://79.99.65.19/VISA/PHP";
                import mx.rpc.events.ResultEvent;
                private function recieveGoogleData(evt:ResultEvent):void
                    var tmpArray:Object = new Object;
                    tmpArray = evt.result.data.graphdata;
                    for each (var o : Object in tmpArray)
                        if (o.pagepath == "/bbva")
                            summaryGoogleData.addItem(o);
                    test.dataProvider = summaryGoogleData;
                public var drawnOnChart:Boolean = false;
                private function drawOnChart(evt:Event):void
                    if (drawnOnChart == false)
                        var p:Point = canvas.dataToLocal(10,600);
                        if (isNaN(p.x) || isNaN(p.y))
                            trace ("Nan");
                        else
                            trace ("Not NaN");
                            var x:Number = p.x;
                              var y:Number = p.y;
                              //drawSquareBox();       
                //updateComplete="drawOnChart(event)"
                 private function draw():void
                    canvas.clear();
                    canvas.beginFill(0x62dce1);
                    var canvasWidth:Number = canvas.width;
                    var canvasHeight:Number = canvas.height;
                    var minPt:Array = canvas.localToData(new Point(0, 0));
                    var maxPt:Array = canvas.localToData(new Point(canvasWidth/2,canvasHeight));
                    canvas.drawRect(minPt[0]-1, maxPt[1], maxPt[0]-1, minPt[1]);
                    canvas.endFill();
            ]]>
        </mx:Script>
        <!-- GET THE SUMMARY OF VISITS (GOOGLE) -->
        <mx:HTTPService id="getGoogleData" showBusyCursor="true" result="recieveGoogleData(event)" fault="getGoogleData.send()" method="GET" url="{folderLocation}/get_summaryGoogleData.php" useProxy="false"/>
        <mx:Legend dataProvider="{linechart1}" x="755" y="10"/>
        <mx:DataGrid x="357" y="315" id="test">
        </mx:DataGrid>
        <mx:Button x="52" y="323" label="Button" click="draw()"/>
        <mx:Panel x="10" y="10" width="830" height="265" layout="absolute">
            <mx:LineChart x="0" y="0" id="linechart1" height="222" width="800" dataProvider="{profits}">
                <mx:horizontalAxis>
                    <mx:CategoryAxis categoryField="Month"/>
                </mx:horizontalAxis>
                <mx:series>
                    <mx:LineSeries displayName="Series 1" yField="Profit"/>
                </mx:series>
                <mx:annotationElements>
                    <mx:CartesianDataCanvas alpha=".25" id="canvas" includeInRanges="true"  />
                </mx:annotationElements>
            </mx:LineChart>
        </mx:Panel>
    </mx:Application>

  • Is there a way to use a statically defined appearance stream in a dynamically created annotation?

    Hello,
    I want to create a document with cascading 'popups'.  Not the built-in text-only popup, but an annotation containing an appearance stream that defines text and images.  I'm currently using widget annotations based on a pushbutton field.
    Each page in my document has many citations that refer to other pages in the document.  When a user hovers over the citation, I want a 'popup' to appear containing a depiction of the destination.  However, as the destination will itself have citations, I also want the 'popup' to contain citations that the user can hover over, triggering another popup, etc.  In this way, a user could navigate throughout the document without leaving the page or even clicking the mouse.
    Obviously, with even a modest number of citations per page, pre-calculating and statically defining all of these widgets causes a combinatorial explosion, making the document sluggish and very large.
    Instead, I'd like to statically define appearance streams once per document, and then dynamically create annotations and assign the appropriate appearance stream using JS as the user navigates.
    So far I've created a named AP in the names dictionary, but I haven't been able to use it to dynamically set an appearance stream of a dynamically created widget annotation.
    Also, I've called Doc.getIcon(), passing in the named AP, which returns an Icon object.  However, after field.buttonSetIcon() and passing in the named AP, the button does not display the icon.
    Is there a way to use a statically defined appearance stream in a dynamically created annotation?
    Thank you,
    Dave

    Hi George, I've gotten named APs to work, and I expect hidden buttons will follow.  Thank you very much!
    Quick follow-up - I will have many documents embedded within the same pdf file, and some of these documents will contain identical popups.  However, I don't want to store identical icons in each document on account of file size.
    Instead, I'd like to store one instance of each icon for all documents in the file.
    Can I store all of the icons in a single document, and then access them by calling <DocName>.getField().getIcon() from any document in the file?
    Thank you again,
    Dave

  • Search Annotation by its Name Using Javascript

    Hi
    my requirement is to find the annotation using its Annotation name using Javascript
    i.e by entering the Annotation name in my user interface  created by javascript it should set focus to that particular annotation

    I don't think it's possible to do that exactly. You can search for the annotation, but you can't select it. However, you can switch the document to the page where the annotation is located.

  • Advanced Predefined  Annotations used with EJB3.0

    Hi
    I want to tune my Application which is consisting of EJB3.
    I am using ejb3 Annotations on to my source files .
    I didn't found anything annotation related to pooling , except with jboss specific .
    Say for example i want to set max beans in pool as 50.
    Please tell me how can i do this ??

    Wrong. While it is good to design and plan EJB applications, the one thing you shouldn't do is get in the way of the server. If the server decides it needs to pool or tune a pool it is using, let the server handle it. It can do it far better than you can as it has all the information, you don't (with good reason). The only thing you should be worrying about is the environment of the server, such as how many database connections to pool.

  • Annotations used to add Logging to an application.

    Hi i want to know ...if we can use Annotation to add code for Logging to a Java application...?
    I have been trying various ways using annotations, for sometime ..with no help!!! :(

    You can use an annotation processor to add code to your existing application, but you CANNOT add code to an existing compilation unit (Source file).
    Generally you generate a new class from the annotations. The new class can be either a helper class (often with static methods) whose methods are called from some class in source code, a previously non existent superclass of some class in source code, or a subclass of some class in source code.
    Your job is to see if there is some way to do what you want within those constraints, that actually adds value. (Sometimes it is possible but is so complex there is no value add by doing it).
    I don't know what you want, so I can't answer definitively, but I suspect that may be a fruitless exercise in your case, but I could be wrong.
    I generally start by trying to separate the generated code into a separate class, do that by hand until you get something working. If you can't - give up. Once you have all the code you want to generate in separate classes from the source code, then you can start looking at what annotations you need in order to tell an annotation processor how to generate that source code.
    If you ask more specific questions we might be able to be more help.
    Bruce

  • Programm to visualize Collections using annotations...

    Hi there!
    So far, I have no experience in classloading, annotations and annotation processing... as a little exercise, I thougt of a little app that does the following:
    It dynamically loads classes (Collections, specifically) which
    a) implement the Iterator interface
    b) "have" annotations to mark the methods for insertion, removal (@insert, @remove or whatever)
    I use these annotations to map the methods to specific buttons... after insertion/removal, I request the Iterator and paint the changed collection (as a Tree, List, etc.).
    So the main function for the app is to test and play a little around with self-implemented collections.
    Any suggestions? Ideas? Criticism?
    Thanks, Oliver

    Trollhorn wrote:
    Hi there!
    So far, I have no experience in classloading, annotations and annotation processing... as a little exercise, I thougt of a little app that does the following:
    It dynamically loads classes (Collections, specifically) which
    a) implement the Iterator interfaceI assume you mean the Iterable interface.
    b) "have" annotations to mark the methods for insertion, removal (@insert, @remove or whatever)Well, seeing as all the non-Map collections implement Collection, you don't really need any fancy processing, but i guess it could be fun...

  • Configure Weblogic-specific settings using annotations in EJB3?

    Hello.
    Something that really bothers me about using EJB3 in Weblogic is that, in our projects (running in Weblogic 10.0), we need to configure Weblogic-specific settings in weblogic-ejb-jar.xml anyway. Things like work managers, JNDI names and security (the latter doesn't work if we just declare it in a spec annotation, we need to also define it in weblogic-ejb-jar.xml).
    It's hard to understand the point of migrating to EJB3 when you can just do half the things using annotations.
    Does Weblogic have extensions to help on that? I never found anything related to this for Weblogic 10.0.
    Thanks.

    The link is interesting, thanks. There are only a few weblogic-specific annotations, but at least it's a start. Unfortunately, it seems to only be available in 10.3.
    About EJBGen, from what I investigated in the past, it would only work well with EJB2 (to generate the weblogic-ejb-jar content, you also have to use EJB2 annotations that were deprecated by EJB3 annotations - if you do this, you will end up with spaghetti code, in my humble opinion).
    Regards,

  • Annotations Newbie: Are annotations the best choice for..

    I currently have source code that consumes web services and use the @WebServiceRef annotation to provide the wsdllocation. If I understand annotations correctly, there is a way at compile time to replace the wsdllocation path. This is done because the software is built for various custoemers using customized webservices for each customer. The structure of the web service doesnt change, but we need to dynamicly change the path the source code will find the wsdl when compiling the software for a customer.
    Any help in pointing me in the right direction would be appreciated. I am new to java development, and am learning on the fly. If by chance annotations are not the right method for solutioning this, would anyone have any pointers?
    Thank you,
    Steve

    btkstephen wrote:
    I currently have source code that consumes web services and use the @WebServiceRef annotation to provide the wsdllocation. If I understand annotations correctly, there is a way at compile time to replace the wsdllocation path. This is done because the software is built for various custoemers using customized webservices for each customer. The structure of the web service doesnt change, but we need to dynamicly change the path the source code will find the wsdl when compiling the software for a customer.Why do you want to do that at compile time? Why aren't you using a configuration (and possibly an annotation that is used at runtime). Spring webservices does something like that.

Maybe you are looking for