How do you communicate properties to a SessionBean?

Can anyone give me an example of how to give customized properties to a session bean? On the client side I can put whatever I need into a properties file but I can't find how to do it with a session bean.
I've seen documentation that says it can be done with deployment descriptors. Is there an example of how to put custom properties into a deployment descriptor?
I have also seen documentation that says to use "JNDI naming context java:comp/env" instead of Context.getEnvironment() to retrieve the information from the deployment description but I can't find anything that explains how to do that.
Can anyone help?
Thanks.

in ejb-jar:
<session>
<env-enty>
<env-entry-name>property1</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>wellsw</env-entry-value>
</env-entry>
in the bean:
String value = (String) jndiInitialContext.lookup("java:comp/env/property1");
java:/com/env is the so-called enterprise naming context; it always points to the naming context of the bean who uses it.
hth
Peter.

Similar Messages

  • How do you communicate between flash and java?

    Hi,
    How can you pass parameters between a Flash movie and a Java applet running on the same machine? I would like to do this without opening a new browser window or putting parameters in the url of the browser window that is running the Flash movie.

    Flash supports Javascript , check out actions.
    set the URL like you would the Javascript for
    making a method call from a webpage.
    make sure that Scriptable <PARAM> has been set to true.

  • PLEASE HELP. How do you access properties files in WEB-INF  and classes directory

    We have a war file that needs to access properties files that are in the WEB-INF directory
    of the war file. We also need to load one of the properties files from the classpath.
    However, when we deploy the application ( an ear which inlcludes an ejbjar and a
    war and the libraries both the ejbjar (with a manifest setting the classpath ) and
    war need ) the properties don't get extracted.
    In some of our servlets we are trying to access those files with the path "WEB-INF/foo.properties"
    and we get a FileNotFoundException. Then we check and see that NO properties files
    have been extracted into their appropriate places ( not even those we throw into
    the WEB-INF/classes directory ).
    PLEASE HELP,
    Christian Hargraves

    The file doesn't have to be extracted from the war. For example, you can place
    test.properties into your app WEB-INF and write a simple JSP to see how it
    works:
    <%
    InputStream in = application.getResourceAsStream("/WEB-INF/test.properties");
    %>
    It will return you a zip inputstream if you deployed your application as a .war.
    Christian Hargraves <[email protected]> wrote:
    I try this, but I get a NullPointerException. The file never actually gets extracted
    from the war. Under tomcat and resin this works great ( that's why I am having all
    of the trouble i am having ), but there are absolutely no properties files in the
    extracted directories for WebLogic deploys. only:
    WEB-INF/some_tmp_dir/WEB-INF/lib
    and then some dynamically generated jor file with all of the classes that would normally
    go in WEB-INF/classes ( all except the properties, of course, which are no where
    to be found. ).
    There has to be some kind of setting I am missing. Please don't make me seperate
    these properties files from the war/ear and then put the path to these properties
    files in the CLASSPATH, changing one step to three steps to deploy!!
    I have found a documented bug where you can't even put the properties files in a
    jar file and that bug will never be fixed for WebLogic 6.1.
    "Dimitri I. Rakitine" <[email protected]> wrote:
    To access files in WEB-INF you can use ServletContext.getResourceXXX("/WEB-INF/filename")
    Christian Hargraves <[email protected]> wrote:
    We have a war file that needs to access properties files that are in theWEB-INF directory
    of the war file. We also need to load one of the properties files fromthe classpath.
    However, when we deploy the application ( an ear which inlcludes an ejbjarand a
    war and the libraries both the ejbjar (with a manifest setting the classpath) and
    war need ) the properties don't get extracted.
    In some of our servlets we are trying to access those files with the path"WEB-INF/foo.properties"
    and we get a FileNotFoundException. Then we check and see that NO propertiesfiles
    have been extracted into their appropriate places ( not even those wethrow into
    the WEB-INF/classes directory ).
    PLEASE HELP,
    Christian Hargraves--
    Dimitri
    Dimitri

  • How do you communicate with Adobe?

    When Adobe doesn't accept a legitimate serial number when I try to re-install Photoshop Elements how do I get technical support?

    Now that we have your post in the correct forum, I would like to ask a few questions, to determine the best course of action, please:
    Which version of PsE do you have?
    What OS version are you running it on?
    Did you buy PsE directly from Adobe (the Adobe Store), or from a certified reseller, such as directly from Amazon?
    Did you buy the program with physical media, i.e. DVD's, or as a download?
    If you did buy from a certified reseller, did you Register your software with Adobe?
    Have you logged into Adobe.com with your Adobe ID and password, and looked under My Products to verify that you have the correct S/N?
    As Trevor mentions, if you go to Customer Support, you can do Live Chat (click on "I still have a problem" to sort out many issues, such as S/N's, Activations, etc.
    Good luck,
    Hunt

  • How do you communicate with a USB RAW camera

    I have a USB camera which I am trying to control using LabView. I have followed the tutorial, Using NI-VISA 3.0 to Control Your USB Device, and the device is now recognized by MAX. The device came with demo software allowing me to control it through the PC, i.e. change exposure controls, white balance controls, tell it to stream video and when to capture a still image. All I really need to do with LabView is load initial settings to the camera, tell it when to begin streaming video, tell it when to take a still image, and tell it when to stop streaming video, but I have no idea how to talk to the camera from here. For example, I am not sure if my device uses Bulk, control, or an interrupt pipe, and I am not sure how I can read and write from my device even if I knew the appropriate pipe or endpoint. I also noticed that the "VISA USB RAW Control" VI has fields such as "request", "request type", "index", etc. I read some notes trying to figure out what these meant, but I couldn't find anything. With all that said can anybody name any tutorial/article(s) I should read that will help point me in the right direction?  Any help will be appreciated.

    Hello kd,
    Dennis pointed you to the correct link.  You will need the NI-IMAQ for USB Cameras driver to acquire images from a DirectShow USB camera into LabVIEW.  As you can see from the attached table image, you will need the NI Vision Development Module 8.5 for LabVIEW 8.5.  You can determine which version of the NI Vision Development Module that you have installed by opening the NI Measurement and Automation Explorer, expanding the Software section under My System, and looking for an item called "NI Vision."  By single-clicking on the NI Vision item, you will bring up information, including the version number, in the Attributes tab off to the right. 
    Best Regards,
    T. McCarty 
    Attachments:
    APImap.png ‏16 KB

  • How do you add/make properties to layers/timeline without shortcuts?

    How do you add scale, position etc to a layer on the timeline without using shortcut keys?
    I used the tools to scale and whatnot, and know you can use shortcuts but is there a menu where you can add those properties and make them show up in the timeline?

    I'm not sure that I understand your question.
    Every layer has a Position property and a Scale property. You don't need to add them.
    If you're asking about how to _show_ the properties, then it's just a matter of clicking the triangle next to the layer name in the Timeline panel and then clicking the triangle next to the name of the property group. (The Position and Scale properties are in the Transform property group.)
    See this page: "Layer properties in the Timeline panel"
    Since you're new to After Effects, I strongly recommend that you start here:
    http://blogs.adobe.com/toddkopriva/2010/01/getting-started-with-after-eff.html

  • How do you get the text box text properties dialog box to appear on a MAC?

    how do you get the text box text properties dialog box to appear in Adobe Reader XI on a MAC? I know windows is Ctrl-E but can't figure out what to hit for Mac.

    Right-click the toolbar and you should find it there (including the short-cut, which is probably Cmd+E).

  • How do you change the click box properties (line colour and width) in Captivate 7.0?

    How do you change the click box properties (line colour and width) in Captivate 7.0?

    Yes certainly, we can do that, insert a smart shape and use it as a button, then go to the properties pane, change the Alpha to 0, that will make it transparent, and add the stroke color as red and increase the width.
    In case of a button, you have to select button type as transparent and do the same.
    Thanks.

  • How do you print a list of bookmarks which includes addresses and properties?

    How do you print a list of bookmarks which includes addresses and properties?

    Which properties do you want included?
    See also:
    *[[/questions/748417]]

  • How do you change multiple plot properties programatically?

    How would you programatically change the color and line size of different plots? I know you create a property node but when I do that I don't seem to be able to specify which plot I want to change.
    For example: plot 1 is green w/ dotted line, plot 2 is red with solid line.
    I want to programatically change say plot 1 to a blue solid line and plot 2 to a yellow line.
    There is a "plot name" property but no matter what name I specify it changes all the plots.

    First, you have to use the "Active plot" property, as in the attached example...
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    MultiPlot colors.vi ‏49 KB

  • How Do You Add Multiple CSS Rules to Text?

    Hi everyone, I have these css rules in my css styles window they are all assigned to some text in a cell on my page.
    .Def14grey4 <body>
    .def14grey4 a:link <a>
    .def14grey4 a:visited <a>
    .def14grey4 a:hover <a>
    .def14grey4 a:active <a>
    .def14grey4 a:focus <a>
    How do you add (all of) these styles to the text in the first place, I know how to add the first one (.Def14grey4), you select the text in the cell and choose the rule from the drop-down menu in the css panel, but how do you add the other ones to some text as well, so that it can have the same link properties.
    Basically I have some more text elsewhere on the page and want to assign these rules to that as well.
    thanks Gareth

    You would want to change your order as shown here -
    .Def14grey4 <body>
    .def14grey4 a:link <a>
    .def14grey4 a:visited <a>
    .def14grey4 a:hover, .def14grey4 a:focus <a>
    .def14grey4 a:active <a>
    That way, the hover and the focus states are equivalent.
    How do you add (all of) these styles to the text in the first place, I know how to add the first one
    You don't really.  The 4 bottom selectors say -
    "find an element with a class of 'def14grey4', and style any link inside that element this way"
    So, <span class="def14grey4"><a href="whatever.html">Whatever</a></span> would get the pseudo-class styles, as would any of the following -
    <span class="def14grey4"><a href="whatever.html">Whatever</a></span>
    <td class="def14grey4"><a href="whatever.html">Whatever</a></td>
    <p class="def14grey4"><a href="whatever.html">Whatever</a></p>
    <body class="def14grey4"><a href="whatever.html">Whatever</a></body>
    <div class="def14grey4"><a href="whatever.html">Whatever</a></div>
    <strong class="def14grey4"><a href="whatever.html">Whatever</a></strong>
    and so on.  These examples assume that there isn't some other more specific rule that would apply to the same links.  You need to study up on the CSS cascade and specificity....

  • How can you get your submit buttons to be a single click instead of the default double click?  (The

    How can you get your submit buttons on the quiz template to be a single click instead of the default double click?  (The option to choose double click or not is not showing in properties for this).

    Hmmm... Submit button doesn't need a double click at all. Maybe you are talking about the two-step process? When you click on Submit, the feedback appears with the message to click anywhere or press Y. Is that what you are talking about? If you are talking about a real double-click, something must be wrong in your file. And which version are you using?
    http://blog.lilybiri.com/question-question-slides-in-captivate
    Lilybiri

  • How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?

    How do you grey out/disable fields under a radio button if another radio button is selected in Adobe Acrobat XI Pro?
    I’m creating a form where the user has three options to make a payment.
    1. charge to my credit card
    2. charge associated costs to bank account
    3. By cheque or money order
    My Problem is, under each option, there are required fields that has to be filled out. So if the user picks the first option, charge to my credit card, they would fill out the required fields (credit card number, expiration date etc.). But when they click submit button to submit the form, it won’t let them, because there are required fields under the second option. Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it. So what I'm trying to do is this: If the user selects the radio button for option 1, the other two options are greyed out/disabled. And if the user holds down the shift key and clicks radio button for option one again, it unchecks the radio button and the other two options are available again. Is there a way to grey out or disable the two other payment options when the other one is picked. I’m assuming I will have to use javascript, but what would the coding be and which field do I write it under?
    Thanks in advance guys

    You will have to use custom JavaScript to access the various properties of the field object.
    The radio button group has a value. When no button is selected that value is "Off". When an individual button has been selected the value for the group will be the option or export value for that individual button.
    Once you have determined the button selected, then you will know the form fields that need to be made required. You use JavaScript to access those fields and change the "read only" property to false, and set the "required" property to true. For the fields associated with the other options, those fields should be reset, made read only, and have the "required" property set to false.
    Disabling (graying-out) Form Fields
    >> Also, I have the radio buttons for the three options setup so that if the user holds the shift key and clicks a radio button, it unchecks it.
    Radio button in a PDF do not work that way. Only check boxes can be unchecked by clicking on one that has been checked.
    If you plan the coding for the Mouse UP action to test for all possible options and code for each of those options you should have what you want.
    If you want actual code you need to provide a lot more details.
    It is even possible to perform some credit card and bank routing number validations with JavaScript and some check digit formulas.

  • How do you prevent Acrobat PDFMaker from rasterizing vector graphics?

    I am using the "Create PDF" button (provided by the Acrobat PDFMaker in Acrobat X) to create a PDF from a Microsoft Word 2010 document.
    This works fine, except that vector graphics in the Word document appear in the resulting PDF as raster graphics. (That is, when I zoom in, document text outside the graphics appears smooth, but the graphics are blocky; and text inside the graphics that should be retained as text - it's not converted to curves - is just pixels.)
    The original artwork for the vector graphics is in CorelDRAW X6 (sorry, Adobe!).
    I have exported the following files from the original vector drawing in CorelDRAW:
    - EPS (with TIFF preview)
    - Windows metafile (.wmf)
    - Enhanced metafile (.emf)
    I can insert any of these files into Word okay (Insert > Picture), but the resulting PDF always contains a rasterized (bitmapped) version of the vector graphic ("line art").
    From memory, this didn't use to happen in my previous working environment (Acrobat 8 Pro with Word 2003, using artwork exported from CorelDRAW 12).
    How do you prevent Acrobat X PDFMaker from rasterizing vector graphics? Or is Word 2010 (or CorelDRAW X6) somehow to "blame" here?

    Transparency Flattening is being invoked.
    From the Create PDF button, select Properties, what is your setting for Default Settings? Select High Quality Print

  • How do you edit text that is in a text box?

    How do you edit text that is in a text box?  I just want to change the font color of the text.  Solution in the Help files recommends selecting the text and then selecting Optional) To make further changes to the text box:
       Using the Select tool or the Text Box tool, click an edge of the text box to select it, and then drag a corner to resize it. Use the Properties toolbar to change the border and fill options.
       Double-click the text box to edit the text or change the text attributes. Drag across text to select it, and then select options from the Properties toolbar.
    This is what the help files recommend
    (Optional) To make further changes to the text box:
       Using the Select tool or the Text Box tool, click an edge of the text box to select it, and then drag a corner to resize it. Use the Properties toolbar to change the border and fill options.
       Double-click the text box to edit the text or change the text attributes. Drag across text to select it, and then select options from the Properties toolbar.
    When I try the above solution I don't have a  "Options" in the "Properties" toolbar.
    Why would they change a process that was so simple in previous editions to such a hidden awkward process?

    Try with a Brightness/Contrast adjustment layer and/or changing the blending mode.
    If the effect is too much for the rest of the bulb, you may be able to mask it out.
    It would help if you post a representative picture here on the forum page for us to look at.

Maybe you are looking for

  • I want Verizon Fios!

    First off, my apologies if a message like this has already been posted here, but I really want Fios!  I need the super fast internet connection and my DSL just doesn't cut it with the amount of photos I need to upload.  This quote prompted me to post

  • How to publish all the services in sicf

    Dear All , I have installed SRM 5.0 (ABAP+JAVA) . I am new to SRM, please help me how to publich all the servers which are in ' sicf ' Also please let me know whether any exta steps need to do after SRM instalation. Is there any specific SAP doc. for

  • Can Rules in Mail be viewed in Alphabetical Order? How is this done?

    Can Rules in Mail be viewed in Alphabetical Order? How is this done?

  • Oracle Developer 10g

    Hi, I installed Oracle Developer 10g onto my machine but when I opened the Report, it crashes, I then figured out that I need to apply the patch 7047034. But this patch needs to be applied using Opatch. When I run the opatch, it gives me following er

  • Demarrage de photoshop element

    Bonjour, Je possede Adobe Photoshop Element 9. J'ai acquis un ordinateur ASUS G750 avaec windows 8. J'ai effectué l'installation de P. E. 9, qui c'est tres bien passé ( sans aucune erreur ). Quand je met en route le logiciel j'obtient l'écran me prop