J2EE question.. ftp in a session bean

Hi guys,
pretty new to j2ee. I need to make a system that retrieves some files using ftp and manipulate teh files and return to a servlet the link to file (which will live on a webserver).
I read that java.io package should not be used with ejb's. the MDB thats using the ftp api that i created seems to run fine, with no errors. However the files aren't showing up. Am i missing something here?
I give an absolute path to where the files should be downloaded. all i know is that the files don't show up there and that tehre are no exceptions. Could weblogic be storing the files somewhere else?
can ejb's give make directories adn files on the server where they're running?
where does "/" refer to when given in a ejb? is it the root of the file
system or some other location?

grr.. never mind.. its working
sorry!

Similar Messages

  • Question about the Create Session Bean Wizard

    Hi,
    I'm using the Session Bean Wizard to generate a session facade in EJB 3.0. In step 2 «choose methods to expose through this facade», I only see 2 methods generated for each entity: findAll and remove.
    When I click Help on this page, the documentation specify the following:
    «Use the tree control to specify the core methods and entity methods you want to generate. Core Facade Methods Theese methods are used for basic CRUD (create, read, update, delete) functionality. »
    So why is the wizard only offering to generate findAll and remove?
    Also the remove method generated does not seem to delete anything as in the following :
    public void removeDcaRole(DcaRole dcaRole) {
    final EntityManager em = getEntityManager();
    try {
    final EntityTransaction et = em.getTransaction();
    try {
    et.begin();
    dcaRole = em.find(DcaRole.class, new DcaRolePK(dcaRole.getDcaNo(), dcaRole.getTRoleCode()));
    et.commit(); // where is the delete ???
    } finally {
    if (et != null && et.isActive()) {
    et.rollback();
    } finally {
    if (em != null && em.isOpen()) {
    em.close();
    Can I use the remove method as a starting point to an update ?
    Any comment on this would be appreciated.

    There are update and insert methods under the "core" section/
    See this image : http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_ejb_30/images/b20105.gif
    You might want to follow this tutorial to see how it works:
    http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_ejb_30/ejb_30.htm#t4

  • Newbie question: Can't see session bean in business operations after deployment

    Hi,
    I've just deployed a session bean (using WLS 7.0) sucessfully, but I can't see
    the deployed EJB in the business operations in studio. Am I suppose to update
    something on the integrator side that references the EJB? Or is there something
    else? Any help would be greatly appreciated.
    Thanks
    Aashish

    Hi,
    Sorry, but I don't know what you mean.
    Could you explain it more detailed, please?
    I see following, when start integrator.bat:
    [code]
    Developer 4.7 Build 999
    Exception in thread "Thread-3" java.lang.NullPointerException
            at com.wm.app.b2b.dev.DevConnectDialog.itemStateChanged(DevConnectDialog.java:253)
            at javax.swing.JComboBox.fireItemStateChanged(Unknown Source)
            at javax.swing.JComboBox.selectedItemChanged(Unknown Source)
            at javax.swing.JComboBox.contentsChanged(Unknown Source)
            at javax.swing.AbstractListModel.fireContentsChanged(Unknown Source)
            at javax.swing.DefaultComboBoxModel.setSelectedItem(Unknown Source)
            at javax.swing.JComboBox.setSelectedItem(Unknown Source)
            at com.wm.app.b2b.dev.DevConnectDialog.<init>(DevConnectDialog.java:210)
            at com.wm.app.b2b.dev.DevMainFrame.doConnect(DevMainFrame.java:759)
            at com.wm.app.b2b.dev.DevMain$1.run(DevMain.java:195)
            at java.lang.Thread.run(Unknown Source)
            at com.wm.ui.UiFrame$7.run(UiFrame.java:344)
    [/code]
    Thanks.

  • How Stateless Session Bean instances in pool

    Hi,
    I am not clear about , stateless bean having "pool" of objects to be used by multiple clients.when those instances will be created or who will generate them.
    Is this pool specific to ejb container or any vendor container.
    thanks in advance,

    Hi , my question is about Stateless Session Bean ,
    how StatelessSession bean will behave when some 100
    clients wil call homeObject simultaneously.The EJBs(including stateless) are single threaded so one client can access one Bean at a time. As per your question if some 100 clients are invoking home.create() method then it has to invoke on 100 EJBs. The instance pool size can be specified while deploying. In the descriptor (application server speific). So if the number of simultaneous clients is more than the pool size then some clients have to wait.
    Now my second question is how and who will create
    these instance .The container will create the pool as per the application server spcific deployment descriptor.

  • Caching Session Beans

    Is there any way to cache Stateless-session beans? We have the following
    set up in the descriptor file:
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>statelessSession</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>3000</max-beans-in-free-pool>
    <initial-beans-in-free-pool>3000</initial-beans-in-free-p
    ool>
    </pool>
    </stateless-session-descriptor>
    <jndi-name>ejb20-statelessBean</jndi-name>
    </weblogic-enterprise-bean>
    for some reason, the bean is loaded as specified, but is being called from
    disk for each process, not from the pool/cache.
    Any help would be appreciated.
    Thanks

    I'm not sure that I understand your question.
    For stateless session beans, we keep a pool of instances. When you make a
    method call, we grab an instance from the pool. When the method call
    finishes, we return it to the pool.
    There's probably no reason to set this value to 3000. Unless you recursively
    call your own instance, you'll never use more slsb instances than you have
    execute threads in the server. The default max-beans-in-free-pool value
    gives you the maximum parallelism.
    -- Rob
    [email protected] wrote:
    Is there any way to cache Stateless-session beans? We have the following
    set up in the descriptor file:
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>statelessSession</ejb-name>
    <stateless-session-descriptor>
    <pool>
    <max-beans-in-free-pool>3000</max-beans-in-free-pool>
    <initial-beans-in-free-pool>3000</initial-beans-in-free-p
    ool>
    </pool>
    </stateless-session-descriptor>
    <jndi-name>ejb20-statelessBean</jndi-name>
    </weblogic-enterprise-bean>
    for some reason, the bean is loaded as specified, but is being called from
    disk for each process, not from the pool/cache.
    Any help would be appreciated.
    Thanks

  • Java.io in J2ee stateless session bean, general questions about debugging

    Doing conventional Java IO (with java.io functions and classes such as
    PrintWriter and println) in a Enterprise bean has been discussed before
    in this and other forum. We know that the EJB specification says not to do it.
    (For example the EJB 2.0 spec, 24.1.2) says that an enterprise
    bean must not use the java.io package to attempt to access files and
    directories int he file system."
    The discussion in various forums including this one is that
    a) using java.io in a bean would impact portability, ability to
    move the bean for load balancing
    b) However, this is not always an an issue and it may be reasonable
    to use these functions anyway. e. g. see the response by "maozhoulu"
    on Jun 21, 2002.
    I tried it in Sun Application Server Nine in my stateless Session Bean:
    package RS;
    import RS.CourseHome;
    import RS.CoursePK;
    import java.rmi.RemoteException;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.rmi.PortableRemoteObject;
    import javax.ejb.EJBException;
    import java.io.*;
    public class AddCourseBean implements javax.ejb.SessionBean {
       public void ejbCreate(){};
       public void CreateCourse (int CourseNumber, String CourseName) {
        try {
         System.out.println("in Create Course");
         PrintWriter F = null;
         try {
          F = new PrintWriter (new FileOutputStream("/tmp/v/af"));
         catch (java.io.FileNotFoundException fe){}
         F.println ("here zero");F.flush();
         InitialContext jndiContext = new InitialContext();
         F.println ("here one");F.flush();
         Object o = jndiContext.lookup("ejb/X");
             ...I got a Null pointer exception on the line:
    "F.println("here zero"); Is there anyway one can do simple debugging with print lines in one's beans?
    Or is there something obviousthat I am overlooking? (I saw mention of doing
    debugging with System.out.println but to where would the bean write?)
    I tried using the Jakarta Commons Logging, but I got a
    java.lang.NoClassDefFoundError on org/apache/commons/logging/LogFactory
    Which logging system does one use in GlassFish, hopefully one with minimal
    configuration? I want to do some debugging, not set up logging for a full
    enterprise system.
    Thanks for your insight and advice.
    Dr. Laurence Leff, Associate Professor of Computer Science WIU ST447 61455
    Pager 309 367 0787, Fax 309 298 2302

    My apology for posting this message twice. I looked for it before and
    did not see it. I thought I forget to click the "Post message" button.
    Also, I did resolve one problem. System.out.println does go to
    the log file, which in my case turned out to be:
    /opt/j2ee/SUNWappserver/domains/domain1/logs/server.log
    (Obvously, the first part would vary based upon where you installed your
    Application Server Nine.)
    However, it would be nice if there was some way to use FILE I/O inside of
    beans. I am teaching some J2EE in the graduate software engineering course,
    and I believe this would be pedagogically sound even if other techniques
    would be appropriate for a production environment.
    Thanks for your patience with this problem and my duplicate post.

  • Stateless Session Bean + EJB Question + Jboss

    Hello,
    If I have a stateless session bean on a linux machine and it works locally what do i need to do to access a method in the session bean from a remote windows machine.
    I would like to be able to execute my client jar file on a windows machine and have it access the jboss server on the linux machine. what do i need to do?
    i have the session bean working locally on both windows and linux machine. do i need to to have a JSP/Servlet to access the session bean? can the session bean not be accessed directly? what should my classpath look like? do I need to include extra jar files in my client jar file.?
    Thanks,
    Joyce

    Thanks guys for the help but I am still a little lost.
    My Client windows machine has the client jar file and all the other jar files. This is my client class
    package helloworld.client;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import java.util.Hashtable;
    import java.util.Properties;
    import helloworld.interfaces.HelloWorldHome;
    import helloworld.interfaces.HelloWorld;
    public class HelloClient
         public static void main(String[] args)
              Hashtable prop = new Hashtable();
              prop.put ("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
              prop.put ("java.naming.provider.url","jnp://172.16.220.160:1099");
              prop.put ("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
              try
                   Context ctx = new InitialContext(prop);
                   Object obj = ctx.lookup("ejb/helloworld/HelloWorld");
                   System.out.println(obj);
                   HelloWorldHome home = (HelloWorldHome)javax.rmi.PortableRemoteObject.narrow(obj, HelloWorldHome.class);
                   HelloWorld helloWorld = home.create();
                   String str = helloWorld.sayHelloEJB("JOYCE is COOL");
                   System.out.println(str);
                   helloWorld.remove();
              catch(Exception e)
                   e.printStackTrace();
    I get a NullPointer ie the home object is null. The IP address is the IP of the Linux machine that has Jboss running on.
    Questions are:
    1. Do I need to have Tomcat running on my client machine if I am to connect via HTTP? Does this alter my client code.?
    2. My JNDI lookup is what is causing the problem. Does my jboss.xml and my ejb-jar.jar look okay to you.
    jboss.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">
    <jboss>
    <enterprise-beans>
    <session>
    <ejb-name>helloworld/HelloWorld</ejb-name>
    <jndi-name>ejb/helloworld/HelloWorld</jndi-name>
    </session>
    </enterprise-beans>
    <resource-managers>
    </resource-managers>
    </jboss>
    ejb-jar.jar
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
    <description>No Description.</description>
    <display-name>Generated by XDoclet</display-name>
    <enterprise-beans>
    <!-- Session Beans -->
    <session >
    <description><![CDATA[No Description.]]></description>
    <ejb-name>helloworld/HelloWorld</ejb-name>
    <home>helloworld.interfaces.HelloWorldHome</home>
    <remote>helloworld.interfaces.HelloWorld</remote>
    <ejb-class>helloworld.session.HelloWorldBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    <!--
    To add session beans that you have deployment descriptor info for, add
    a file to your merge directory called session-beans.xml that contains
    the <session></session> markup for those beans.
    -->
    <!-- Entity Beans -->
    <!--
    To add entity beans that you have deployment descriptor info for, add
    a file to your merge directory called entity-beans.xml that contains
    the <entity></entity> markup for those beans.
    -->
    <!-- Message Driven Beans -->
    <!--
    To add message driven beans that you have deployment descriptor info for, add
    a file to your merge directory called message-driven-beans.xml that contains
    the <message-driven></message-driven> markup for those beans.
    -->
    </enterprise-beans>
    <!-- Relationships -->
    <!-- Assembly Descriptor -->
    <assembly-descriptor >
    <!-- finder permissions -->
    <!-- transactions -->
    <!-- finder transactions -->
    </assembly-descriptor>
    </ejb-jar>
    Do I need RMI ? Do I need to concern myself with CORBA? All Im looking for is a step by step to understanding what I need to configure? Is their some way I can debug?
    Thanks alot,
    Joyce

  • Problem While calling a session bean (J2EE)

    Hi!!
    Please see my client-side code..where I am calling a session bean (J2EE Server)
    It's correct or not?????
    InitialContext ctx = new InitialContext();
    Object objref = ctx.lookup("SecDbSecRoleJndi");
    SecBusSecRoleHome home =(SecBusSecRoleHome)PortableRemoteObject.narrow(objref,SecBusSecRoleHome.class);
    SecBusSecRoleRemote remote =(SecBusSecRoleRemote)PortableRemoteObject.narrow(home.create(),SecBusSecRoleRemote.class);
    Here I am getting the error at 3rd line
    java.lang.ClassCastException
    at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
    at TestServlet.init(TestServlet.java:22)
    Please do the favor to me..reply me back.
    Bhumika

    Hello,
    Hope you are bale to sole the problem by this time. Iam using the follwing code and its working fine for me. i'm using the weblogic application server.
    <%@ page import="javax.naming.*, java.rmi.*, javax.ejb.*, java.util.*,java.rmi.server.*,java.net.*,javax.rmi.PortableRemoteObject,com.hmp.webcasting.services.ejb.*"%>
    <%
    try{             
    Properties prop = new Properties();
    prop.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
              System.out.println("Hello......3333333333Test");
              prop.put(Context.PROVIDER_URL, "t3://pani:7001");
              InitialContext ctx = new InitialContext(prop);
    Object home = ctx.lookup("personMgr");
              KeywordsMgrHome roleHome = (KeywordsMgrHome) javax.rmi.PortableRemoteObject.narrow(home, KeywordsMgrHome.class);
              KeywordsMgr kmgr=roleHome.create();
              //KeywordsMgrHome roleHome = (KeywordsMgrHome) ctx.lookup("personMgr");;
              System.out.println(roleHome);
              System.out.println(kmgr);
              }catch(Exception e){
              e.printStackTrace();
              %>
    Try using this.
    Genrally calss cast exception occurs if you are using classes out of a shared library directory instead of within the webapp, or if you are somehow maintaining references to object instances created with the old class and trying to use them after the reload. So try to delete the old file files and deploy the bean once again . Hope this may help you. Anyway if you can give the full code i will check by deploying it.([email protected])

  • EJB question: How to use abstract class in writing a session bean?

    I had written an abstract class which implements the session bean as follow:
    public abstract class LoggingSessionBean implements SessionBean {
    protected SessionContext ctx;
    protected abstract Object editRecord(Object obj) throws Exception;
    public LoggingSessionBean()
    super();
    private final String getBeforeUpdateImage(Object obj) throws Exception {
    // implement the details of extracting the backup image ...
    public void setSessionContext(SessionContext ctx)
    this.ctx = ctx;
    private final void writeThisImageToDatabase(String aStr) {
    // connect to database to write the record ...
    public final Object update(final Object obj) {
    try {
    final String aStr = getBeforeUpdateImage(obj);
    writeThisImageToDatabase(aStr);
    editRecord(obj);
    } catch (Exception e) {
    ctx.setRollbackOnly();
    This abstract class is to write the backup image to the database so that other session beans extending it only need to implement the details in editRecord(Object Obj) and they do not need to take care of the operation of making the backup image.
    However, some several questions for me are:
    1. If I write a class ScheduleSessionBean extending the above abstract class and the according 2 interfaces ScheduleSession and ScheduleSessionHome for this session bean (void update(Object obj); defined in ScheduleSession), do I still need to write the interfaces for LoggingSession and LoggingSessionHome?
    2. If I wrote the interface LoggingSession extending EJBObject where it defined the abstract methods "void update(Object obj);" and "void setSessionContext(SessionContext ctx);", that this meant I needed to write the ScheduleSession to implement the Logging Session?
    3. I used OC4J 9.0.4. How can I define the ejb-jar.xml in this case?

    Hi Maggie,
    1. do I still need to write
    the interfaces for LoggingSession and
    LoggingSessionHome?"LoggingSessionBean" can't be a session bean, because it's an abstract class. Therefore there's no point in thinking about the 'home' and 'remote' interfaces.
    2. this
    meant I needed to write the ScheduleSession to
    implement the Logging Session?Again, not really a question worth considering, since "LoggingSessionBean" can't be an EJB.
    3. I used OC4J 9.0.4. How can I define the
    ejb-jar.xml in this case?Same as you define it for any version of OC4J and for any EJB container, for that matter, since the "ejb-jar.xml" file is defined by the EJB specification.
    Let me suggest that you create a "Logging" class as a regular java class, and give your "ScheduleSessionBean" a member that is an instance of the "Logging" class.
    Alternatively, the "ScheduleSessionBean" can extend the "Logging" class and implement the "SessionBean" interface.
    Good Luck,
    Avi.

  • EJB: Stateless Session Bean create() Question.

    Lets say I have a stateless session bean that fetches data from my database. The point of the bean is to just do large SQL searches and funnel data back to the client. The prolem I have is that I am somehow fighting memory leaks. Despite having checked the code a number of times, the memory usage on my appserver continues to climb no matter what I do. I have theorized that the problem might be in the way Im using ma DataFetchBean (DFB).
    When I start the client, he obtains a user session. This is a stateful session bean that he uses for almost all communication with the server. Then I call "getDataFetchBean" in the user session which calls DataFetchBeanHome.create(). Then the client holds onto the returned reference, using it for the live of his connection. As he disconnects, he calls remove on the bean.
    Question is this:
    1) Is it better for me to call create() prior to each call to the stateless session bean ?
    2) Do you have any theories on why im loosing memory with this setup?
    TIA
    -- Rob

    1. But I thought you were using a 'stateful session bean'?
    2. For stateless session beans, there is no direct link between a remote reference and an instance of the bean. It is safe to hang on to the remote reference as long as you would like, of course it may go stale if the server dies. You will also find that the create() method does not actually contact the server, so doing it each usage costs very little. So, either way you should be fine.
    3. As for memory leaks, make sure that you are closing all statements, result sets, etc. promptly. These are commonly the problem. Also, use hprof or some other profile tool to determine what types of data you are allocating and (with better tools) what types of data you may be holding on to references to.
    Chuck

  • A tough one for EJB experts - Stateless session bean spec question

    I am busy learning more about EJBs and came across something confusing regarding the legal operations in the various container callback methods for stateless session beans.
    Specifically, the EJB spec states that in the ejbCreate() method, the SessionContext can be used to obtain a reference to the EJB Object. Now this makes perfect sense with stateful session beans, since the ejbCreate() method isn't called until a client is creating a bean and the container has linked that bean to the client's EJB Object. However, it is my understanding that when it comes to stateless session beans, the container creates the beans and adds them to the bean pool at its leisure. It is not until a business method is called by a client that a stateless bean is actually linked to an EJB object. So, how is it that a stateless bean could ever obtain a reference to an EJB Object from within ejbCreate(). Which EJB Object would it be linked to? This operation just doesn't appear to make sense in that context.
    Can anyone clarify this for me?

    Interesting question. I have such questions all the time! Here's a link to a similar discussion
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=70&t=000905
    Also, I tried this using Weblogic 8.1. Tried to access the EJBObject in ejbCreate before any business method was invoked. I did this by specifying a value for initial-beans-in-free-pool and found that the hash code for the EJBObject was the same for all the bean instances that were created on startup.
    I then invoked a business method and accessed the EJBObject in that method. Again the hash code for the object was the same as the one created on startup.
    Seemed to be that there is a 1:n relation between the EJBObject and bean instances.
    This may be container specific. The spec says the user should be able to invoke the getEJBObject() method in ejbCreate(), its upto the container to comply with it.

  • General Design With Database and Session Bean Question

    I have an application I am developing where users connect to individual databases located on a server. When they login an admin table is accessed which shows what databases they have permissions to. I am then storing the connection to the database in a backing bean. Hoping to use this connection throughout the session. Is this a good practice to have a users connection left open over the session? I can't create a database pool for each individual database and each user for that database.
    If I can store that database connection in a session bean. How do I access that connection from another bean. Or from another java class? I am using Glassfish for my application server with JSF1.2. I have looked at resource injection but have not had any luck with sharing the session bean information.
    Sorry if this is a trivial question. I have been a Java developer for years. But just starting developing webapps using JSF.
    Thanks

    JuCobb2 wrote:
    I am then storing the connection to the database in a backing bean. Hoping to use this connection throughout the session. Is this a good practice to have a users connection left open over the session? No it is not. Why should you do so? Always keep the lifetime of connection, statement and resultset as short as possible.

  • Transaction management in BMP through Session bean(worked in J2EE RI)

    This thing worked in the J2EE RI implementation, but not in OC4J.
    Problem is:
    In a BMP, if we throw an EJBException all the changes would be rolled back by the container, right? Or do we have to write code to do that?
    I was reading through your reply in the list and I have a doubt regarding something regarding transaction handling in BMP entity beans. I am using the entity bean in a session bean and have two sql statements and one entity update. If one of the sql statements fails and the entity is updated , the changes are all rolled back, but in the case of the entity failure to update, the sql statement changes are not rolled back and I get an error saying
    System/communication error: Transaction was rolled back: Error preparing bean in
    stance: com.evermind.transaction.MarshallingXAException; nested exception is:
    com.evermind.transaction.MarshallingXAException
    The entity bean is throwing an EJBException back to the Session bean, but the session bean does not catch
    it and continues forward as if nothing happened.
    The funny thing is that the queries are placed like this
    sqlinsert 1.......
    entitybean update....
    sqlinsert 2.....
    So the flow becomes
    sqlinsert 1 happens then sqlinsert 2 and only in the end does the entity bean throw the exception
    any idea why this happens?
    Can anyone help me on this. The BMP entity has persistence
    <persistence-type>Bean</persistence-type>
    Thanks
    Kind Regards
    Aby Philip

    Hi,
    In general, whenever you manage your own transactions (such as in DAOs or in stored procedures) then you are limiting the ways that your code can be reused: your code will never be able to run in a client's transaction. This could mean trouble if you want to combine you software inside other beans that use it: when these other beans lead to a rollback then your DAO might still commit.
    I would try to make the session bean use CMT, that is the most flexible if you are staying within the appserver.
    Hope that helps,
    Guy
    http://www.atomikos.com

  • J2EE EJB stateless session bean lifecycle

    Hi all,
    I've developed a stateless session bean to manage starting/stopping a JCo server.
    What should I do in order to achieve these goals:
    1. The stateless session bean should be created when the SAP J2EE server is started.
    2. The stateless session bean may NEVER 'die'.
    Thanks,
    Jeroen

    hi
    good
    1-
    go through these links, which ll give you the idea how to crea the stateless bean.
    http://edocs.bea.com/wle/ejbsamp/stateles.htm
    http://www.sitepoint.com/print/implement-first-ejbs
    2-
    http://home.tiscali.nl/illuminate/scbcd/My%20SCBCDE%20Study%20Notes%20-%204%20Session%20Bean%20Lifecycle.htm
    thanks
    mrutyun^

  • Security problem when trying to connect a CMP Session Bean deployed on J2EE

    I am working through Wrox�s book Professional java Mobile Programming and trying to set up the Mobile Positioning project. The book has instructions for Ericson MPS-SDK 3.0 but the only version available now is the 5.0 and these instructions are no longer valid. I have built the application with the Studio 4 IDE and deployed it on an instance of the J2EE reference Implementation and this seems to work fine. However I have built a CMP session bean which should connect to the Ericsson Emulator running on their supplied Eserver and this connection is failing with a security problem. Following is a snippet of the code I have used to instantiate the connection.
    ConnectionFactory con = null;
    con = new ConnectionFactory(true);
    The code compiles with out errors but when I try to test it I get the following error
    java.security.AccessControlException: access denied (java.util.PropertyPermission sun.net.inetaddr.ttl write)
    Any Hints or suggestions would be appreciated.
    Thanks

    Oops!! I meant Session Bean NOT CMP Session Bean

Maybe you are looking for

  • Changing the default save as folder

    We are using Adobe Standard X. Is there anyway to change where files are saved by default? I would like to be able to setup users so that when they save PDF it opens to a specific save as location.

  • ITunes does not work with Windows VISTA

    If you are planning on installing Windows VISTA than do not expect your iTunes to work. It will mark all our downloads as being unauthorized to play on the Windows VISTA computer. If you try to download some new songs you will get an error. I am work

  • Image size and resolution question.

    Is an image at W 48.667 x H 32.444 inches at 72 res the same as an image that I could convert in photoshop to 300 res and then the with "Resample Image" clicked off would be W 11.68 x H 7.78 at 300 res for printing purposes? I'm asking this questions

  • HOW TO USE BAPI IN FUNCTION MODULE

    Hi All, I am writing BDC for f-28 in that inbetween bdc  i wanted to call a bapi and wated to display that to the endusr and ask user to select line iems from that and then proced the bdc further bsed on that selection PL Sugeest me Somthing Pts assu

  • Form Filter Based On Query Results

    How can I create a filter on a form based on the results of a query. i.e. The Query [ESS_City] looks at the form's field [Current_User] and generate a list of cities [City_ID] that I want to use to match the form [ESS_QUEUE] field [City_ID] Query Nam