Help with EJB Arch: Synchronous front-end -- Asynchronous back-end

Hi folks, We are developing an application with the following characteristics: - users can invoke requests on our appl and they will expect a quick response - to obtain the information requested by the user, our application talks with Tibco using RV. This communication follows a pub/sub messaging paradigm and is asynchronous. - thus, we have a synchronous req/resp front-end and an asynch back-end.
We would like some advice as to the best way of architecting this application. Here is our approach. Please critic and suggest alternatives.
1. Consider an user who has requested something from our app. 2. The user will be using a JSP based front-end. (S)he submits the request on a form and a servlet is driven. 3. The servlet uses a session EJB and invokes one of its methods, which handles some business-specific logic. 4. The method in the session EJB then instantiates a helper class. 5. A method on our helper class is now driven. This method sends a message to Tibco and it provides a callback method in the helper class. 6. The method in the helper class blocks the thread - basically, it waits. 7. Meanwhile, Tibco does the processing and invokes the callback method (in the helper class) with the result. 8. In the callback method, the data sent by Tibco is stored in member variables of the helper class. 9. The callback method wakes up the blocking thread. 10. The method in step 6 wakes up and returns the information to the session EJB. 11. The session EJB returns the information to the invoking servlet. 12. The servlet provides the information back to the user.
The version of Tibco-RV that we are using is not JMS compliant.
We keep hearing that threads should be handled very carefully in an EJB container environment, so we would like to know if the way we are handling the thread in the helper class is okay. Could we remove the helper class and do the same thread-handling in the session EJB itself?
Can we use JMS in this solution even though our Tibco-RV does not support JMS?
Tools: Weblogic App Server 6.1, JBuilder 5.0.
Thanks for your advice and suggestions!

Let me start off by mentioning that Sonic MQ (an excellent JMS server) now provides a bridge for TIB/Rendezous. I am also wrestling with a simliar issue, something that requires threading at the servlet or ejb level, and have given some thought to using JMS. My concern was that JMS is an asynchronous process so it's model does not fit well with the synchronous front end. Technically I can see a few ways to implement it but architecturally I am not convinced that they are sound. You could send a message from the session bean to the TIB via SonicMQ and have a JMS message bean registered as a listener for messages from the TIB, again via SonicMQ. The JMS bean could update a static class or singleton which your session checks but you still have the issue of making the session bean wait on that event.
I'll do a bit more digging and see if there's a design pattern available for this situation.
-Dat

Similar Messages

  • Authentication with UME separation of front end and back end

    My webdynpro project has 2 application. One for Admin one for Rating.
    Is it possible to create a java class at Webdynpro level and share it between the 2 applications?
    Why the need?
    Created a custom class (lets called it CommonEJB), to point to the right pages and set of UI controls after the initial login with UME. This class utilizes the IWDClientUser.getSAPUset() method to get IUser object.
    If it is not possible to create a java class at Webdynpro, then this ejb will need to be deployed to the backend.
    Putting it at the backend is not good as security wise, its always better to separate the authentication between front and back end.
    Any ideas/solutions?
    thanks

    s0003358504
    au-?Krup
    LDAP
    ==============================================
    Computer Associates Int'l  [eTrust Directory]  
    Critical Path  [CP Directory Server (CP DS)]  
    Microsoft  [Windows 2000 Active Directory Server]  
    Microsoft  [Windows 2003 Server - Active Directory]  
    Netscape Communications  [Netscape Directory Server]   
    Novell  [DirXML Driver for User Management]  
    Novell  [Novell DirXML Driver for SAP HR/PA]  
    Novell  [Novell eDirectory]  
    Oracle Deutschland  [Oracle Internet Directory (OID)]  
    Siemens  [DirX Directory Server]  
    Siemens  [DirX Extranet Edition]  
    Sun Microsystems  [Sun Java System Directory Server] 
    •     Test Objectives
    •     Testing Scope
    •     Test Approach
    •     Test Environment
    •     Test Data
    •     Entry / Exit Criteria
    •     Risks
    •     Schedule and Resources
    •     SIT Deliverables
    •     Test Planning Source Documents
    Well, i wish to create a java class that can separate the view areas depending on their login.
    lets say you're a manager, u can see certain views. and if you're a supervisor u see another. This is achieved using the java class with information from getSAPUser() position. After retrieving the position, using the java class will programmatically assigned the appropriate views, buttons, tabs etc.
    so this class need to in front end, and not back end. problem is we have 2 application.
    if the class is created front end in one application can it be shared with another.

  • Problems with one of the front-end servers (service wont start)

    Hi,
    Having a pool with two front-end servers (Lync Server 2013 on Windows Server 2012) and I cannot get one of servers to work properly. 
    The Front-End service is not starting.
    Have removed both servers from the topology and installed one at the time. When adding the second server to the pool the service never starts, its in starting state and a bunch of error messages appears:
    - Server startup is being delayed because fabric pool manager is initializing.
    Cause: This is normal when Pool is bootstrapped and indicates that the Front-End is waiting for a quorum of other Front-Ends to be started.
    - Pool Manager failed to connect to Fabric Pool Manager.
    Cause: This could happen because insufficient number of Front-Ends are currently active in the Pool.
    I have tried restarted one at the time, both at the same time...
    Reset-CsPoolRegistrarState -ResetType QuorumLossRecovery
    Reset-CsPoolRegistrarState -ResetType FullReset
    I have also had a look at the kb saying that there could be a certificate issue. So I have ran that script but no certificate is misplaced in any store.
    I have removed the front-end certificates and requested new ones from the internal CA, I have also done the same to the OAuth certificates.
    How to proceed?

    Hi there,
    if you are still receiving, the same error, please try to shutdown the first Front-End Server, and give time for the services to start, however I would like also to add that with Lync server 2013 the Enterprise pool requirements is to have 3 Front-End Servers
    in a pool instead of 2, because  of introducing the brick model  architecture.
    Regards,
    Charbel Hanna
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread

  • Help with EJB 3.0 MEssage Driver Bean Wizard in NetBeans 5.5 preview

    I am using NetBeans 5.5 preview with sun apps server 9.0 .
    But I am not able to write message driver beans .
    Can anybody help in this regards
    ^^ Unni

    Russ thanks for checking back. I did try the prefernce manager but no luck there. I ended up downloarding promaintance as a trail and ran thier error code analysis. http://www.digitalrebellion.com/promaintenance/
    So I found that the reason it wouldn't open was that there was a missing framework. I don't know much about frameworks but I do know that when I ran digital rebelions fcp uninstaller it removed this framework. When I reinstalled fcp studio this framework was not reinstalled, even after running all of the proap updates. Consequently I found that my aperature program was affected by this framework as well and wouldn't open. I ended up having to copy the framework off of a another computer and pasting it into the appropriate folder on my Mac Pro.
    Viola, compressor now will launch at least and so will apperture. The problem still remains though that I can not ad custom destinations in Compressor with out it crashing. Another thing is that compressor will only quit if I forced quit it. I have tried uninstalling and reintalling FCP studio 4 times now with the same results. After that frameworks fiasco I am a little hesitant to mess with it any more for fear of messing up any other application.
    pretty bummed on my set up right now.
    -jon

  • Problem with CRM 2011 web front end cluster

    Hi.
    We have a CRM 2011 (RU17) environment with a SQL DB server and 2 web front end CRM server in a cluster.
    Since few days (about 10) it seems that one of the 2 nodes is not working, and since yesterday many users report access problems when calling the application by cluster name - as usual since we deployed CRM 1 year ago.
    I tried myself, and I can run the application by cluster name without problems. If it try the separate notes addresses, one of them works, the other doesn't.
    I checked the 2 web front end servers, and are (or seem) both properly configured, with all patches installed.
    Following the information I got from Event viewer. Any suggestion welcomed!
    Many thanks and Best regards
    On the 'faulty' server I have different errors at event viewer level:
    Faulting application name: Microsoft.Crm.Sandbox.HostService.exe, version: 5.0.9690.4150, time stamp: 0x53559982
    Faulting module name: KERNELBASE.dll, version: 6.1.7601.18229, time stamp: 0x51fb1677
    Exception code: 0xe0434352
    Fault offset: 0x000000000000940d
    Faulting process id: 0x6f8
    Faulting application start time: 0x01cf8f93aa9a7ff8
    Faulting application path: C:\PROGRA~1\MICROS~4\Server\bin\Microsoft.Crm.Sandbox.HostService.exe
    Faulting module path: C:\Windows\system32\KERNELBASE.dll
    Report Id: f5019a68-fb86-11e3-9f21-005056853970
    Application: Microsoft.Crm.Sandbox.HostService.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.Runtime.InteropServices.COMException
    Stack:
       at Microsoft.Crm.Sandbox.HostService.InitializeThreadProc(System.Object)
       at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    The Sandbox Host service has encountered an unexpected error and has stopped.
     Source: Microsoft.Crm.Sandbox.HostService.exe (1784)
     Error: System.Runtime.InteropServices.COMException (0x8007203A): The server is not operational.
       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
       at System.DirectoryServices.DirectoryEntry.Bind()
       at System.DirectoryServices.DirectoryEntry.get_AdsObject()
       at System.DirectoryServices.PropertyValueCollection.PopulateList()
       at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
       at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
       at Microsoft.Crm.SecurityUtils.GetSidFromAD(Guid objectGuid)
       at Microsoft.Crm.Sandbox.SandboxHost.SetPrivilegeUserGroupId(Guid privilegeUserGroupId)
       at Microsoft.Crm.Sandbox.HostService.InitializeThreadProc(Object stateInfo)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    On the 'running' server event viewer I only have one error, related to mail router:
    #23379 - Could not verify the version of Microsoft Dynamics CRM at http://alkcg106.d30.intra:5555/AkzoNobelIndustrialCoatings. There was no endpoint listening at http://alkcg106:5555/AkzoNobelIndustrialCoatings/XRMServices/2011/Organization.svc that could
    accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

    Apologize for not having indicated here the resolotion I got thanks to MS support...
    We enabled the trace and we got
    a http error page stating maxQueryStringLength was insufficient. We changed the maxQueryStringLength and QueryString values in the CRM web.config value to 10240.
    We also noticed an error related to the DC being unavailable. We checked in the CRM registry hive and see in the non-working server you had a PreferredDc key pointing to “AMDNAD”. On pinging
    AMDNAD we see it is not reachable. We removed the PreferredDc key and after iisreset we can navigate to crm.

  • Help with detecting child video playback end

    I have a flash file that plays multiple videos. I'm trying to
    set it up so that all of the videos are loaded by a second (child)
    swf, imbedded in the first. The first (root) would call the second
    (child) swf, play the video, and at the end of the video, playback
    of the parent swf would resume. I can't seem to figure out how to
    do this. If I try to make a call to the root from the second swf, I
    of course can't because it doesn't know the root exists. The parent
    (root) swf has the following code on the frame that calls the
    child:
    ~~~
    stop();
    var loadVideo:URLRequest = new URLRequest("videoinset.swf");
    var videoLoader:Loader = new Loader();
    videoLoader.load(loadVideo);
    // Identifies which frame to play in inset video
    var vidclip:String = "intro";
    function swfLoaded(myEvent:Event):void {
    stage.addChild(videoLoader);
    var mycontent:MovieClip=myEvent.target.content;
    videoLoader.x = 210;
    videoLoader.y = 150;
    mycontent.gotoAndPlay(vidclip);
    videoLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    swfLoaded);
    ~~~
    How can I tell it that when the child gets to frame(#), to go
    back to the root and resume play?
    I am using netstream to play the videos. There are 6, each
    called by a different frame in the videoinset child swf.
    Thanks for any help with this.

    Any help with this really would be appreciated; if I have not
    explained it clearly enough, by all means please let me
    know.

  • Can i use java only for database transaction with vb as a front end

    Hello All.
    I am sorry,i don't know whether this location is the correct location to post my question or not
    I have developed one application using complete vb only. That is completly desktop appliation and not suitable for centralized database. Is there any facility to keep my front end as same (vb application) and for the database transaction can i use jdbc? Is there any possibility to do that like View is vb based application and the database connectivity is only jdbc
    If my thought is wrongplease execuse me.
    thanks in advance
    sowjanya

    Sounds like a really bad choice even if it was possible.

  • Help with EJB plz

    Hi,
    I'm new to EBJs and am playing with an entity bean pretty much identical to the one on the J2EE tutorial but the home interface does not compile and I've got no idea why. Would really appreciate your help.
    COMPILER COMPLAINT*****
    C:\j2sdkee1.3\nim\src\ejb\addresses>javac AddressesHome.java
    AddressesHome.java:7: cannot resolve symbol
    symbol : class Addresses
    location: interface AddressesHome
    public Addresses Create(String id, String firstname, String lastname, St
    ring address, int contactno) throws RemoteException, CreateException;
    ^
    AddressesHome.java:10: cannot resolve symbol
    symbol : class Addresses
    location: interface AddressesHome
    public Addresses FindByPrimaryKey(String id) throws FinderException, Rem
    oteException;
    ^
    2 errors
    HOME INTERFACE*****
    import java.util.Collection;
    import java.rmi.RemoteException;
    import javax.ejb.*;
    public interface AddressesHome extends EJBHome
         public Addresses Create(String id, String firstname, String lastname, String address, int contactno) throws RemoteException, CreateException;
         public Addresses FindByPrimaryKey(String id) throws FinderException, RemoteException;
         public Collection FindByLastName(String lastname) throws FinderException, RemoteException;
    ADDRESSESSBEAN CLASS*****
    import java.sql.*;
    import javax.sql.*;
    import java.util.*;
    import javax.ejb.*;
    import javax.naming.*;
    public class AddressesBean implements EntityBean
         private String id;
         private String firstname;
         private String lastname;
         private String address;
         private int contactno;
         private Connection conn;
         private EntityContext context;
         private String dbName = "java:comp/env/jdbc/AddressesdB";
         public String ejbCreate(String id, String firstname, String lastname, String address, int contactno) throws CreateException
                   if(address == null || address.length() == 0)
                        throw new CreateException("You must specify an address");
                   try
                        insertRow(id, firstname, lastname, address, contactno);
                   catch(Exception e)
                        throw new EJBException("ejbCreate: " + e.getMessage());
                   this.id = id;
                   this.firstname = firstname;
                   this.lastname = lastname;
                   this.address = address;
                   this.contactno = contactno;
                   return id;
         public void changeAddress(String address)
              this.address = address;
         public String getAddress()
              return address;
         public void changeContactno(int contactno)
              this.contactno = contactno;
         public int getContactno()
              return contactno;
         public String getFirstname()
              return firstname;
         public String getLastname()
              return lastname;
         public String ejbFindByPrimaryKey(String primaryKey) throws FinderException
              boolean result;
              try
                   result = selectByPrimaryKey(primaryKey);
              catch(Exception e)
                   throw new EJBException("ejbFindByPrimaryKey: " + e.getMessage());
              if(result)
                   return primaryKey;
              else
                   throw new ObjectNotFoundException("Row for id " + primaryKey + " not found");
         public Collection ejbFindByLastName(String lastname) throws FinderException
              Collection result;
              try
                   result = selectByLastName(lastname);
              catch(Exception e)
                   throw new FinderException("ejbFindByLastName :" + e.getMessage());
              return result;
         public void ejbRemove()
              try
                   deleteRow(id);
              catch(Exception e)
                   throw new EJBException("ejbRemove : " + e.getMessage());
         public void setEntityContext(EntityContext context)
              this.context = context;
              try
                   makeConnection();
              catch(Exception e)
                   throw new EJBException("Unable to connect to database: " + e.getMessage());
         public void unsetEntityContext()
              try
                   conn.close();
              catch(Exception e)
                   throw new EJBException("unsetEntityContext: " + e.getMessage());
         public void ejbActivate()
              id = (String)context.getPrimaryKey();
         public void ejbPassivate()
              id = null;
         public void ejbLoad()
              try
                   loadRow();
              catch(Exception e)
                   throw new EJBException("ejbLoad: " + e.getMessage());
         public void ejbStore()
              try
                   storeRow();
              catch(Exception e)
                   throw new EJBException("ejbStore: " + e.getMessage());
         public void ejbPostCreate(String id, String firstname, String lastname, String address, boolean contactno)
         /****************************** DataBase Routines ******************************/
         private void makeConnection() throws NamingException, SQLException
              InitialContext ic = new InitialContext();
              DataSource ds = (DataSource) ic.lookup(dbName);
              conn = ds.getConnection();
         private void insertRow(String id, String firstname, String lastname, String address, int contactno) throws SQLException
              String insertStatement = "inset into ADDRESSES values (?, ?, ?, ?, ?)";
              PreparedStatement prepStmt = conn.prepareStatement(insertStatement);
              prepStmt.setString(1, id);
              prepStmt.setString(2, firstname);
              prepStmt.setString(3, lastname);
              prepStmt.setString(4, address);
              prepStmt.setDouble(5, contactno);
              prepStmt.executeUpdate();
              prepStmt.close();
         private void deleteRow(String id) throws SQLException
              String deleteStatement = "delete from ADDRESSES where id = ?";
              PreparedStatement prepStmt = conn.prepareStatement(deleteStatement);
              prepStmt.setString(1, id);
              prepStmt.executeUpdate();
              prepStmt.close();
         private boolean selectByPrimaryKey(String primaryKey) throws SQLException
              String selectStatement = "select id from ADDRESSES where id = ? ";
              PreparedStatement prepStmt = conn.prepareStatement(selectStatement);
              prepStmt.setString(1, primaryKey);
              ResultSet rs = prepStmt.executeQuery();
              boolean result = rs.next();
              prepStmt.close();
              return result;
         private Collection selectByLastName(String lastname) throws SQLException
              String selectStatement = "select id from ADDRESSES where lastname = ? ";
              PreparedStatement prepStmt = conn.prepareStatement(selectStatement);
              prepStmt.setString(1, lastname);
              ResultSet rs = prepStmt.executeQuery();
              ArrayList a = new ArrayList();
              while(rs.next())
                   String id = rs.getString(1);
                   a.add(id);
              prepStmt.close();
              return a;
         private void loadRow() throws SQLException
              String selectStatement = "select firstname, lastname, address, contactno from ADDRESSES where id = ?";
              PreparedStatement prepStmt = conn.prepareStatement(selectStatement);
              prepStmt.setString(1, this.id);
              ResultSet rs = prepStmt.executeQuery();
              if(rs.next())
                   this.firstname = rs.getString(1);
                   this.lastname = rs.getString(2);
                   this.address = rs.getString(3);
                   this.contactno = rs.getInt(4);
                   prepStmt.close();
              else
                   prepStmt.close();
                   throw new NoSuchEntityException("Row for id " + id + " not found in the dataBase");
         private void storeRow() throws SQLException
              String updateStatement = "update ADDRESSES set firstname = ?, lastname = ?, address = ? contactno = ? where id = ?";
              PreparedStatement prepStmt = conn.prepareStatement(updateStatement);
              prepStmt.setString(1, firstname);
              prepStmt.setString(2, lastname);
              prepStmt.setString(3, address);
              prepStmt.setInt(4, contactno);
              prepStmt.setString(5, id);
              int rowCount = prepStmt.executeUpdate();
              prepStmt.close();
              if(rowCount == 0)
                   throw new EJBException("Storing row for id " + id + " failed.");
    }

    EJB questions should be posted in the EJB forum! :=)
    I did find the compiler message a bit strange. Usually if I don't have a class defined it complains that it cannot find package_name.class_name (when I'm using packages for my own code).

  • Help with installing Arch x64 to Silicon Image SiI 0680 raid card

    I am having one heck of a time trying to find information on installing Arch on a Silicon Image SiI 0680 raid card. I have searched both the wiki and the forums and I cannot find any information about this card. I am trying to install a raid 0 setup on Arch x64 Could someone point me in the right direction, any help is appreciated. Thank you.
    Information about the card: http://www.newegg.com/Product/Product.a … 6816132004

    My memory has slipped a bit:  the following is more to the point than my reference to md=0!
    Member
    Registered: 2009-09-02
    Posts: 17
    E-mail
    Re: [SOLVED] usb /boot, RAID5 /root, mkinitcpio.conf help request
    The array stabalized and I was able to reboot with the following entry in my menu.lst:
    # (0) Arch Linux
    title  Arch Linux
    root   (hd0,0)
    kernel /vmlinuz26 root=/dev/md0 ro
    initrd /kernel26.img
    $ cat /proc/mdstat
    Personalities : [raid6] [raid5] [raid4]
    md2 : active raid5 sdi1[0] sdg1[3] sdh1[2] sdk1[1]
          2197715712 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
    md1 : active raid5 sda3[0] sdf3[5] sde3[4] sdc3[3] sdd3[2] sdb3[1]
          7252222400 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]
    md0 : active raid5 sda2[0] sde2[5] sdf2[4] sdd2[3] sdc2[2] sdb2[1]
          52451840 blocks level 5, 64k chunk, algorithm 2 [6/6] [UUUUUU]
    Thank you very much to everyone in this thread.  I really appreciate the help. 
    Offline

  • Help With EJB Client

    I have successfully gotten my client to run when I use the appclient with the reference implementation. When I try to run my simple client outside of appclient I get the following error.
    Exception: javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: I
    DL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    I have my client.jar which is returned from the deploy tool, I have the j2ee.jar in my classpath, and I have my jndi name set up as ejb/Hello in the server. My code to access this is such:
    public static void main(String[] args)
    try
    System.out.println("Adding properties");
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    env.put(Context.PROVIDER_URL, "iiop://MyHost:3700");
    Context initial = new InitialContext(env);
    System.out.println("Got initial context!");
    Object o = initial.lookup("java:comp/env/ejb/Hello");
    System.out.println("got object from lookup");
    HelloHome home = (HelloHome)PortableRemoteObject.narrow(o, com.tosht.ejb.HelloHome.class);
    System.out.println("got home object back and did remote narrow cast");
    Hello h = home.create();
    System.out.println("got component interface");
    System.out.println(h.sayHello());
    System.out.println("called business method on component interface");
    catch(Exception ex)
    System.out.println("Exception: " + ex.toString());
    I am sure this is a jndi issue, but in the deploy tool my applications jndi name for my component is ejb/Hello just as it is in code?
    Any help would be greatly appreciated!!!!!

    Hi Tim,
    Couple things I can think of. 1) Are you sure that the ejb application deployed correctly? ejb/Hello does look like the right global JNDI name given the sun-ejb-jar.xml, so one explanation is that the ejb is not found because it wasn't deployed at all or wasn't deployed successfully. 2) It's worth double-checking that you have the correct client code compiled and found at runtime. Is it possible there is still the old version of the client main class that is looking up java:comp/env/ejb/Hello?
    One final suggestion is to print the exception.printStackTrace() rather than exception.toString(). There is often very valuable information about the exception that is not printed out as part of toString().
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

  • Help with EJB & JNDI

    I am getting following error while compiling EJB session client
    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
         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
         at javax.naming.InitialContext.lookup(Unknown Source)
         at client.SimpleSessionClient.main(SimpleSessionClient.java:20)
    My session client code is
    package client;
    import java.util.Hashtable;
    import beans.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import javax.ejb.*;
    import javax.naming.spi.InitialContextFactory;
    import javax.naming.NamingException;
    public class SimpleSessionClient {
         public static void main(String[] args) {
              try {
                   Context jndiContext = new InitialContext();
                   Object ref = jndiContext.lookup("ejb/beans.SimpleSession");
                   SimpleSessionHome home = (SimpleSessionHome)PortableRemoteObject.
                   narrow(ref, SimpleSessionHome.class);
                   SimpleSession simpleSession = home.create();
                   for (int i=0; i<args.length; i++) {
                        String returnedString = simpleSession.getEchoString(args);
                        System.out.println("Sent String:" + args[i] +", " +
                                  "recieved string" + returnedString);
              } catch(Exception e) {
                   e.printStackTrace();
    I have include j2ee.jar in the classpath too and I could deploy the EJB home and remote interface as well as Bean class in sun application server.
    Any help wuld be appreciated.
    Rashmi

    I am using Sun App server for deploying EJB. In the same system, I am running eclipse where I run the EJB client with JNDI to connect to EJB component.
    If this is not the right way, please suggest. I am trying to do this for the first time and completely clueless. I have tried to include different jar files in my classpath and even I am in the process of downloading websphere in case that could help me.

  • Help with EJB and JNDI, please

    Hello. My name is Santiago, and i am a student from the University of Valladolid, in Spain. I am newcome in the world of EJB, I have done the first EJB from de Sun tutorial (I�m using the Sun Java System Application Server PE 8.2) and now I am trying to improve it in that way: I have the EJB and the client in diferent machines conected.
    I am trying to understand how to use JNDI, but i have not good results :( I have read about using ldap but i dont know if it is apropiated, or if it is installed automaticaly with the sun aplication, or if i have to download and install it... i am not sure about anything :)
    This is my client�s code (part of it)
    Hashtable envirom = new Hashtable();
    envirom.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    envirom.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
    envirom.put(Context.PROVIDER_URL,"iiop://Santiago:389");
    envirom.put(Context.PROVIDER_URL,"ldap://192.168.1.101:389");
    envirom.put(Context.SECURITY_AUTHENTICATION,"none");
    InitialContext ctx = new InitialContext(envirom);
    Object objref = ctx.lookup("java:comp/env/ejb/Multiplica");
    When I try to connect in local mode (client and EJB in the same machine) i get something like that:
    javax.naming.CommunicationException: 192.168.1.101:389 [Root exception is java.n
    et.ConnectException: Connection refused: connect]
    at com.sun.jndi.ldap.Connection.<init>(Connection.java:204)
    at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118)
    at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1578)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2596)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
    It is even worse when i try it in different machines:
    10-mar-2006... com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImp1<init>
    ADVERTENCIA: "IOP00410201: <COMM_FAILURE> Fallo de conexion: Tipo de socket: IIOP_CLEAR_TEXT;
    name of host: portatil; puerto: 3700"
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code:201 completed:No
    Both SSOO are XP and I have disabled Firewalls.
    PLEASE, if you colud help me It would fantastic, because I am in that trouble, i have tryed 1000 solutions but i am not able to understand it.
    Hoping you can help me.
    Santiago.

    This thread is now being followed up in:
    http://swforum.sun.com/jive/thread.jspa?threadID=64092

  • Help with Transport control program tp ended with error code 0203

    when i import queue and transport queue from dev to prd ,error show:
    Transport control program tp ended with error code 0203
    Message no. XT200
    Diagnosis
    An error occurred when executing a tp command.
    Command: IMPORT DEVK900298 P01 clientP01 U0 pf=/usr/sap/tra
    Return code: 0203
    Error text: wrong syntax in tp call
    Request: DEVK900298
    System Response
    The function terminates.
    Procedure
    Correct the error and execute the command again if necessary.

    Thank you !
    My DEV system  TP profile parameters is :
    TRANSDIR            = /usr/sap/trans
    DEV/CTC             = 0
    DEV/DBHOST          = P550A
    DEV/DBLIBPATH       = /usr/sap/DEV/DVEBMGS01/exe
    DEV/DBNAME          = DEV
    DEV/DBTYPE          = ora
    DEV/NBUFFORM        = 1
    DEV/TP_VERSION      = 266
    #System from Transport Domain DOMAIN_P01
    #TMS:0002:DOMAIN_P01
    P01/DUMMY           = 1
    P01/NBUFFORM        = 1
    P01/TP_VERSION      = 266
    P01/CTC             = 1
    My PRD system  TP profile parameters is :
    P01/CTC             = 0
    P01/DBHOST          = XCPRD01
    P01/DBLIBPATH       = /usr/sap/P01/DVEBMGS01/exe
    P01/DBNAME          = P01
    P01/DBTYPE          = ora
    P01/NBUFFORM        = 1
    P01/TP_VERSION      = 266
    #System from Transport Domain DOMAIN_DEV
    #TMS:0009:DOMAIN_DEV
    DEV/DUMMY           = 1
    DEV/NBUFFORM        = 1
    DEV/TP_VERSION      = 266
    DEV/CTC             = 1

  • Help with EJB Named Query

    How do you reference a user-defined database function in an EJB Named Query. There doesn't seem to be any problems in using built in functions like max and min. Any help is greatly appreciated.

    A little more information. It seems I have to retract one thing I said, I stated that the internal functions of the database were ok, this is incorrect. If I use the upper function in a named query I get the following.
    example:
    Internal Exception: Exception [TOPLINK-0] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.EJBQLException
    Exception Description: Syntax Recognition Problem parsing the EJBQL [select object(o) from SysUsers o where o.racfId = :racfId and o.inactiveDate is null and upper(o.pswd) = :pswd]. The parser returned the following [unexpected token: upper].
    In this example query I am trying to use the database upper function. Any Help?
    Thanks

  • HELP with EJB to JSP Integration tool WLS 7.0

              Hi,
              Has anyone used the EJB2JSP Integration tool in WLS 7.0? I can't find any documenation
              except for the page at http://edocs.bea.com/wls/docs70/jsp/ejb2jsp.html. It is
              not much help. I can get the graphical tool to run, but not import a .jar file.
              This is the error I get when trying to open an ejb.jar.
              C:\bea\user_projects\myTestDomain\applications\DefaultWebApp\WEB-INF\classes\EJB\Spike>java
              weblogic.servlet.ejb2jsp.gui.Main
              error occurred: java.lang.NullPointerException
              java.lang.NullPointerException
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
              at weblogic.servlet.ejb2jsp.Utils.createBeanDescriptor(Utils.java:343)
              at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:314)
              at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:266)
              at weblogic.servlet.ejb2jsp.gui.Main.loadFromPaths(Main.java:391)
              at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:378)
              at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:575)
              at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:757)
              at java.lang.Thread.run(Thread.java:479)
              error occurred: java.lang.NullPointerException
              java.lang.NullPointerException
              at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:379)
              at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:575)
              at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:757)
              at java.lang.Thread.run(Thread.java:479)
              Is this error and the fix to it obvious to someone else? If so, I would appreciate
              some help!
              THank you!!
              Wendy
              

    Try weblogic.servlet.ejb2jsp.gui.Main
    Kris

Maybe you are looking for

  • Can't open links in Skype, WLM nor saved HTML (Firefox won't respond)

    "I can't open links in Skype chat windows when having a Firefox session running in the background, it just flashes the window borders. If i close Firefox and leftclick on the links Firefox automatically opens the link but not while having a session r

  • From m4v to dvd

    My dad is not computer savvy, he has a dvd player and that's it. I have bought him on iTunes a bunch of videos (NHL Retro) which are m4v files. I'm trying to find a way to burn those files into dvd player files using iDVD for instance, with no succes

  • Extending the Network with AX

    I need some help. I have 3 AX units and 1 NetGear wireless ADSL modem/router. Currenlty NG router is OK but range is poor as house is large. I wanted to use AX units to extend the network (in addition to using AirTunes) but guys at Apple Shop in Lond

  • Create OID Atributtes and turn them availables to portal environment

    Hi, i´m synchronizing AD (Active Directory) with OID and i´ve need to create some new attributes on OID, using ODM, because they exist on AD and will be synchronized. The question is, will those new attributes available when i create a new user, thro

  • Adobe flash crashes only in Firefox.

    This is driving me nuts. Adobe flash crashes every time in multiple sites. I have reset Firefox, uninstalled every add on to test them. Right now there are no add on's (post resetting Firefox). Going down the list of fixes here: https://support.mozil