Do i have to use JNDI with EJBS?

Hi
I want to use JNDI to lookup a system which i will send messages to using JMS. I would like to have some java classes on Tomcat to do the job. But...whenever i hear about JNDI it is always in relation to EJBs. Can i only use JNDI with EJBS?
If i can use JNDI is there anything important i need to know about.
Thanks in advance!
San H.

You can definitely use JNDI outside of EJB's - in particular, it's a great interface for dealing with LDAP servers, even securely, and can also be used for DNS interfacing, COS, RMI registries, etc.
While JNDI was chosen as the method by which J2EE components can locate other components in a distributed environment, it's by no means limited to that task :) It's a wonderful API, and in terms of things you need to know, most everything is covered fairly well at the JNDI tutorial in the various trails that are mapped out there.
http://java.sun.com/products/jndi/tutorial/
Good luck!
James
James Manning | Principal Engineer
Porivo Technologies, Inc.
919.806.0566 | [email protected]
http://www.porivo.com/
Measuring end-to-end Web performance.
Register for a FREE Performance appraisal:
http://www.porivo.com/peerReview/eval.html

Similar Messages

  • Do i have to use JMS with EJBS?

    Hi
    I want to use JMS as a messaging system (a queue) between my system and someone elses. I would like to have some java classes on Tomcat to do the job. But...whenever i hear about JMS i always hear it in relation to EJBs. Can i only use JMS with EJBS?
    If i can use JMS is there anything important i need to know about.
    Thanks in advance!
    San H.

    As far as I understand you are use JNDI and JMS is not bound with EJB's. These are java API's which are independent. Like JDBC you can use with Servlets, Applets, standalone applications, EJB, JMS etc etc.......
    In the same way you can use JNDI and JMS with diferent API. And the important feature of Java is that all java API interact with each other when these are independent. I would appricate comments of everyone......................Thanks

  • I have a used Iphone with someone elses email on it for itunes, how do i remove it and put my account there

    I have a used Iphone with someone elses email on it for itunes, how do i remove it and put my account there
    It is an Iphone 4

    If you go to settings- store - click on the ID and sign out. Then you can put in your apple id.

  • Problems using JAAS with EJB 3.0 on JBoss 4.0.4-GA

    Hello all,
    I am trying to build a very simple JavaEE application with JAAS, but I getting mad.
    I have an EAR packed with a WAR module an EJB JAR module and a JAR with other classes. Struts is the MVC framework and EJB 3.0 is been used.
    First of all, I configured the "login-config.xml" file within /conf directory in JBoss, like this:
    <application-policy name="exemplo1">
         <authentication>
              <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
                   <module-option name="dsJndiName">java:jdbc/Infra_Seguranca</module-option>
                   <module-option name="principalsQuery">SELECT COD_USUARIO AS Password FROM USUARIO WHERE COD_USUARIO=?</module-option>
                   <module-option name="rolesQuery">SELECT NOME_ROLE AS Roles, 'Roles' AS RoleGroups FROM ROLE_USUARIO WHERE COD_USUARIO=?</module-option>
              </login-module>
         </authentication>
    </application-policy>Next I configured the "web.xml" file like this:
    <security-constraint>
         <web-resource-collection>
              <web-resource-name>Restricted</web-resource-name>
              <description>Declarative security tests</description>
              <url-pattern>*.do</url-pattern>
         </web-resource-collection>
         <auth-constraint>
              <role-name>xxx</role-name>
         </auth-constraint>
         <user-data-constraint>
              <description>no description</description>
              <transport-guarantee>NONE</transport-guarantee>
         </user-data-constraint>
    </security-constraint>
    <login-config>
         <auth-method>FORM</auth-method>
         <realm-name>exemplo1</realm-name>
         <form-login-config>
              <form-login-page>/login.jsp</form-login-page>
              <form-error-page>/loginErro.jsp</form-error-page>
         </form-login-config>
    </login-config>
    <security-role>
         <description>Role xxx</description>
         <role-name>xxx</role-name>
    </security-role>Notice that I am using the "xxx" role to protect the "*.do" URL pattern.
    The "jboss-web.xml" is like this:
    <?xml version="1.0"?>
    <jboss-web>
         <security-domain>java:/jaas/exemplo1</security-domain>
    </jboss-web>As it is, it works perfectly, which means, every time I try to access a "*.do" URL it verifies whether I am authenticated and have authroization or not. If not, the login page shows up.
    Now I wanna to be able to also protect my EJBs.
    My Stateless Session Bean is implemented as follow:
    @RolesAllowed("yyy")
    @Stateless(name="UserManagement")
    public class UserManagementBean implements UserManagement {
         public void add(User user) {
    }When I run all this, the container simply igoners the @RolesAllowed("yyy") annotation and allow the EJB execution.
    If I add the "jboss.xml" file, like this:
    <?xml version="1.0"?>
    <jboss>
         <security-domain>java:/jaas/exemplo1</security-domain>
    </jboss>I start getting this stack trace:
    ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files
    java.io.IOException: No properties file: users.properties or defaults: defaultUsers.properties found
    at org.jboss.security.auth.spi.Util.loadProperties(Util.java:313)
    at org.jboss.security.auth.spi.UsersRolesLoginModule.loadUsers(UsersRolesLoginModule.java:186)
    at org.jboss.security.auth.spi.UsersRolesLoginModule.createUsers(UsersRolesLoginModule.java:200)
    at org.jboss.security.auth.spi.UsersRolesLoginModule.initialize(UsersRolesLoginModule.java:127)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    ... Am I missing something? What do I have to do to get JAAS working fine with my EJBs? Do I have to also configure and/or provide "ejb-jar.xml" ???
    Thanks
    Daniel

    Using @SecurityDomain("exemplo1") in my EJB and NOT providing jboss.xml, it works.
    @SecurityDomain("exemplo1")
    @RolesAllowed("yyy")
    @Stateless(name="UserManagement")
    public class UserManagementBean implements UserManagement {
      public void add(User user) {
    }Damn! This is some serious shit... I don�t want to configure this in every single EJB.
    EJB 3.0 is nice, but some small trivial details like this and others, that was forgotten by Sun, piss me off!

  • Using CallRouter with ejb

              Hi,
              Can anyone plz let me know how do I use CallRouter class with
              ejb. The tool weblogic.ejbc is used to generate stubs and skeletons ..
              thanx
              pradeep
              

    You need to have the <home-call-router-class-name> tag in your
              weblogic-ejb-jar.xml
              see below
              http://e-docs.bea.com/wls/docs61/ejb/reference.html#1070646
              Kumar
              "pradeep bhat" <[email protected]> wrote in message
              news:3c9356e4$[email protected]..
              >
              > Hi,
              > Can anyone plz let me know how do I use CallRouter class with
              > ejb. The tool weblogic.ejbc is used to generate stubs and skeletons ..
              > thanx
              > pradeep
              >
              >
              

  • I have been using extensions with V8 for several weeks and with last Firefox update this morning all are gone and I can't get them going again!

    I installed V8.0.1 several weeks ago (or what I thought was V8.0.1) and got Awesome Screenshot (A.S.). Although it was stated that AS was not compatible with V8.0.1 I installed it any way and it worked. I have been using it every day until this morning. Another Firefox update came down this morning. Although I clicked the “Update Later” box, it updated at that time anyway. (This has happened every time I received an update in the past and clicked “Update Later” box, but that another problem; not the issue today.) After today’s update completed and I restarted Firefox. I check the version and it still was V8.0.1. All of my extensions were gone. I followed the instruction for re-enabling. All of the extensions were marked “disabled”. Only two of them had “enable” buttons (Garmin Communicator and InvisibleHand), both of which I didn’t load nor use. All extensions had “Remove” buttons. Is there any way for me to get A.S. working, I use it often. If not, how about “Screengrab”. That’s better than nothing.
    I am using Windows XP Professional SP3.
    Thanks for your help.
    Andy Marino
    [email protected]

    There is a known issue where multiple instances of plugin container open if history or cookies are cleared. Are you, or some utility clearing firefox cookies or history, that could be the reason. This problem continues even if plugins are disabled in Firefox.
    *Are you opening multiple instances of Flash Player ?
    * Is the problem reproducible ? <br/> for instance does it always crash the plugin or cause it to hang if you use a particular site ?
    If you get the FlashPlayer plugin crashing use the option to submit the crash reports, it is then possible to follow them up. It is possible to stop the plugincontainer opening, but that could result in a firefox crash. Of course the firefox crash can also send crash reports out, and that could be useful.
    * see [[plugin crash reports]]
    * [[what is plugin-container]]
    * [[firefox crashes]]
    There are some problems with FlashPlayer currently under investigation, and there may be other threads in the forum about problems. (e.g. Bug 561019 - Plugin waveOutOpen hangs )
    Sometimes using Firefox 3.6 is a workaround that helps with FlashPlayer problems, if you wish to experiment with that consider installing firefox Portable and using Firefox 3.6.23 (or soon 3.6.24) for tests with flash player, whilst keeping firefox 7 for day to day browsing.
    * [[http://portableapps.com/apps/internet/firefox_portable/localization#legacy36]]

  • Do you have to use Compressor with DVD Studio Pro?

    Hello,
    I'm trying to find a way to streamline bringing QuickTime Movies made in FCP6 into DVDSP.
    When I try to import QT Movies or movies compressed with H.264 into DVD Studio Pro, I get the error message: "Incompatible Format".
    Is there anyway to get QT Movies into DVDSP successfully without using Compressor?
    The least applications I have my students using for this, the better.
    It's odd to me because you can go directly from QT Movie into iDVD with no such problems.
    Thanks,
    Marc Griffin
    Message was edited by: Marc Griffin

    Hi Steve,
    Thanks for the quick response. The rationale of our workflow is to avoid using Compressor to simplify the process for our students making DVDs. But if we are going to have to use Compressor to change the frame rate, as you suggested, then we're just going to have to live with using the application.
    We'd consider burning High Def DVDs, but with the format war between BluRay and HDDVD, and a general lack of High Def players and Monitors on the general marketplace, we are going to have to stick with SD DVDs for the time being.
    Resultantly, we're going to be stuck with using Compressor in our DVD burning workflow.
    Thanks Everyone For Your Help!
    Marc Griffin

  • I have problem using sbh50 with sony z1

    when i use sbh50 with my z1 during call the screen stays on I want it off how can i solv this problem ?????

    Try settings-apps-all-smart connect,force stop and clear data.Restart the phone.
    All we have to decide is what to do with the time that is given to us - J.R.R. Tolkien

  • Error in using Hibernate with EJB

    I have generated my Hibernate related configurtion file,POJO Classes & hbm files using MyEclipse 5.0. And Iam using JBuilder 10.0.176.0
    to develop the EJB module. When i try to compile my module it is saying POJO class is bad.
    "Bean2InsertBean.java": cannot access ejb_hibernate.Testsql,bad class file: D:\MyJava\bea\OurClasses\ejb_hibernate\Testsql.class,class file has wrong version 49.0, should be 48.0,Please remove or make sure it appears in the correct subdirectory of the classpath.
    But the classes are in correct directory.

    It looks like you have compiled the POJO class with Java 5 version whereas you are compiling the EJB module with Java1.x (i.e. a lower version). Compile the POJO class with Java 1.x and then try compiling the EJB module with the same version

  • Problem using XSU with EJB

    Hello
    1) I have trouble when using the Oracle XML SQL Ulitity (XSU) with Enterprise Java Beans (EJB).
    This is due to that
    oracle.xml.sql.OracleXMLSQLException extends RuntimeException
    i.e. is interpreted by the EJB container as a system exception.
    (java.sql.SQLException extends Exception)
    2) Is there anywhere I can submit a change suggestion to the XSU developer team?
    Regards
    Ole

    Hello
    1) I have trouble when using the Oracle XML SQL Ulitity (XSU) with Enterprise Java Beans (EJB).
    This is due to that
    oracle.xml.sql.OracleXMLSQLException extends RuntimeException
    i.e. is interpreted by the EJB container as a system exception.
    (java.sql.SQLException extends Exception)
    2) Is there anywhere I can submit a change suggestion to the XSU developer team?
    Regards
    Ole

  • How to  use Timing with EJB in J2EE1.3

    Hi,
    I am developing an EJB app where I need some sort of timing service. Unfortunately, I can't resort to the EJB Timer Service which is available under the J2EE1.4 spec, because the server I am working on is only J2EE1.3 compatible.
    I understand that I cannot use threads as they would intervene with the EJB thread handling.
    Can anybody give me an idea what I could use instead? Is there any trivial solution this? I'd be thankful to hear it..
    Regards,
    Katrin.

    Cross-post
    http://forum.java.sun.com/thread.jspa?threadID=730563&messageID=4204123#4204123

  • Is it possible to use JSP with EJB

    A pretty dumb question.
    JSP + Servlet + DB can be used together to write a j2EE application, such as some shopping system.
    But what's the usage for EJB? Does it still need JSP to do the output to client?

    To use a JSP with an EJB:
    Create a taglib for the EJB and access the EJB in the JSP with the taglib.
    WebLogic provides the EJB to JSP integration tool.
    http://e-docs.bea.com/wls/docs61/jsp/ejb2jsp.html

  • I have problems using gmail with firefox

    When I get connected in internet using Firefox, and then I open my e-mail, which is g-mail, I see my entrance mailbox, and I received e-mails, but I cannot write a new e-mail, or print, or send, etc. I cannot do anything with my e-mails.
    My g-mail works with Internet Explorer but not with Firefox.

    What kind of problems do you have?
    * https://support.mozilla.com/kb/Basic+Troubleshooting
    * https://support.mozilla.com/kb/Browsing+basics

  • Do I have to use ImageMixerSE with the Canon Vixia HF 10, or is there something newer or better?

    I have an old school Canon Vixia HF 10 and it came with the Pixela ImageMIxerSE software which i have update to the most recent version but it is painfully slow even though I am running 16gb of ram with an I7 processor.  Can I use the newer Canon software or is there something else?

    You can use any commerical NLE, (non-linear editing) software to transfer your clips, make movies, and burn to disk. My favorite is the Sony Vegas lineup,which starts at $50.00. As the HF 10 uses AVCHD recording format the Movie Studio Platinum with accelerated AVC/H.264 encoding may be best. Often though it is not the software that is slow, rendering takes time.
    http://www.sonycreativesoftware.com/vegaspro/compare
    Good Luck
    Mark

  • I have been using Firefox with no problems recently updated to new version and now getting message "The proxy server is refusing connection firefox is configured to use a proxy server that is refusing connection" what do I do?? thanks

    As above, was using the updated version for a short time before this happened

    You may have installed an extension that made changes to the connection settings.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily.

Maybe you are looking for

  • How to port a number from a Family Share plan?

    This is my situation.  I am the Account Owner on a Family Share plan with 2 lines. My husband is an Account Manager.  I know I need to do an Assumption of Liability to make my husband the Account Owner and he will be able to keep his number and chang

  • Custom Purchase Order Report

    Hi, We are trying to move away from pre-printed carbon copy forms and print Purchase Orders to our laser printer. To do this we need to customize our Purchase Order (landscape) report to include our Company logo/information and formatting lines/boxes

  • How to send Array data using Post Method?

    Var array = $_POST['myData']; array[0] => 'ABC' array[1] => 'DEF' how to improve this code to support send array data...? String url ="http://xxxxx/test.php"; String[] arraystr={"ABC", "DEF", "EDFF"} String parameter = "myData=" +arraystr;    // no s

  • HT203167 lost my hard drive how can i get songs from ipod back to new computer

    I lost my hard drive and want to get my music back on my new computer. How can I get songs from my ipod to my computer? I am afraid to sync it and losing what is on my ipod. Any help would be appreciated.

  • Class.forName how can I invoke a unknown method

    I have a code like this: public class Detonator { String cName; String mName; public Detonator(String className, String methodName) { cName = className; mName = methodName; // in this place I want to do something like cName.mName() // Is it possible