How do I create resource to be injected with @Resource annotation

I use @Resource get hold of DataSource or mail session in my session beans, but what am I supposed to do if i want to define my own resource, like org.apache.fop.apps.FopFactory? I only need to configure it and later access from my session beans like a resource, but I am not sure how do I do it. I guess I need to put it in the JNDI but what needs to be done with JBoss5 to do that? Is it java code or XML configuration?
Thanks for any help!

I've never really thought of custom resource injection before, but since no experienced developers are answering, here's some info I found:
[Example 1 (in OpenEJB)|http://openejb.apache.org/3.0/custom-injection.html]
Here's some code from [Web Tier to Go With Java EE 5: A Look at Resource Injection|http://java.sun.com/developer/technicalArticles/J2EE/injection/]
private @Resource String welcomeMessage;
public class HelloWorld extends HttpServlet {
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
     throws ServletException, IOException {
         PrintWriter out = response.getWriter();
         out.println(welcomeMessage);
<env-entry>
    <env-entry-name>welcomeMessage</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-name>
    <env-entry-value>Hello World from env-entry!</env-entry-value>
</env-entry>You just need to discover where to put <env-entry>, but [this article|http://java.sun.com/developer/EJTechTips/2003/tt1209.html] and the first link will help you there.
Also, maybe [this thread|http://forums.sun.com/thread.jspa?threadID=5176050] is useful (but I don't think so).

Similar Messages

  • How do i create/combine my mac id with my iPhone id?

    i wanted to download an app form app store and was asked for my id.. apperntly my iPhone id is limited to my country's app store and my email is in use for that id... how do i create/combine my mac id with my iPhone id so i can download apps from appstore?

    The Apple ID for the iTunes stores and for the Mac App Store are the same account. You can only buy from the stores in the countries in which you have the qualifications. You must have a bank card in that country and the bank card must have a valid billing address in that country. Creating more than one Apple ID is a bad idea and will not help you get around the requirements.

  • How do I create an interactive PDF file with variable data

    We would like to basically do a 'mail merge' of our list of customers with an interactive PDF file (including videos, menus, etc - not just form fill out and web links) to create a single PDF file that contains multiple mail pieces ... one for each customer ... with each mail piece being customized for that customer.  Customizations would include different greetings (Dear Bob, Dear Dana, etc), as well as different charts based on data unique to the customer, different photographs, etc.
    I've seen that InDesign and Acrobat Professional can be used to create an interactive PDF (such as from http://tv.adobe.com/watch/ask-the-adobe-ones/14-calling-rufus-about-interactive-pdf-making).  However I don't understand how I can insert data from a database, csv file, excel file etc into the PDF file so that each page, or each set of pages, within the PDF can be customized.
    Can anyone point me to a tool to use for this?
    Thanks,
    Bob Kendall

    For that kind of volume and unattended operation, you want InDesign Server – which is the server/high volume edition of INDD.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 3 Nov 2011 06:58:07 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How do I create an interactive PDF file with variable data
    Re: How do I create an interactive PDF file with variable data
    created by Ti26E31DSxxx<http://forums.adobe.com/people/Ti26E31DSxxx> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/4005459#4005459

  • How do I create an after effects file with an interchangeable image

    Hey,
    hope someone can help me, I'm using after effects to create a mp4 file, it contains a photo which has a animation super imposed ontop of it.
    When the projects finished the base photo that the animation is created around could change up three times a day.
    What I'm trying to work out is a way for a non technical user to just be able to upload the new photo to somewhere and for the animation to be created and returned somehow to him so that the animator doesn't have to re open and edit the affect effect project each time a new photo comes in.
    Is there a way to do this built into after effects does any one know?
    Thanks for any help

    For that kind of volume and unattended operation, you want InDesign Server – which is the server/high volume edition of INDD.
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 3 Nov 2011 06:58:07 -0700
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: How do I create an interactive PDF file with variable data
    Re: How do I create an interactive PDF file with variable data
    created by Ti26E31DSxxx<http://forums.adobe.com/people/Ti26E31DSxxx> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/4005459#4005459

  • How can I create a new TC backup with ethernet, so I don't have to wait two days for a new wireless backup?

    How can I create a new TC backup with ethernet, so I don't have to wait two days for a new wireless backup?
    Several times in the last year, I've gotten a message that Time Machine needs to completely redo my backup. Using the wireless connection, this takes almost two days. Is there a way to do the backup with ethernet and then switch back to wireless? Thanks.

    May I know what is needed to make sure the MacBook is able to see Time Capsule on ethernet?
    Connect an Ethernet cable from one of the LAN <-> ports on the 2Wire gateway to the WAN port (circle of dots icon) on the Time Capsule.
    If AirPort Utility cannot "see" the Time Capsule now, you will need to perform a "hard reset" by holding in the reset button for 7-8 seconds or so and then reconfigure the Time Capsule. You can use the same Time Capsule name and password, etc. as before.
    Configure the Time Capsule to "Create a wireless network" and select the Bridge Mode option when it appears during the setup using AirPort Utility.
    Once the Time Capsule is configured, restart the entire network again. Power down everything, start the 2Wire first and then start each other device after that one at a time about a minute apart.
    Now you can connect your Mac directly to one of the LAN <-> ports on the Time Capsule for the backup using another Ethernet cable. In general, about 20-25 GB per hour will transfer.
    The Time Capsule will broadcast a much faster wireless network than the 2Wire can provide, so you might want to leave the setup "as is" for awhile after the first backup is complete. If you decide to use the Time Capsule as your main wireless access point, you would want to turn the wireless off on the 2Wire since two wireless networks in close proximity can create interference problems.
    Or, if you want to use the wireless on the 2Wire, you could turn off the wireless on the Time Capsule. Then backups will occur over the 2Wire wireless, or over Ethernet.
    I don't really recommend the "Join a wireless network" setting on the Time Capsule for most users, but you could go back to that setup as well if you want after the first backup is complete.

  • How do I create a PDF fillable form with adobe pro 10

    How do I create a PDF fillable form with adobe pro 10

    You need to open the "Tools" panel and select the "Forms" category to access all the tools for creating form fields.
    TOP 10 coolest new Acrobat XI features
    Form tutorials

  • How can I create a new Care Plan with one or more care tasks

    Hello,
    I'm working on a Dutch website in the HealthVault Environment. I got difficulties in creating and updating a careplan with care tasks. Most likely it's due to lack of knowledge...
    Following code works fine:
    CarePlan plan = new CarePlan();
    plan.Name = "test";
    this.PersonInfo.SelectedRecord.NewItem(plan);
    It creates a plan called [test]. But I don't know how to create a plan with one or more tasks in it: the tasks property is read only.
    https://msdn.microsoft.com/en-us/library/microsoft.health.itemtypes.careplan.tasks.aspx
    Half a year ago I was able to add an example of a careplan, which was a feature of the dev tools, but for some reason that's not possible anymore.
    https://developer.healthvault.com/DataTypes/Overview?TypeId=415c95e0-0533-4d9c-ac73-91dc5031186c
    So my question is, how can I add a new care plan with a task like the example from the HealthVault dev tools:
    <tasks>
    <task>
    <name>
    <text>Run 100 miles</text>
    </name>
    <description>Run 100 miles in 6 months</description>
    <start-date>
    <structured>
    <date>
    <y>2013</y>
    <m>12</m>
    <d>1</d>
    </date>
    </structured>
    </start-date>
    <end-date>
    <structured>
    <date>
    <y>2014</y>
    <m>6</m>
    <d>1</d>
    </date>
    </structured>
    </end-date>
    <target-completion-date>
    <structured>
    <date>
    <y>2014</y>
    <m>12</m>
    <d>31</d>
    </date>
    </structured>
    </target-completion-date>
    <sequence-number>279128532</sequence-number>
    <recurrence>
    <interval>
    <text>Once</text>
    </interval>
    <times-in-interval>10</times-in-interval>
    </recurrence>
    <reference-id>p01vil21ckg7k2346y1g60337mmi20sg564l321l8pmpqev39n302572sewu76lh9019s3993e02924</reference-id>
    </task>
    </tasks>
    Any help is welcome 
    Wilfred

    Hi Wilfred,
    Have you tried this?
    CarePlan plan = new CarePlan();
    plan.Name = "test";
    plan.Tasks.Add(someTask) 
    If you have a task list already, you would need to enumerate through it and add one by one...
    foreach (var task in existingList)
        plan.Tasks.Add(task)

  • How do I create multiple midi tracks each with separate external synthesizer sound

    Mac Pro OS 10.10.2, Logic Pro 10.1.1, FireFace 800 (updated), Roland XP-30 synthesizer/keyboard, Mackie mixer.
    XP-30 analog output to Mackie, FireFace monitor to FireFace main inputs and FireFace out to Mackie.
    What I can't get to work: Sound output for monitoring as I record on each of several midi tracks, each with access to my banks/programs.
    Logic automatically set up the multi-instrument and created 16 tracks, visible in the mixer window. I have entered custom banks for the XP-30 and they are working.
    Mt problem is two parts. First, my last experience was with Logic Pro 7 way back.
    Problem two is that when I create midi tracks (except for the first one I created on channel 1) by control-clicking on one of the tracks in the mixer window I get no sound for monitoring. I can see the green monitor indicator for the track shows midi data incoming. I just can't hear it. It's as if there is no designated output. I have checked audio preferences and see the FireFace as input and output device. If i change the channel to channel 1, I get the sound, but then I have two tracks on channel 1 which doesn't work for designating unique sounds to each track.
    I can select "All" for channel and get monitored sound on several tracks; however, they then all play the same sound, of course.
    i can create midi tracks (either instrument or external) using the plus icon, but no matter how i set them up that way, they do not allow me access to my banks/programs.
    In logic Pro 7 it was no problem creating multiple midi tracks, each with a different sound assigned to it. In Logic Pro 10, I am baffled regarding how to accomplish this and get it all to work as simply and nicely as I was able to with #7.
    Make sense? Can anyone help?
    Thanks

    I have it set to Performance mode which according to the owners manual: "This mode makes the XP-30 function as a multitimbral sound
    source, and Performance settings can be modified. If you’re
    using an external MIDI device to control the XP-30 in this
    mode, it will function as a multitimbral sound source."

  • SharePoint Designer 2013 (2010 Platform Workflow) - How can I create a new list item with a SPECIFIC content type?

    In SharePoint 2010 I created workflows that used the 'Create list Item' Action, which then set the Content Type ID (so I could create documents of various types in a document library). 
    We just switched to the SharePoint 2013 platform, and now the drop down for Content Type ID is blank in all of the workflows that are still using the SharePoint 2010 platform.  Is there any way to create a list item with specific content
    type?  Even if I could just input a string into that field instead of using this blank drop-down.  Please help! 

    Hi Sarah,
    According to your description, my understanding is that you cannot create a new list item with a specific content type using SharePoint 2010 Platform Workflow.
    I tested the same scenario in my environment, and the Create List Item worked fine with the specific content type.
    How did you create the content type?
    Please check if the content type is added to the list/library the workflow associated with.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • How can I create a stop animation video with single images in Premiere Pro?

    Let me start off by saying I am 100% new to pretty much all Adobe software as of about 3 weeks ago. I have been doing a lot of googling these past few weeks. With that said, I will do my best to explain my question.
    I am making a stop motion animated video.  I am not using several photos to create the look, but rather single photoshopped images that I have deleted the backgrounds out of. Basically the video is single charms "crawling" or flying in individually from off screen into a circle, there is a story explaining what each charm means. I started in After Effects, but had issues with audio... am I right in my understanding that you cannot preview the audio unless you use the preview feature? So my solution was playing a guessing game, rendering/exporting, importing it to Premiere Pro, taking notes and then heading back to After Effects to try to re-do the timing. Obviously this was not working too well.
    Then after doing more googling and clicking around I figured out you could layer images in Premier Pro and make them move just as you would in After Effects, which is great! There are two things hanging me up...
    1. I used the wiggle effect in After Effects. For the life of me I cannot find or figure out an effect or preset similar to this in Premiere Pro. Is there such a thing? Or do I have to create rotation keyframes? (I think I'm using keyframes correctly).
    2. Making the images stop-motiony and not smooth.
    My question is... any suggestions on how to re-create the wiggle effect easily in Premiere Pro? Or is there away to create the effect in After Effects and then import the image into Premiere Pro and still be able to change the position and timing?
    Please help! My deadline is tomorrow by the end of the work day!
    Please forgive me if these are silly questions... go easy on me, I'm soo new! Thanks in advance!

    Thanks so much for the reply!
    I read that... but it doesn't preview the whole thing? It only previews a few seconds and then loops. I tried to figure out how to change the preview settings, but I can't seem to get it to work.

  • How can I create a file in iMovie with a lengthy audio file, but only 1 picture?

    Let me state first off that I'm a blind user using the Voiceover screen-reader in OS X.
    Now, I want to upload some audio to Youtube, but they do not allow simple MP3 files. As such, I want to create a file in iMovie with my audio and 1 picture to use as a visual. Within iMovie, I add my audio file, select a picture, but when I publish, the audio is cut off after only a few seconds. Can someone please explain how I can fix this issue so my entire audio clip will play?

    iMovie is a visual medium, so you need to make the duration of your photo at least as long as your voiceover track. You should be able to double click on your photo and then enter a duration.
    See iMovie Help at this link.
    http://help.apple.com/imovie/#mov3a883915
    An MP3 file may work for you, but for best results, use a WAV or AIFF file (uncompressed). You can convert MP3 to AIFF in iTunes. Let me know if you need instructions.

  • How can you create a spry menu bar with no background colour?

    How can you create the first level of a spry menu bar to have no colour? I have a coloured background right now and the colour matches when you load the site in Internet explorer but does not match in Firefox. Any suggestions are welcomed on how to fix this.
    Thanks!
    HK

    Here is the site:
    http://partnersnaturally.ca/
    I am learning with code, (obviously) so any feedback would be nice. I use dreamweaver CS4, but when I originally designed the site it was in a much older version of dreamweaver. I wonder if that could also be a cause. (besides human error)
    Thanks again,
    HK

  • How do I create a DVD from iMovie with menus? What iDVD use to do!

    iDVD has disappeared on my new MacBook Pro, so how do I create a DVD with menus and everything?

    Hi
    You can not do that - without any DVD authoring software as iDVD.
    So either
    • Treat to return Your new Mac (within 14 days) if Apple doesn't give You iDVD
    • Buy a second handed iLife'09 (pref as You then get all Themes - not so in iLife'11 - AND - after program-up-date they will be the same version anyway)
    • Buy another DVD-authoring software as Roxio Toast™ (costs a bit - contanin lot's of other things too - that was of great value to me (not so to everyone)
    • Use the free (and very simple/basic) BURN™ - as You at least can get Your Movie onto a Playable DVD
    If there is no iDVD on Your Mac (and it's not on newer Macs as Apple discarded it) then You need a program that can do this.
    Your Mac can burn CDs and DVDs - BUT DVD as Data-DVDs not as Video-DVDs - they need a program to be encoded and STRUCTURED as such.
    • iDVD is part of the boxed version of iLife'11 and can only be bought outside Apple as on Amazon and e-bay
    • DVD Studio pro - Part of FinalCut Studio Pro bundle - this to has expired and can only be bought second handed. (High price and tough learning Curve - but best ever done.)
    • Roxio Toast™ - Not as elegant as iDVD - but has many other positive additions (I like it as 10-Pro incl BD-component) (now version 11)
    • Burn - only free alternative I know of on internet. Very simple - Just for doing a plain Video-DVD
    Burn http://www.digital-digest.com/software/Burn.html
    only You can buy from Apple is
    • FinalCut Pro-X which also can burn to DVD but without any nice themes.
    AppleMan1958
    You can also buy Compressor from Apple for $50 US. It will also create DVD and BluRay but without the nice themes.
    Yours Bengt W

  • How do i create a secure internet connection with my linksys router?

    I'm having trouble creating a secure airport connection with my wireless "Linksys" router.  How can I create a secure connection?

    If using a  Linksys router, contact LinkSys Customer Support and/or post in their forums. 
     

  • How do I create a drop down menu with multiple items in Adobe Acrobat 9?

    I am trying to create a drop down menu with four items within a field box.  When I try to do this
    the font is too big and it just doesn't fit.

    You can use panel widget to create manual menu where set to show target on rollover.
    Something like this :
    http://muse.adobe.com/exchange-library/menu-vertical-accordion-widget-1
    http://muse.adobe.com/exchange-library/tiptop-navigation-menu
    Thanks,
    Sanjit

  • How do I create a automatic second page with different layout settings?

    Hi there,
    I want to create a business letter template with a different second page. I already managed to create a different layout on page nr two, but
    whenever I write a letter with this template and I reach the end of page one, pages creates a thrid page in between my page nr one and nr two with a mixture of the layout of template page nr two and the footer of page nr one.
    I want pages to take my template page nr two (with different header and footer) as second page instead of creating one itself.
    If I don't need a second page - because my letter is to short - I should not have to delete a second page. It simply should not be there...
    Thanks for Help!
    G4's and 12" PB   Mac OS X (10.4.6)  

    Hello Stefan,
    you achieve this with a little trick. Create your letter and set the layout for the first and the second page by inserting a placeholder text. This placeholder text should fill the first page and the top of the second page, so both pages are build in one section. When the entire letter is layouted well, select the placeholder text and than save the letter as a template.
    Now every time you open this template, you only have to insert the main text (replace the placeholder text with real content), and the second page disappears until the main text overflows the borders of the first page. Than you will get the second page again with the layout you have created for it.
    I hope this will work for you like it works fine for me.

Maybe you are looking for

  • BEX 7.0: Formula variable with replacement path not working after BW Upg

    Hi all, We have a formula variable using replacement path for 0MATERIAL characteristic that is used in a calculated key figure, in order to perform conversion factor to change measure units (0MATERIAL attribute). This was working pretty well until an

  • IDVD, the Quicktime format and 16:9

    Hi, I´ve got a problem with widescreen format and Mac. I´ve edited about 10 short clips with Premiere Pro CS3 on a PC, but when it came to authoring the DVD found I no software for the PC that could handle 16:9 and 5.1 well. I´ve now moved the videos

  • Sound clip to edit profanity???

    Folks- I feel like this might be the wrong place to ask this question, but I've going nuts trying to locate the standardized "beep" that is so commonly used to edit profanity in television shows. I figured it would be somewhere in the studio package

  • Error when running "regsvr32 schmmgmt.dll" to add the Schema Management Snap In on Windows 8

    I am running Windows 8 Enterprise and trying to install the Active Directory Schema Management MMC Snap In. When I follow the procedure listed via the link below, it doesn't work, I get an error. http://technet.microsoft.com/en-us/library/cc732110.as

  • Serial number issue for Acrobat in CS3 Web premium education edition.

    Hi everybody. If anyone can help me on this issue, I would really appreciate it. So far, customer support hasn't been very useful. So here is the issue. I bought CS3 Web Premium for my 2.16ghz macbook and it was purchased through apple. Anyway, it ca