Using FetchType.LAZY when sending entity to remote client

Is it possible to use FetchType.LAZY when sending an entity (let's say Person) to a remote client? I'm fine with the fact that a call to person.getAddress() would have to return null o throw an exception of some sort. But, is it possible to even send the Person object when using lazy fetching?

yeah, if you add the CMP jars to the client, it should work, but, if they attempt to introspect the lazy collection, a runtime exception will be thrown since their local copy does not have access to the backing DB... ..I understand the hesitance to have separate object types for different consumers, but, in some cases, it can save time in the long run because you a) avoid these access exceptions and b) have a middle API that can insulate the client or server from changes on the other end (i.e. the server now holds all 'tenants' as a Set, rather then List, but the VO objects still return it as a List so that client code does not need to be updated). You can also find tools to generate the value objects, so your development costs aren't too much hire during the initial release...

Similar Messages

  • I am using iphone5 and when sending sms within 160 characters i am getting 2 sms counts deduction & i hear the message send sound twice. what is wrong here. can some one please help me here???

    i am using iphone5 and when sending sms within 160 characters i am getting 2 sms counts deduction & i hear the message send sound twice. what is wrong here. can some one please help me here???
    APPLE need to do something here!!!!!!1

    Hi...
    Thanks for your repaly .
    and i am not bale to post a question in developer forum i tried hard but i didnt get .Can you plz explain me how to post a question in developer forum this is very helpfull for me.Because i never did this thing.

  • Sending files to remote clients

    I am trying to send some files to client computers. The "copy item status" window says it has "qued the task" but then nothing happens.
    I have tried sending the file to different destinations, no difference.
    Suggestions?
    Intel imac   Mac OS X (10.4.7)   ARD v. 2.2

    Several things can cause a task to que... Make sure that you are not actively controlling another system, there are no other tasks active, the item is not in use, and you don't have another system set as your task server. If none of these apply, try quitting ARD and relaunching it and give it another shot.

  • How to handle failure when sending messages to remote queues from OAS10.1.3

    Hi,
    Here is my problem. IN my project, I have a MDB which is looking for message in a queue and once a message arrived, it supposed to send the message to remote queues.
    Assume that there are 3 remote queues, and my mdb is trying to send the message to all the 3 remote queues,
    1) My problem is, If one of the remote queue is not reachable or down, then the MDB should be able to resend it several times until it reaches the failed remote queue.
    2) At the same time, I dont want to resend the messages(duplicate) to the queues which are successful ones.
    Please suggest me some solution for this in JMS.
    My MDB deployed at 10.1.3 and assume that remote queue can be in either another 10.1.3 or WAS 6.0(Optional).
    Thanks and regards,
    SS.

    Hi,
    1) My problem is, If one of the remote queue is not reachable or down, then the MDB should be able to resend it several times until it reaches the failed remote queue.
    Not very sure what is your question, depending on if you want to resend the message if one of three queues is down.
    If the message has to arrive to a certain destination while mdb received it, you may try to reconnnect and resend the message in a couple of times. Perhaps you need a couter or timeout to limit the number of time to retry or the period to retry.
    Is that what you are asking.
    2) At the same time, I dont want to resend the messages(duplicate) to the queues which are successful ones.
    While sending message to a queue, those implementation is within the exception try/catch block, so any resend failure (JMSException) will fall into the catch block I guess. And we can probably use that exception to determine if the message is able to send to remote queue, if not, keep resending util it is over the limit of retries. For example:
    onMessage(Message){
    resend(message, counter);
    public void resend(message, counter) {
    try{
    if (counter <= retryLimit){
    .... // do the reconnect or/and resend operation
    }catch(exception e){
    resend(message, counter++);
    If the above is not what you are asking, please clarify a bit.
    Rocky

  • Hw to write txt in mail body using UTL mail when sending mail with attachme

    hi all
    i m using oracle demo mail package to send csv file as attachment to different users its successfull and i can also able to attach text file to it
    but i m unable to write any text in mail body .
    e.g.
    mail body can be--
    hi
    This is test mail.
    Regds
    Sender.
    can anyone suggest some way?

    u can try this code
    this code takes the file from database and attach with mail and also send the body with it
    it works fine.
    CREATE OR REPLACE
    procedure pdf_mail(
    p_sender varchar2, -- sender, example: 'Me '
    p_recipients varchar2, -- recipients, example: 'Someone '
    p_subject varchar2, -- subject
    p_text long, -- text
    p_case_id number,
    p_email_log_id number
    -- p_filename varchar2, -- name of pdf file
    p_blob   blob     pdf file
    ) is
    conn utl_smtp.connection;
    i number;
    len number;
    p_message_part varchar2(32767);
    cursor c1 is
    select file_name,document_pic
    from clm_case_attachments ca,email_log_detail em
    where
    case_id = p_case_id
    and ca.CASE_ATTACHMENT_ID = em.ATTACHMENT_ID
    and em.ACTIVE = 'Y'
    and em.EMAIL_LOG_ID = p_email_log_id;
    BEGIN
    conn := demo_mail.begin_mail(
    sender => p_sender,
    recipients => p_recipients,
    subject => p_subject,
    mime_type => demo_mail.MULTIPART_MIME_TYPE);
    demo_mail.attach_text(
    conn => conn,
    data => p_text,
    mime_type => 'text/html');
    for lp in c1 loop
    demo_mail.begin_attachment(
    conn => conn,
    mime_type => 'application/pdf',
    inline => TRUE,
    filename => lp.file_name,
    transfer_enc => 'base64');
    -- split the Base64 encoded attachment into multiple lines
    i := 1;
    len := DBMS_LOB.getLength(lp.document_pic);
    WHILE (i < len) LOOP
    IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
    UTL_SMTP.Write_Raw_Data (conn
    , UTL_ENCODE.Base64_Encode(
    DBMS_LOB.Substr(lp.document_pic, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
    ELSE
    UTL_SMTP.Write_Raw_Data (conn
    , UTL_ENCODE.Base64_Encode(
    DBMS_LOB.Substr(lp.document_pic, (len - i)+1, i)));
    END IF;
    UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
    i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
    END LOOP;
    demo_mail.end_attachment(conn => conn);
    end loop;
    demo_mail.end_mail( conn => conn );
    END;
    /

  • Unable to use Class Designer when deriving Entity Bean from another class

    I have several Entity Beans that have common fields. In order to maximise reusability, I have defined a base class which contains these common fields and corresponding get/set methods on these fields.
    In the next step, I build an Entity Bean using JDeveloper. I then go to Source Editor and in the Bean class, modify the Java code to inherit from this base class that I have defined. I then try to go to Class Designer expecting to see the inherited fields as well.
    However, this is the error I get :
    "Error while trying to parse source file...."
    Any pointers on resolving this would be a great help ! Thanks !!!
    -Andre
    null

    If you're running >Java 1.4, you'll need to put your classes into a package since Tomcat can no longer import the class 'BeanProdess' which is in an unnamed namespace.
    Your JSP is compiled into a class (in the package org.apache.jsp) that doesn't recognize anything in the default package.
    Here's a reference if you want to read about this.
    http://java.sun.com/j2se/1.4/compatibility.html#incompatibilities1.4

  • Is there a way to use my branding when sending a file with Adobe Send?

    Is there a way to include my logo in the message with Send files?

    Hi dporterphotography,
    The branding feature isn't available in Send just yet, but it is planned for a future release. In the meantime, you're welcome to send your file, with branding, using Adobe SendNow. You can log in to SendNow at https://sendnow.acrobat.com/signin.html using the same Adobe ID and password that you use for Send.
    Best,
    Sara

  • Mail uses wrong identity when sending mail but only in a very specific case

    Hey there we have a very strange thing happening here. There are two accounts in apple mail. user 1 is set as the default account and when user 1 replies to email sent to him it works as it should. When email is sent to user 2 and he replies it works correctly as well. But when an email comes addressed to both user 1 and user 2 and user 1 replies it is being sent as user 2 not user 1. Any ideas on what is causing this?
    Thanks for your help

    When both addresses in the To header are setup in Mail, Mail defaults to choose the first address listed in the distribution. You have to manually change that, or have separate User Accounts on this Mac for each user, and in that case each user would only setup his/her account.
    Ernie

  • Subject line 'space' character is lost when sending mail?

    Hi,
    I'm using JavaMail, and when sending a mail with a subject line that is longer than 62 characters, the last space before the 63rd character becomes a linefeed. This means that when the recipient receives the e-mail, the space in the subject line is actually dropped (becomes a linefeed).
    For example. I send an email with the following subject line: "New User Setup [ITNUS-0005] User Setup Progress Report for: Louise Gans".
    The recipient will receive the following subject: "New User Setup [ITNUS-0005] User Setup Progress Report for: LouiseGans".
    Note the missing space between "Louise Gans". Perhaps someone could test sending out that subject line, and see if they get the same problem?
    Looking at the message source on the recipient client, it shows a line feed / new line where that space is supposed to be.
    Using MS Outlook or GroupWise or another mail client, the subject lines gets sent through perfectly using the same mail server (Groupwise Internet Agent 7.0.3), but using JavaMail to send the mail through that mail server gives me the space problem.
    Can anybody shed some light on why this is happening? I would really appreciate the help.
    Here is an example of the code I am testing with:
    public class SendHtml {
         public static void main(String[] argv) {
              new SendHtml();
         public SendHtml() {
              String  to = "[email protected]";
              String subject = "New User Setup [ITNUS-0005] User Setup Progress Report for: Louise Gans";
              String from = "[email protected]";
              String cc = null;
              String bcc = null;
              String url = null;
              String mailhost = "mail.server.co.za";
              String mailer = "sendhtml";
              String protocol = null, host = null, user = null, password = null;
              String record = null;     // name of folder in which to record mail
              boolean debug = false;
              BufferedReader in =
                   new BufferedReader(new InputStreamReader(System.in));
              try {
                   Properties props = System.getProperties();
                   if (mailhost != null) {
                        props.put("mail.smtp.host", mailhost);
                   // Get a Session object
                   Session session = Session.getInstance(props, null);
                   // construct the message
                   Message msg = new MimeMessage(session);
                   if (from != null) {
                        msg.setFrom(new InternetAddress(from));
                   else {
                        msg.setFrom();
                   msg.setRecipients(Message.RecipientType.TO,
                             InternetAddress.parse(to, false));
                   if (cc != null)
                        msg.setRecipients(Message.RecipientType.CC,
                                  InternetAddress.parse(cc, false));
                   if (bcc != null)
                        msg.setRecipients(Message.RecipientType.BCC,
                                  InternetAddress.parse(bcc, false));
                   msg.setSubject(subject);
                   collect(in, msg);
                   msg.setHeader("X-Mailer", mailer);
                   msg.setSentDate(new Date());
                   // send the thing off
                   Transport.send(msg);
                   System.out.println("\nMail was sent successfully.");
                   // Keep a copy, if requested.
                   if (record != null) {
                        // Get a Store object
                        Store store = null;
                        if (url != null) {
                             URLName urln = new URLName(url);
                             store = session.getStore(urln);
                             store.connect();
                        } else {
                             if (protocol != null)          
                                  store = session.getStore(protocol);
                             else
                                  store = session.getStore();
                             // Connect
                             if (host != null || user != null || password != null)
                                  store.connect(host, user, password);
                             else
                                  store.connect();
                        // Get record Folder.  Create if it does not exist.
                        Folder folder = store.getFolder(record);
                        if (folder == null) {
                             System.err.println("Can't get record folder.");
                             System.exit(1);
                        if (!folder.exists())
                             folder.create(Folder.HOLDS_MESSAGES);
                        Message[] msgs = new Message[1];
                        msgs[0] = msg;
                        folder.appendMessages(msgs);
                        System.out.println("Mail was recorded successfully.");
              } catch (Exception e) {
                   e.printStackTrace();
         public void collect(BufferedReader in, Message msg)
         throws MessagingException, IOException {
              String line;
              String subject = msg.getSubject();
              StringBuffer sb = new StringBuffer();
              sb.append("<HTML>\n");
              sb.append("<HEAD>\n");
              sb.append("<TITLE>\n");
              sb.append(subject + "\n");
              sb.append("</TITLE>\n");
              sb.append("</HEAD>\n");
              sb.append("<BODY>\n");
              sb.append("<H1>" + subject + "</H1>" + "\n");
              sb.append("</BODY>\n");
              sb.append("</HTML>\n");
              msg.setDataHandler(new DataHandler(
                        new ByteArrayDataSource(sb.toString(), "text/html")));
    }

    The header is being "folded" as described in RFC 2822 section 2.2.3.
    The folding doesn't lose the space if unfolding is done properly.
    Perhaps the recipient mail program isn't handling unfolding properly?
    If so, please report the bug to the owner of that program.
    If you need to work around such a buggy program, you can set the
    System property "mail.mime.foldtext" to "false" to disable all folding
    in JavaMail.

  • Issues with remote client accessing EJB3

    Hi folks,
    I tested Weblogic 10.3 these days and had some trouble to access a stateless session bean (EJB3) via a remote Java client. My development system is Windows Vista 32bit.
    First, Weblogic doesn't like blanks in folder names! The Test Client throws an exception complaining that the business interface is not found:
    Exception in thread "Main Thread" java.lang.AssertionError: java.lang.ClassNotFoundException: ejb3session.Trader
    at weblogic.ejb.container.internal.RemoteBusinessIntfGenerator.generateRemoteInterface(RemoteBusinessIntfGenerator.java:69)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.readObject(RemoteBusinessIntfProxy.java:205)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
    at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at weblogic.jndi.internal.ServerNamingNode_1030_WLStub.lookup(Unknown Source)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:392)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at ejb3session.Client.lookup(Client.java:99)
    at ejb3session.Client.(Client.java:34)
    at ejb3session.Client.main(Client.java:61)
    Caused by: java.lang.ClassNotFoundException: ejb3session.Trader
    at weblogic.ejb.container.deployer.DownloadRemoteBizIntfClassLoader.getClassBytes(DownloadRemoteBizIntfClassLoader.java:85)
    at weblogic.ejb.container.deployer.DownloadRemoteBizIntfClassLoader.loadClass(DownloadRemoteBizIntfClassLoader.java:46)
    at weblogic.ejb.container.internal.RemoteBusinessIntfGenerator.generateRemoteInterface(RemoteBusinessIntfGenerator.java:66)
    In fact, the compiled class file of the business interface is located on the file system in a path that contains a blank. Debugging session shows that the internal weblogic class RemoteBusinessIntfGenerator fails to open the class file because of a wrong used URL file reference. If the path contains no blank, everything works fine. This is obviously a bug!
    Second, generics don't work in the business interface. As soon as I insert a generic return type or method parameter, I get an exception at runtime, no matter if the actually called method is generic or not:
    java.lang.NullPointerException
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.getTargetMethod(RemoteBusinessIntfProxy.java:162)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:53)
         at $Proxy0.saveContact(Unknown Source)
         at Main.testIt(Main.java:45)
         at Main.main(Main.java:34)
    Third problem is already known by Oracle (CR373734): when using JPA and serializing entities to the remote client, serialization fails until you implement a writeObject() method in every entity.
    What is your experience concerning these issues? For my opinion quite severe bugs...
    Cheers, Thomas

    But most of the O/S like Linux ,Solaries does not allow blankspaces in the classpath. Only the O/S that does allow is Windows. and there are a lot of issues regarding the spaces in the classpath.
    If a blank in the classpath exist in the admin console as a remote start argument for a managed node, a patch exist.its CR375981.
    But for the above case 808498 (blank for remote client classpath) Engineering did not given any patch and asked to go with the work around ie not to use a blank in the classpath.
    Thanks !!

  • What is about remote client copy?

    hi
    pls send me about remote client copy
    regards,
    jana

    Hi All,
        This is the web site that is built to help the consultant who is having problem in implimentation, support & while practice. But you are playing is this to gain point Both the reddy. from morning you ask the query & other on replays. this in not fair.
    Stop this things immediatly.
    pherasath

  • I have recently bought a macbook and am using outlook 2011 as email. i am getting an error message 4.7.0 not allowed when sending emails how do I fix?

    i have a macbook and am using outlook 2011 as email.   receiving okay.   sending okay sometimes.  am now getting error message 4.7.0 not allowed when sending.  what is the cause? how do I fix please?

    I have discovered that the emails have in fact been sent but much later, maybe it's a network problem with the people i am sending it to.  so i checked my sent items and they are there, but at the time the email doesn't go straight into the sent box or drafts so i'm assuming it's disappeared and type it again.  i'll keep going with it, until someone can give me a possible solution or explanation as to what is happening.

  • When sending job from Final Cut Pro to Compressor using local QCluster

    When sending job from Final Cut Pro to Compressor by way of Share and using the local QCluster, the audio renders, but the video errors out saying something along the lines of Can not locate file.
    If I use 'This Computer' it works fine.
    What gives?
    Fresh install of OS and FCS.
    Thanks!

    I'm just learning the intricacies of Compressor and Qmaster myself, but I have learned that when you use Qmaster you can not share directly from FCP. You must export a Quicktime movie (reference movie seems to be fine) and input that to Compressor. This is only an issue when using Qmaster, as you've seen.

  • Using JProgressBar when sending an email

    Good day to all! How can I use the JProgressBar to monitor progress when
    sending an email? I am using the Email package by Jakarta Commons.
    Somehow, I need my application to display progress since the send( )
    function takes a considerable amount of time to complete.
    Regards...

    >
    I Want to learn how to send email . Could you please
    tell me how to send email. and also give me some
    sample Code . so that i can Understand
    Sure. :) I just used a simple-To-Use API of Jakarta Commons Email, which is
    built on Java Mail. Their main site may start you off through simple examples.
    Go to this page: http://jakarta.apache.org/commons/email/userguide.html

  • When sending an email using outlook can you attach another email?

    When sending a new email using outlook, is it possible to attach another email?

    What does that have to do with iPhones?

Maybe you are looking for

  • Error While Login ADF Security Sample Application

    Hi All, Jdevloper Version : 11.1.1.5.0 we are Creating ADF Login Application contains login.jspx and main.jspx pages. we define ADF Security on this Sample Application. when we provide valid credentials to login(username and password) it shows Error:

  • An error message after I install my sound card

    I have one of MSI product. K7N2G-L (MS6570) mainboard for AMD processors. It's bios version is 3.5 (I have flashed it because of the CPU temprature measurement problem, now it show 20 C lower temprature of CPU than it was. Is this normal?). My operat

  • Standard Username an Password for the new Release2 As Portal?

    i have installed the Applicationserver Release2 with Portal , but i can not access to the Portal with the Standard Username and Password , i need the new Standard username and Password for the new Oracle Portal(Release2) the same Problem is with the

  • A contact and calander program that can sync with iTunes

    Hi There Everydoby-   I was wondering if anybody know of a free calander and contact program that can sync with iTunes and my iPod touch. I do not have Microsoft Office, I currently use Open Office for my word and Excel documents. But I do not have a

  • I bought an alblum why are my songs not playing

    i bought two ablums and neither of them are playing all the song all the way through -bad meets evil/**** the sequel (deluxe edition) i'm missing loud noises and living proof/tracks 9 and 10    -hopsin/Raw i'm missing sag my pants, trampoline, i'm no