Search Results

Search found 5259 results on 211 pages for 'interrupt handling'.

Page 23/211 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Spring <jee:remote-slsb> and JBoss AS7 - No EJB receiver available for handling

    - by Lech Glowiak
    I have got @Remote EJB on JBoss AS 7, available by name java:global/RandomEjb/DefaultRemoteRandom!pl.lechglowiak.ejbTest.RemoteRandom. Standalone client is Spring application that uses <jee:remote-slsb> bean. When trying to use that bean I get java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:RandomEjb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@1a89031. Here is relevant part of applicationContext.xml: <jee:remote-slsb id="remoteRandom" jndi-name="RandomEjb/DefaultRemoteRandom!pl.lechglowiak.ejbTest.RemoteRandom" business-interface="pl.lechglowiak.ejbTest.RemoteRandom" <jee:environment> java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory java.naming.provider.url=remote://localhost:4447 jboss.naming.client.ejb.context=true java.naming.security.principal=testuser java.naming.security.credentials=testpassword </jee:environment> </jee:remote-slsb> <bean id="remoteClient" class="pl.lechglowiak.RemoteClient"> <property name="remote" ref="remoteRandom" /> </bean> RemoteClient.java public class RemoteClient { private RemoteRandom random; public void setRemote(RemoteRandom random){ this.random = random; } public Integer callRandom(){ try { return random.getRandom(100); } catch (Exception e) { e.printStackTrace(); return null; } } } My jboss client jar: org.jboss.as jboss-as-ejb-client-bom 7.1.2.Final pom pl.lechglowiak.ejbTest.RemoteRandom is available for client application classpath. jndi.properties contains exact properties as in <jee:environment> of <jee:remote-slsb>. Such code runs without exception: Context ctx2 = new InitialContext(); RemoteRandom rr = (RemoteRandom) ctx2.lookup("RandomEjb/DefaultRemoteRandom!pl.lechglowiak.ejbTest.RemoteRandom"); System.out.println(rr.getRandom(10000)); But this: ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml"); RemoteClient client = ctx.getBean("remoteClient", RemoteClient.class); System.out.println(client.callRandom()); ends with exception: java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:RandomEjb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@1a89031. jboss.naming.client.ejb.context=true is set. Do you have any idea what am I setting wrong in <jee:remote-slsb>?

    Read the article

  • CakePHP - How to use onError in Model

    - by Richard
    I've created a custom datasource which fetches data from a web api, and I'm now looking at implementing error handling. In the datasource, I'm calling $model-onError(). In the model, I've created the onError method, and I can access error details with $this-getDataSource()-error; However I can't redirect or set a flash message because that can only take place in the controller, so what should I be doing here to communicate the error to the user?

    Read the article

  • Best way XML File handling bullet point •

    - by dbengals
    For an XML file I am creating I have data that contains a bullet • what is the best method for handling this in xml data? It opens in an XML editor and reads fine, but I cannot import the file via SSIS, I get an error regarding this point. <xmldata>• Bullet</xmldata> Renders fine, but cannot import with SSIS.

    Read the article

  • Key event handling process

    - by backspace7
    I'd like to know how the key event is handled in Android platform. From 'when user type key 'a' on software keyboard', To 'view draw the character 'a' on itself'. Probably, the key event is generated by IME, And it will be sent to parent view, Finally, view(such as EditText) displays chracters. Please somebody explains about these entire key event handling process.

    Read the article

  • Signal Handling in C

    - by Dave
    How can I implement signal Handling for Ctrl-C and Ctrl-D in C....So If Ctrl-C is pressed then the program will ignore and try to get the input from the user again...If Ctrl-D is pressed then the program will terminate... My program follows: int main(){ char msg[400]; while(1){ printf("Enter: "); fgets(msg,400,stdin); printf("%s\n",msg); } } Thanks, Dave

    Read the article

  • Handling User Authentication in C#.NET?

    - by Daniel
    Hi! I am new to .NET, and don't have much experience in programming. What is the standard way of handling user authentication in .NET in the following situation? In Process A, User inputs ID/Password Process A sends the ID/Password to Process B over a nonsecure public channel. Process B authenticates the user with the recieved ID/Password what are some of the standard cryptographic algorithms I can use in above model? thank you for your time!

    Read the article

  • file handling in vb.net

    - by Indranil Mutsuddy
    Hello there I have developed an application in vb.net2008 and database sqlserver. Now i want to ignore the database(it has 1 table as customer(name,password,hour,minute)) as i dont want my client to install sqlserver separately or other overheads. I am planning to do the whole using file handling in vb.net(manipulating the data in files itself eg change username, password etc). As I am new i dont actually know the proper way and of course need assistance. Kindly help out. Regards Indranil

    Read the article

  • Why not use PHP's built-in session handling?

    - by Dougal
    Is there currently - or has there ever been - any serious or significant problem with PHP's built-in session handling? I mean, it's always worked for me and my projects. But I see some codebases and frameworks out there seem to use a custom handler. Is this reinventing the wheel? Or improving on some flaws? What flaws?

    Read the article

  • running code if try statements were successful in python

    - by None
    I was wondering if in python there was a simple way to run code if a try statement was successful that wasn't in the try statement itself. Is that what the else or finally commands do (I didn't understand their documentation)? I know I could use code like this: successful = False try: #code that might fail successful = True except: #error handling if code failed if successful: #code to run if try was successful that isn't part of try but I was wondering if there was a shorter way .

    Read the article

  • why is java.lang.Throwable a class?

    - by mdma
    In java adjectives ending in -able are interfaces Serializable, Comparable etc... So why is Throwable a class? Wouldn't exception handling be easier if Throwable were an interface? Obviously, changing it now is out the question. But could it be made abstract? Wouldn't that avoid the bad practice of throw new Throwable();

    Read the article

  • Handling User Authentication in .NET?

    - by Daniel
    I am new to .NET, and don't have much experience in programming. What is the standard way of handling user authentication in .NET in the following situation? In Process A, User inputs ID/Password Process A sends the ID/Password to Process B over a nonsecure public channel. Process B authenticates the user with the recieved ID/Password what are some of the standard cryptographic algorithms I can use in above model?

    Read the article

  • Automatic bookkeeping for exception retries

    - by pilcrow
    Do any languages that support retry constructs in exception handling track and expose the number of times their catch/rescue (and/or try/begin) blocks have been executed in a particular run? I find myself counting (and limiting) the number of times a code block is re-executed after an exception often enough that this would be a handy language built-in.

    Read the article

  • C# library for handling pictures

    - by adopilot
    Does any free C# (.net) library exist for handling properties of pictures. Main targeting functions is to read Camera Information from as it does "Google Picasa" picture viewer, I also want to try find identical pictures.

    Read the article

  • Flex RTE handling image IOError

    - by majakovskij
    You know you can edit basic html with RTE (Rich Text Editor) Flex Control. If your html code contains <img src="" /> tag, it will try to load that image from src. But how to handling IOError? or is it possible to disable the automatic image loading feature? Thanks

    Read the article

  • Is assert evil?

    - by dehmann
    The Go language creators write: Go doesn't provide assertions. (...) Programmers use them as a crutch to avoid thinking about proper error handling and reporting. What is your opinion about this?

    Read the article

  • how to: handle exceptions, best practices

    - by b0x0rz
    need to implement a global error handling, so maybe you can help out with the following example... i have this code: public bool IsUserAuthorizedToSignIn(string userEMailAddress, string userPassword) { // get MD5 hash for use in the LINQ query string passwordSaltedHash = this.PasswordSaltedHash(userEMailAddress, userPassword); // check for email / password / validity using (UserManagementDataContext context = new UserManagementDataContext()) { var users = from u in context.Users where u.UserEMailAdresses.Any(e => e.EMailAddress == userEMailAddress) && u.UserPasswords.Any(p => p.PasswordSaltedHash == passwordSaltedHash) && u.IsActive == true select u; // true if user found return (users.Count() == 1) ? true : false; } } and the md5 as well: private string PasswordSaltedHash(string userEMailAddress, string userPassword) { MD5 hasher = MD5.Create(); byte[] data = hasher.ComputeHash(Encoding.Default.GetBytes(userPassword + userEMailAddress)); StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < data.Length; i++) { stringBuilder.Append(data[i].ToString("x2")); } Trace.WriteLine(String.Empty); Trace.WriteLine("hash: " + stringBuilder.ToString()); return stringBuilder.ToString(); } so, how would i go about handling exceptions from these functions? they first one is called from the Default.aspx page. the second one is only called from other functions from the class library. what is the best practice? surround code INSIDE each function with try-catch surround the FUNCTION CALL with try-catch something else?? what to do if exceptions happen? in this example: this is a user sign in, so somehow even if everything fails, the user should get some meaningful info - along the lines: sign in ok (just redirect), sign in not ok (wrong user name / password), sign in not possible due to internal problems, sorry (exception happened). for the first function i am worried if there is a problem with database access. not sure if there is anything that needs to be handled in the second one. thnx for the info. how would you do it? need specific info on this (easier for me to understand), but also general info on how to handle other tasks/functions. i looked around the internet but everyone has different things to say, so unsure what to do... will go with either most votes here, or most logicaly explained answer :) thank you.

    Read the article

  • Why might a file only be partially uploaded?

    - by letseatfood
    Why might a file only be partially uploaded? I am improving error-handling in my PHP file upload script and am trying to figure out how to handle UPLOAD_ERR_PARTIAL properly. Should I prompt the user to try uploading the file again, or should I inform them that there is a more severe problem which is preventing them from uploading a possibly legitimate file? Thanks!

    Read the article

  • c++ dynamic_cast error handling

    - by Nazgob
    Is there any good practice related to dynamic_cast error handling (except not using it when you don't have to)? I'm wondering how should I go about NULL and bad_cast it can throw. Should I check for both? And if I catch bad_cast or detect NULL I probably can't recover anyway... For now, I'm using assert to check if dynamic_cast returned not NULL value. Would you accept this solution on a code review?

    Read the article

  • file handling in .net

    - by Indranil Mutsuddy
    I have developed an application in vb.net2008 and database sqlserver. Now i want to ignore the database (it has 1 table as customer(name,password,hour,minute)) as i dont want my client to install sqlserver separately or other overheads. I am planning to do the whole using file handling in vb.net(manipulating the data in files itself eg change username, password etc). As I am new i don't actually know the proper way and of course need assistance.

    Read the article

  • Handling multiple HTTP requests from one source (e.g.a hacker)

    - by Haraldo
    Hi there, I have a script to handle http requests. I'm trying to think of some of the security issues I might have with it. My biggest concern at the moment is how I can manage multiple requests from the same source over and over. For instance someone trying to shut down my system. Do I need to be concerned or will Apache handling this issue. If not what is the best approach to take using php? Thanks,

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >