How to get datasources to work on both JBoss and Weblogic?

We have an EJB3 application that needs to be deployed both on JBoss 4 and WebLogic 10.
JBoss creates datasources with JNDI names "java:dsName" , WebLogic uses a pattern "dsName" (and trying to add "java:" to that leads to nasty errors). Despite what the EJB3 books say, looking up that DS using "java:comp/env/dsName" does not work from WebLogic, it simply doesn't register the datasource in that namespace.
The @Resource annotation takes a mappedName argument as the JNDI name for the datasource, but this is required to be a fixed String (so we can't inject the actual name at runtime depending on the deployment environment).
All data access is through session beans, so using an @PersistenceContext is no option.
At the moment we're trying to get around this by creating a special EJB whose only job it is to figure out what server it's running on and find a datasource the hard way (using JNDI lookups), returning that to the EJBs that need it, but that's not supposed to be the way the EJB3 model is supposed to work.

All Java EE implementations are required to support the private component namespace -- java:comp/env/. It's there for the express purpose of providing portable access to resources needed by the code. What is not specified is the way in which a particular Java EE implementation allows the mapping between a component namespace entry, e.g. java:comp/env/dsName, and the corresponding physical datasource to be expressed.
Unfortunately, mappedName is not required to be supported. However, even if you don't use mappedName each vendor must have a way to resolve a component environment dependency to the corresponding datasource. In SUN's implementation, this is done via sun-{ejb | web | application-client}.xml. The key is that the source depends on the java:comp/env/... name and the mapping to a physical resource can be changed as part of the application assembly or deployment process without touching the code.
Here's a presentation describing some of these issues in more detail : https://glassfish.dev.java.net/javaee5/ejb/compdependencies_xmlforum_nov15.pdf
--ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How come a USB will work with both Mac and Windows (as in that there are already files from Windows and Mac can still read and write onto it) but a external Hard Drive won't (as in there are files from Windows on there but Mac can read but not write)?

    I have a Seagate Drive that I'm hoping to copy some movies from my Mac onto (because it only has a 512 SSD and I'd rather keep that empty and handy for more readily needed files) but it won't work. It shows up as a drive when connected (with the orange USB drive icon popping up) and is appropirately labeled "FreeAgent Drive", but when I try to copy files onto it it won't work. There are already windows files on there, such as some windows backups and lot's and lot's of pictures and videos. However, I have several USBs which already have windows files on them (namely movies, music, and other stuff) and copying and stuff works fine. Why won't it work with this hard drive and would work with USBs? Please help me out here guys, I am not experienced with Hard disks and formatting and stuff like that. 10 points for whoever helps me out the most. Thanks.

    We will need to reformat your EXT, but it will then work on both Mac and Win
    Connect the drive to your Mac, open disk utility
    Go to the partiton tab and select '1' ... format should be ExFAT ... in options select MBR
    Format the drive
    It should now work on both OSs; report back

  • How to use the validation work in Both TAB and Mouse keys in Forms6i

    Hi,
    I have a validation script once it's validated it should execute the query.But using When-Validate-Item i can't use execute_query.I am able to use the validation in Key-Next-Item trigger but if the user moves the cursor using mouse then it's not working.
    How to use the validation script working in Both Scenarios(Tab and Mouse keys).
    Can anyone please give inputs to rectify the above issue?.

    So you have multiple fields, but on at least one of them if it's valid you immediately want to execute the query?
    You could create a hidden field in a control block Query_Now default 'N'. In a WHEN-VALIDATE-ITEM on your item, if it's determined to be valid, then set Query_Now to 'Y'.
    In a WHEN-NEW-ITEM-INSTANCE at block level, check if Query_Now is 'Y'. If it is then execute the query (and set it back to 'N').

  • Can't get WEP to work with both mac and windows machines.

    Currently my airport express is setup with no security. When I try to setup using WEP it works great for my powerbook but the windows machines constantly get disconnected.
    Any ideas? Should I use other types of wireless security (WPA etc...)? If so, can an xp machine be configured for that type?
    Any help would be greatly appreciated.
    PowerBook G4   Mac OS X (10.4.7)  

    If you can use WPA use WPA, it will depend on your PC
    wireless adapter and if you are running Windows XP
    SP2.
    --the window PC is running xp sp 2 but the adapter does not appear to support WPA (dell true mobile 1300 internal adapter)
    from your response below not clear what is the best path to take given WEP is the only option.
    One of the problems with WEP is that the actual
    standard relies on a 10 character HEX key for 40bit
    WEP and a 26 character HEX key for 128bit WEP.
    In order to make things easier for people, vendors
    use certain algorithms to convert simple
    alphanumeric passwords (or passphrases) into HEX
    keys, thus enabling people to use simple memorable
    WEP password rather than lengthy HEX keys.
    The problem is that different vendors use different
    algorithms to generate the HEX key and therefore a
    ASCII password on an AEBS will be hashed differently
    on a Netgear client and vice versa.
    One thing is a 13 character 128 bit WEP password
    will be hashed by all vendors in the same way (if
    you use 40bit WEP then a 5 character password is
    required).
    Though sometimes not even that works and the HEX key
    must be used regardless.
    AirPort: Joining an encrypted wireless network
    http://docs.info.apple.com/article.html?artnum=106424
    Choosing a password for networks that use Wired
    Equivalent Privacy (WEP)
    http://docs.info.apple.com/article.html?artnum=108058
    Accessing a Airport Network with a Windows XP PC or
    laptop (with XP SP2)
    http://www.ifelix.co.uk/tech/1011.html
    Accessing a Airport Network with a Windows XP PC or
    laptop (with XP SP1)
    http://www.ifelix.co.uk/tech/1010.html
    iFelix

  • When I switch my time capsule to 5.0ghz mode the range of my wireless network drops significantly.  Near the Time Capsule my Macbook Pro works fine, in my bedroom I have almost no signal.  In mixed mode it works fine.  Any ideas on how to get 5.0 working?

    When I switch my time capsule to 5.0ghz mode the range of my wireless network drops significantly.  Near the Time Capsule my Macbook Pro works fine, in my bedroom I have almost no signal.  In mixed mode it works fine both placed.  Any ideas on how to get 5.0 working?  I thought 5.0Ghz was supposed to have a wider range.  Do I need to change a setting on the Macbook Pro?
    Thanks, W

    I'm not sure if you understand that 5 GHz has some upsides, but also some very significant downsides.
    The upside is that the 5 GHz signal will allow faster speeds.
    The downside is that you must always give up something in order to gain something else.Unfortunately, the marketing hype about 5 GHz does not go into very many details about this.
    In the case of 5 GHz, the 5 GHz signals are much weaker than 2.4 GHz signals, so they do not travel as far or penetrate any obstructions like walls or ceilings nearly as well as 2.4 GHz signals. In many cases, in order to get good 5 Ghz performance, you literally have to have almost a line-of-sight relationship between your computer and the wireless router.
    If you have a new dual band router, which broadcasts both a 2.4 GHz and 5 GHz signal simutaneously, your Mac will connect to the best signal quality automatically depending on its location in relation to the router. In the same room, without any obstructions, it will connec to 5 GHz. But, take the laptop down the hall a few rooms and around the corner and the Mac will connect to the 2.4 GHz signal because at that location, the 2.4 GHz signal is not only stronger, it is also faster.

  • TS3274 I went to an Apple store yesterday and the guy there did something and now the ipad only works in the vertical (portrait) position and not the horizontal (landscape) position.  How can we make it work in both positions?

    I went to an Apple store yesterday and the guy there did something and now the ipad only works in the vertical (portrait) position and not the horizontal (landscape) position.  How can we make it work in both positions?

    Just in case you are not running iOS 7 and don't have the control center feature.....
    If you see a lock icon in the upper right corner of the screen - then the screen orientation is locked.
    Try the side switch above the volume rocker first and see if that unlocks the screen. If that doesn't do it and you are running iOS 5 or 6, double tap the home button and swipe to the right and look for the lock icon all the way to the left.
    If you are running iOS 7, swipe up from the bottom of the screen to get to the control center and the lock icon is in the row of icons at the top all the way to the right.
    If the screen is unlocked but still will not rotate, reset the iPad.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the button

  • Satellite L500 - How to get FN keys working on Windows 7 64bit?

    Hi
    I needed to reinstall Windows 7 on a Satellite L500 but I can't get the FN keys to work. Would anyone here be able to give any ideas on how to get this to work?
    cas

    Hello
    You need Toshiba Value Added Package and Flash Cards Support Utility. Both you can download here:
    http://eu.computers.toshiba-europe.com > Support & Downloads > Download Drivers
    Use also the forum search, this question was asked 100 times before.

  • How to get showDocument to work

    I tried to pop up a broswer to show an image using showDocument. However, I tried it with the 2 methods as in the attachment, and they both failed. (those 2 methods were tried at different times)
    Besides, I found in the Java Doc (http://java.sun.com/j2se/1.4.2/docs/api/java/applet/AppletContext.html) saying under the showDocument that An applet viewer or browser is free to ignore .
    Can you please kindly tell me what that mean? And can you teach me how to get the showDocument works? Thank you very much.
    public class ccdApp extends Applet
    public void init()
    try
    try {
    // Method 1
    URL url = new URL(getDocumentBase(), "http://10.1.100.120/png/DSC01400.png");
    getAppletContext().showDocument(url,"_blank");
    // Method 2
    getAppletContext().showDocument
    (new URL( "http://10.1.100.120/png/DSC01400.png"), "_blank");
    catch (MalformedURLException e) {
    e.printStackTrace();
    }

    Help, I tried to get this code to work I found on how to use showDocument()?
    import java.applet.Applet;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    * <applet code=ShowDocApplet.class width = 300 height=300> <parame
    * name="target" value="b"> <parame name="url" value="http://www.yahoo.com">
    * </applet>
    public class ShowDocApplet extends Applet {
    public void init() {
         final Button act = new Button("Show Doc");
         // For Testing purpose
         final String url = "http://java.sun.com";
         final String target = "_blank";
    * //For ur Application final String url = getParameter("url"); final
    * String target = getParameter("target");
         act.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent ae) {
              try {
              getAppletContext().showDocument(new URL(url), target);
              System.out.println("Made it to try block");
              } catch (MalformedURLException e) {
              showStatus(url + " NOT FOUND");
         add(act);
    Note: I am using Eclipse 3.2 and I got it to compile and to run as an applet, but when I push the button nothing at all happens. Help

  • Suddenly the apps I downloaded won't work. The screen "blinks" for a second as if the app is loading, and then returns to the home screen. All the apps that came with the iPod seem to be working fine. How to get them all working again?

    Suddenly the apps I downloaded won't work. The screen "blinks" for a second as if the app is loading, and then returns to the home screen. All the apps that came with the iPod seem to be working fine. How to get them all working again?

    First try a hard reset.  To do this, press and hold both the Sleep/Wake and Home buttons together long enough for the Apple logo to appear.
    If still no luck, try downloading another free app from the App Store.
    More troubleshooting here.
    http://support.apple.com/kb/ts1702
    Lastly, try to restore the iPod from a previous backup or restoring it to factory settings.
    B-rock

  • I have purchased itunes match but the cloud will not load on my ipad 4.the only music that will show up is stuff that i bought from the itunes store.any ideas on how to get this to work?

    i have purchased itunes match but the cloud will not load on my ipad 4.it works on my iphone 5 & it originally worked on my ipad.the only music that will show up is stuff that i bought from the itunes store.any ideas on how to get this to work?

    On the MBP, in iTunes, switch to Song view and enable the iCloud Status column by pulling down View > View options and selecting the option for "iCloud Status." Close the small window. Look for any tracks that have a status of "waiting." If you see several of them disable iTunes Match while holding down the Option key. Quit iTunes, wait a few seconds, then open it again and turn iTM back on. Let it compelete the scan. Wait until all tracks that are "waiting" have a status of either "matched" or "uploaded."
    On the iPad, turn off iTunes Match then launch the Music app and let the contents clear out. Power cycle the iPad for good measure, then re-enable the service once all the tracks in iTunes have been processed.

  • ITunes wont open for me. it keeps saying "the Disc "untitled playlist" cannot be read. An unknown error occurred (-69)." don't know how to get it to work. Please help

    iTunes wont open for me. it keeps saying "the Disc "untitled playlist" cannot be read. An unknown error occurred (-69)." don't know how to get it to work. Please help

    It is likely a hardware failure
    http://support.apple.com/kb/TS3694?viewlocale=en_US#error1

  • HT204053 How do i make icloud work if my husband and I share the same itunes account but we dont want to get each others contacts, messages, apps etc?

    How do i make icloud work if my husband and I share the same itunes account but we dont want to get each others contacts, messages, apps etc?

    Each of you should set up your separate iCloud account on your own computer using your Apple ID. This gives you two independent iCloud accounts.
    Note that an iPad is not a multi-user device. It can only be synced with one account.

  • Has anyone figured out how to get speech recognition working with sticky keys enabled on mountain lion?

    I'm trying to use speech recognition to input text on my iMac running the latest mountain lion, 10.8.3.
    I have sticky keys enabled.
    When I try to start speaking by pressing the function key twice nothing happens. I can only get it to work if I disable sticky keys.
    The same problem occurs with all the other modifier keys as shortcut, they do not work with sticky keys.
    When I try to select a different shortcut, I am unable to select a two key combination, but am limited to one.
    If I select the F6 key, or any other single key, I am able to start speech recognition. However the second time that I press the key, it does not stop recognition and process my words. Instead, it restarts the recognition.
    Has anyone figured out how to get speech recognition working with sticky keys enabled?
    Or a way to get an individual key shortcut to start on the first press and process it on the second?
    Or a way to get key combinations to work, as specified by the help:
    Dictation On and Off
    To use Dictation, click On.
    When you’re ready to dictate text, place the insertion point where you want the dictated text to appear and press the Fn (function) key twice. When you see the lighted microphone icon and hear a beep, the microphone is ready for you to speak your text.
    Shortcut
    By default, you press the Fn (Function) key twice to start dictation. If you like, you can choose a different shortcut from the menu.
    To create a shortcut that’s not in the list, choose Customize, and then press the keys you want to use. You can press two or more keys to create your shortcut.

    I noticed with version 10.8.4 of OS X that I am now able to select F6 to activate, and the return key to complete the speech recognition. This is still different than the description of how these should function that's included in the help, but at least it's an improvement.

  • Ever since I enabled iMessage on my Mac Airbook, I can no longer receive text messages from the iMessage people on my iPhone, only on my iMessage now!!  How do I get the messages to reach both iMessage and iPhone??

    Ever since I enabled iMessage on my Mac Airbook, I can no longer receive text messages from the iMessage people on my iPhone, only on my iMessage now!!  How do I get the messages to reach both iMessage and iPhone??

    We are suffering very similar issues when communicating from my iphone to a friend who has both iphone and iPad enabled.
    As long as I reply to an existing text chain, then it is visible on the target iphone.  If I SMS the phone number, it gets routed to the IPAD!!   And NO, I should not have to disable imessage when I want to send an SMS!!

  • The user acct my apple was connected to no longer works (corrupt).  My Apple TV is still synced to that account and all of my recent purchases are going to that username.  Does anyone know how to get all of the purchased items back and to the new user?

    The user profile my appleTV was synced on my computer to no longer works (corrupt).  My Apple TV is still synced to that profile and all of my recent purchases are going to that username.  Does anyone know how to get all of the purchased items back and to the new user (same computer)?  I created a new user on my computer and moved the itunes folder to the desktop but never changed the path to which the apple synced to.  Now I can only see old items I purchased before the user profile went bad.  PLease help!

    Welcome to the Apple Community.
    Changing the library the Apple TV is synced with will delete all synced content from the Apple TV, but it won't delete purchased content.
    You should be able to change the library, resync any content you want and transfer your purchases back to the new library.

Maybe you are looking for

  • IPhoto 6 ATE my photos!

    I am on the verge of tears... My iPhoto was all messed up, with two libraries that were somehow created back when I had by G4 (maybe due to an update?) and so I was trying to make a new (third) library that would hold all my photos by using option+la

  • IOS 8 - Preparing for enterprise rollout

    Hello, With the announcement of iOS 8 release date within  the next week we are preparing for the rush to upgrade across our corporate user base. There are approximately 400 iPhones within our organization and I'm looking to understand what would be

  • How To Fix Mavericks Mail Unable To Connect Error

    Mavericks Mail.app stopped being able to authenticate to any IMAP or POP mail servers -- my own OS X Server.app, iCloud, Gmail, etc. iOS clients could connect just fine, and I see that many, many others are having this problem as well. I solved this,

  • Pre-selected Mcafee = a true way to the heart of your users?

    I often considered why most installers don't offer more things to be installed? I actually think that the money Adobe get from McAfee is too little and that really, they should pre-select a whole bunch of additional software that users _must_ want...

  • How to download from tftp

    how do I download from TFTP for my firmware for a WRT54G Ver 1.006? where do I go????