How receiv  file and inert to db by ejb?

my client is application,it sends some files to ejb,how to receive files
and insert to db by ejb?

DataSource dataSource = (DataSource) (new InitialContext()).lookup( "jdbc.DataSource"
Connection con = dataSource.getConnection();
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery();
"wuyuquan" <[email protected]> wrote:
my client is application,it sends some files to ejb,how to receive files
and insert to db by ejb?

Similar Messages

  • How to start and finish a transaction using EJB 3.0 in JDeveloper

    Hello everybody!
    Does anybody can explain how to start and finish a transaction using EJB 3.0. I need to start a transaction insert some information in some tables and if everything was fine commit the information.
    I put the annotation @TransactionManagement(TransactionManagementType.BEAN) in my session bean and @Resource SessionContext ejbContext; but I don't what anything else I have to do.
    Any help will be appreciate.

    I tryied to use in the client the statement EntityTransaction transaction = myBean.getTransact(); but I receive the EJBException: Cannot use resource level transactions with a container managed EntityManager
    I just need to start a transaction something like this: transaction.begin(); and finish the transaction, something like this: transaction.commit();
    Does anybody can help?

  • Can't Join Group Chats, Can't Receive Files, and Skype Home Doesn't Work

    Okay, so back when Windows 8 was newer I got my current laptop and when I saw Skype's original Windows 8 design, I said hell no to that and downloaded an earlier version of Skype instead. When Skype did that big overhaul and stopped support for all older versions, I was at least happy to see it was back to being on the desktop instead of that Windows 8 pseudo-tablet nonsense. But at the same time, I stopped getting notifications from Skype Home - it always says it's unavailable. Some time after that, in between Skype's updates, I started having trouble with Groups. Every time someone tried to add me to one, I couldn't see it, even if they said I was in it on their screen. Eventually I had to start making all Group Chats myself, because at least then it worked for me... up until the 7.7 update. Now no matter how I try to get into a Group now, it straight up doesn't work. And before I got locked out of Groups entirely, I started having issues with files, right around when the "inline photos" thing happened - they just don't work when sent to me, and I can't send them either. When people try to send them to me it's just a grey image and something about how it's not supported or it didn't go through.  I've sort of just been patiently dealing with all of it until the newest update when Groups stopped working entirely and I was in the middle of trying to join an important conversation. I Googled that specific issue and found a ton of unresolved threads about it dating back to at least 2013, I believe. I tried every suggestion I could find - I restarted, uninstalled Skype, reinstalled Skype, restarted after uninstalling and then reinstalling... the list goes on. Every time I got it back, it was the same. Now I'm on Windows 8.1, and I don't know if that's related, but my boyfriend - who uses a Mac - is having none of these problems whatsoever, and he also has the latest version of Skype.  With older versions of Skype not available, I ended up trying Skype Web, and it's letting me see all the Groups, which is the most important thing but I'd really prefer to go back to the desktop version. All three of my issues might be unrelated, but they've all progressed as Skype has updated so I figured I'd try to get help for all of them. I'm at my wit's end, here. I use Skype for a pretty large portion of my online communication, and being unable to use Groups or get files is really crippling the experience. 

    Hi,
    I have the same problem.
    Since I'm using my new Laptop with Skype 7.0, I can't join to a group chat.
    It's a public chat and joining is enabled.
    With my former laptop and former Skype-Version, I never had this problem.
    I could click on a link in the browser and joined to the group.
    I have to chose a program.
    Unfortunately Skype.exe seems not to be the right decision.
    I'm asked to get a Skype-app, which I never needed with the old version.
    Which kind of app do I need and how can I get the app or what else can I do?

  • Creating xml file and inert tin to xml file in clob column

    i have a table
    CREATE TABLE XMLCLOB of XMLType
    XMLTYPE store AS CLOB;
    now i want to create a xml file by qurying emp table ie select sal,empname from emp.
    the cretaed xml file is saved in the xmlclob table how to do that?

    You will need to use Oracle XML function EXTRACT or EXTRACTVALUE in order to read the data before inserting into Oracle table. These functions need to be used in select statement.
    Syntax:
    EXTRACT(XMLType_Instance>, <XPath_string>, <namespace_string>)
    EXTRACTVALUE(XMLType_Instance>, <XPath_string>, <namespace_string>)

  • I have macbook pro running on 10.9.2 every time i download music files and transfare the it duplicates the file is there any way off switching it off please help

    i have macbook pro running on 10.9.2 every time i download music files and transfare the it duplicates the file is there any way off switching it off please help

    Open Automator
    Choose Folder Action for type of document
    At the top, for Folder action receives files and folders added to, select Other...
    in the window that opens, select your Downloads folder, and then Choose
    from the Actions on the left, drag Filter Finder Items over to the column on the right
    Where it says Any Content, select Kind
    Where it says Any, select music
    Drag Move Finder Items over to the rightfor To: select other, and navigate to your user folder > Music > iTunes > iTunes Media > Automatically Add to iTunes
    it should look like this:
    close the window and give the folder action a name.

  • Messages will not send or receive files.

    My messages app picks and chooses when it will send and receive files. Usually they are images or videos but also some Pages documents. Bringing up the file transfer window shows the spiraling download bar for receiving files and sending files will say "sent 0 kb of ____" and not move. Is there anything I can check to

    Same here ???????

  • How to invoke and receive from csv file

    I have an employee.csv file which contains empid and empname deatils,
    I want to fetch corresponding empid by giving input as empname from the employee.csv file and write empid into DB
    I had created an read file for employee.csv, but for the receive activity only one variable is created
    how to give input(empname) to the file and to get the empid from that file.
    Please help me from this issue

    In receive activity output file will contain the information of the entire list of empid and emp names. Wrive java code in java embedded activity to fetch the details of your desired output then use assign activity to continue your flow.
    try {                
    oracle.xml.parser.v2.XMLText text =(oracle.xml.parser.v2.XMLText)getVariableData("OnMessage_composeAndDistributeMQ_InputVariable","payload","/client:composeAndDistributeRequest/client:ControlInformation/client:SystemID/text()");
    String SystemID = text.getNodeValue();
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat justDateTime = new SimpleDateFormat("yyyyMMddHHmmss");
    String DateTimeString = justDateTime.format(cal.getTime());
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS");
    Date now = new Date();
    addAuditTrailEntry("Now = " + df.format(now));
    long timeInMilli = now.getTime();
    addAuditTrailEntry("Date() - Time in milliseconds: " + now.getTime());
    String DRI = SystemID + "003" + DateTimeString + timeInMilli + "0000001";
    setVariableData("Invoke_RequestMQ", "body", "/ns2:DocumentRequests/ns2:DocumentRequest/ns2:MailItemInfo/ns2:DocumentRequestId", new String(DRI));
    catch (Exception e) {                
    e.printStackTrace();
    }

  • Receiving pop ups to secure my files and when I log into any website i get directed to a site with a pop up regarding security.  I assume I have a virus and not sure how to fix it

    I am receiving pop ups to security sites to secure my files etc.  I assume I have a virus but not sure how to fix it.

    There is no need to download anything to solve this problem.
    You may have installed one or more of the common types of ad-injection malware. Follow the instructions on this Apple Support page to remove it. It's been reported that some variants of the "VSearch" malware block access to the page. If that happens, start in safe mode by holding down the shift key at the startup chime, then try again.
    Back up all data before making any changes.
    One of the steps in the article is to remove malicious Safari extensions. Do the equivalent in the Chrome and Firefox browsers, if you use either of those. If Safari crashes on launch, skip that step and come back to it after you've done everything else.
    If you don't find any of the files or extensions listed, or if removing them doesn't stop the ad injection, ask for further instructions.
    Make sure you don't repeat the mistake that led you to install the malware. It may have come from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad would probably have included a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If you ever download a file that isn't obviously what you expected, delete it immediately.
    Malware is also found on websites that traffic in pirated content such as video. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • How do I download a received e-mail into a program "directory file" and open it later by a related program with a different name.

    Each week day afternoon I receive an e-mail bulletin and previously, using AOL, I downloaded it into a directory file located as a part of computer programs and then read it later with a related program with a slightly different name. Now when I try to do this using Mozella Firefox I don't see a way to download the e-mail bulletin into the directory program file and open it with another program related to the directory program. Firefox only shown the file name to read the download with but doesn't give me an option to download it to the program directory file. Please give me some detailed instructions.

    Hello Explorer.ph
    If safari recognizes it as a PDF then when you open it, you should see something in the right corner below the search box that says open in "" and another with "open in another app". If not try tapping the middle of the screen once tomake it appear. You may need to download iBooks, which is free from the AppStore ,to have an app to download it to.
    I hope this helps.
    Imaestro

  • How to Process an Empty File and deliver to the receiver channel

    Hello Gurus,
    We had a requirements to process an empty file and send it to the receiver channel .  We had successfully configured and polling an empty file, but the message output of the empty file was never sent to the receiver channel.  Is there any solution to process an empty file and move it to the receiver directory.
    XI 7.0 with latest sp
    Thanks so much in advanced,
    dn

    Thanks guys for a quick response!
    As mentioned above, we had already configured to handling "Process empty files" and were able to have the files polling successfully. The problem that we are facing is that, the output file were never created or delivered to the receiver directory. We want all files to process and deliver to the recipients even though it is an empty file.
    Thanks,
    David

  • How to open and read pdf and micrsoft word (.doc) files or documents

    My problem is how to use my BB 9800 software version 6.0.0.546 to read/view pdf files and microsoft office documents. I have also bought documents to go from online and have installed it on my phone, but whenever i try to open it I receive a message that it is incompactible. Any help will be greatly appreciated.

    Hi, Sammy.
    Why not install a 3rd party PDF reader and Word Doc reader to help open and read pdf and micrsoft word (.doc) files or documents? You can google it and select one whose way of processing is simple and fast to help you with the related converting work.  It will be better if it is totally manual and can be customized by users according to our own favors. Remember to check its free trial package first if possible. I hope you success. Good luck.
    Best regards,
    Arron

  • I have an itunes account in Euro. I received iTunes and AppStore Gift Cards in $US. How can I use these on the same iWhatever?

    I have an itunes account in Euro. I received iTunes and AppStore Gift Cards in $US. How can I use these on the same iWhatever and keep together music/apps bought in the 2 currencies?
    Thx

    Barbara Hunt wrote:
    Would it be possible for me to download iTunes in Parallels and get the files into that and then onto my iPod?
    Yes, you can download iTunes for Windows using Parallels. If planning on making purchases here and/or authorizing already purchased tracks (from your Mac iTunes library), you are permitted to authorize five (5) computers as per iTunes Store terms of use, regardless of computing platform. No need to create a separate new iTunes Store account.
    However, judging from what you would like to do, your best bet would be to convert the WMAs to AAC/MP3 in iTunes-Windows (iTunes-Mac cannot import WMA files), and drag the files from the Parallels window to your desktop to add to the iTunes-Mac library. (as the iPod itself is currently linked to your iTunes-Mac library)
    Hope this helps,
    Steve

  • How to read the data file and write into the same file without a temp table

    Hi,
    I have a requirement as below:
    We are running lockbox process for several business, but for a few businesses we have requirement where in we receive a flat file in different format other than how the transmission format is defined.
    This is a 10.7 to 11.10 migration. In 10.7 the users are using a custom table into which they are first loading the raw data and writing a pl/sql validation on that and loading it into a new flat file and then running the lockbox process.
    But in 11.10 we want to restrict using temp table how can we achieve this.
    Can we read the file first and then do validations accordingly and then write to the same file and process the lockbox.
    Any inputs are highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

    Hello Gurus,
    Let me tell you about my requirement clearly with an example.
    Problem:
    i am receiving a dat file from bank in below format
    105A371273020563007 07030415509174REF3178503 001367423860020015E129045
    in this detail 1 record starting from 38th character to next 15 characters is merchant reference number
    REF3178503 --- REF denotes it as Sales Order
    ACC denotes it as Customer No
    INV denotes it as Transaction Number
    based on this 15 characters......my validation comes.
    If i see REF i need to pick that complete record and then fill that record with the SO details as per my system and then submit the file for lockbox processing.
    In 10.7 they created a temporary table into which they are loading the data using a control file....once the data is loaded into the temporary table then they are doing a validation and updating the record exactly as required and then creating one another file and then submitting the file for lockbox processing.
    Where as in 11.10 they want to bypass these temporary tables and writing it into a different file.
    Can this be handled by writing a pl/sql procedure ??
    My findings:
    May be i am wrong.......but i think .......if we first get the data into ar_payments_interface_all table and then do the validations and then complete the lockbox process may help.
    Any suggestions from Oracle GURUS is highly appreciated.
    Thanks & Regards,
    Lakshmi Kalyan Vara Prasad.

  • How to use  the same channel to send a file and messages to the server

    I'm trying to develop a simple program that will send and receive files from the server and in the same time I need to communicate with the server through the messages
    I'm using TCP Socket
    my problem is
    I have only one channel
    so, I have no option, either I can use it for sending the file itself or sending the message .. but not both !
    my question is : How can I use the same channel for sending and receiving (file & message)
    I would appreciate for any clue or hint
    best

    kajbj wrote:
    kmarwani wrote:
    Thanks for reply
    yes, that what I'm thinking to do
    but, in case of sending binary file, if I attached a flag on its header, will it corrupt the file ?
    bestThe other end would of course need to decode the messages that you get, and only write the "data" part to the file.Thanks
    I'm gonna try to hard-code what you suggest and i will post what happen with me here
    even though I'm not sure how can I add header to a binary file and remove it from the file at other end. (coz I read it as stream and send as array without touching its contents)
    this how I'm sending the file
    ConnSocket = CSocket.accept();
    ToClient = new DataOutputStream(ConnSocket.getOutputStream());
    File myFile = new File("abc.jpg");
    FileInputStream myFileInStream = new FileInputStream(myFile);
    BufferedInputStream mybuffInStream = new BufferedInputStream(myFileInStream);
    myBytArray = new byte[(int) myFile.length()];
    mybuffInStream.read(myBytArray, 0, myBytArray.length);
    ToClient.write(myBytArray, 0, myBytArray.length);
    ToClient.flush();
    myFileInStream.close();best

  • How to create an Excel file from XML in the Receiver File Adapter Comm Ch

    How do I create an Excel file from XML in the Receiver File Adapter Communication Channel? I have my mapping done and I am outputting the file as a comma delimited csv file. However, the target can only process an Excel file (.xls). How can I generate an Excel in XI?
    I saw this blog, but I don't know how to create a XSLT transformation.
    /people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
    Any help would be appreciated. Thanks.

    Here are the steps I took to create an XSLT transformation in XI 3.0:
    1. I created my source and target XSDs using XMLSpy.
    2. I created the XSLT mapping from source to target in XMLSpy (referencing the souce XSD schema).
    3. I created another XSLT mapping to format the target into Excel XML.
    4. Import the source and target XSDs in the IR's External Definitions
    5. Zip each XSLT mapping (.xls) and import it into the IR's Imported Archives
    6. Reference the XSL mappings in the Interface Mapping

Maybe you are looking for