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

Similar Messages

  • 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

  • How to Create web service using JMS with PUB/SUB pattern.

    Hi All,
    I need to expose web service using JMS with PUB/SUB pattern.
    if you have any source for this.
    I tried to use @WLJmsTransport annotation but unable to get it done.
    I have configured all JMS server, topic, and connection factory.
    Thanks.

    Hi, I am having web sample web service program which is simple one.
    But I need to Modify this to JMS enable.
    Can any one help me?
    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!

  • How to use JMS with tomcat and Axis

    Hello
    I'm new in ii, so i'm still a little bit lost. I have been implementing web services with tomcat and Axis. However, these services are synchronous and I would like that some services were asynchronous.
    I've been reading about the topic and I've found that JMS is a good solution for it. I have already downloaded JMS in my computer but now I don't know what else to do. I've been trying to run the SimpleQueueSender.java example but I get the error:
    JNDI API lookup failed: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    But I have attached all .jar from F:\Sun\MessageQueue\lib
    In addition to this, for my first webservices I used the Java2WSDL, WSDL2Java and AdminClient (axis tool) to create my web services bindings, stubs and skeletons and to deploy the web service on the server. Do I have to use them now with JMS? or now the deployment must be performed in a different way?
    Thank you in advanced,

    The error means that you have to specify the type and location of your jndi store. You could create a jndi.properties file and put two properties in it:
    java.naming.provider.url=file\\\:////var/jndi
    java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    for a file based jndi store. Then you have to make sure your jndi.properties file is in your CLASSPATH. Then you have to use something like imqadmin to create your jndi store and store in it your administrative objects like Queues and QueueConnectionFactories.

  • 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

  • Using JMS from EJB

    Hello,
    In fact I have 2 questions.
    1). Can I use JMS inside my EJBeans (I mean, obtain connections, create sessions, create producers/consumers, send/receive messages)? If I can not, please explain in a couple of words, why?
    2). Can I use static variables inside entity beans?
    Any suggestions will be highly appreciated.
    Thank you,
    densimf.

    1. yah i think there is no issue in this
    2. entity bean object represent a single row in a database. so doesnt understand the significance of having a static field in this. generally it is not used i feel.

  • 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

  • URGENT -- Problem in using JMS with JBOSS

    Hi,
    My jar file which includes my Java/JMS classes can easily be executed when I use Sun Application server, but I don't know how I can change execute the same jar file in when I switch to JBOSS. Do I need to use ants? or I can use the original jar files?
    thanks,

    It can depends on your application, but basically in order to run JMS JBoss client application you need:
    1) Set proper jndi settings, e.g. by placing jndi.properties to the root of your classpath.
    2) Add some jars to your classpath from client folder of your jboss AS distribution. My latest application works well with concurrent.jar, jnp-client.jar and jbossall-client.jar on the classpath.
    You can read more at http://docs.jboss.org/jbossas/guides/j2eeguide/r2/en/html/ch6.chapt.html It is valid for all the 4.x jboss versions. Check jboss samples also.
    Best Regards,
    Roman

  • 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

Maybe you are looking for