[jboss-user] [EJB 3.0 Users] - Re: JBoss 5.1.0 GA + EJB 3.0: RESTful Web Services with Jers
Jaikiran, I got it working by adding the EJB project as a library in my Web project, so that was just a configuration problem in Eclipse. Now regarding the "theory", you might want to check the exchanges i just had with Adam Bien here : http://www.adam-bien.com/roller/abien/entry/restful_calculator_with_javascript_and View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270193#4270193 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4270193 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: JBoss 5.1.0 GA + EJB 3.0: RESTful Web Services with Jers
Before i answer this, let me tell you that i don't have experience with RESTful web services (and haven't yet found time to read through the docs). "longbeach" wrote : | How do you call that exposed resftul web service ? | "longbeach" wrote : | Hi, | i got it working. | Can you tell us how you got that working? I mean how did you call the exposed RESTful web service? I even don't know whether exposing a SLSB as a RESTful web service guarantees any EJB semantics (like tx). Does it? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270176#4270176 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4270176 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: JBoss 5.1.0 GA + EJB 3.0: RESTful Web Services with Jers
Hi, i got it working. It was just a basic configuration problem in Eclipse. But now I have a question regarding injection of resources. I am using the Jersey implementation of JSR-311. I use EJB 3.0 (not 3.1). I have exposed a stateless session bean as a RESTful web service. @Path("/blabla") @Stateless public class MyBean implements MyBeanRemote{ @PersistenceContext private EntityManager em; ... } I try to inject a persistence context but it is not working. em is null. So my question is : do injection of resources (@PersistenceContext, @EJB ...) cease to work in a stateless session bean that has been exposed as a RESTful web service ? Thanks View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270167#4270167 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4270167 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: unidirectional and bidirectional relationship
Hi Sir, in my classes i have a manytomany relationshipm between 2 entities (Student and course) so should i create an interface "Studentcourse" that contain the definition of functions , a class "StudentcourseUniBean" that implements this interface and also all functions and a client class " StudentcourseClient" that contain the main. Or I can put this functions in one interface finally i'll have only one client. one interface and one class. and this interface contain all function that can i do for all entities(addStudentt(),deleteCourse(),addCourse()) or for each relationship and entity I have to create interface(contain functions ) ,class(implement the interface ),client(main class).Thank you for your help Best Regards View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270128#4270128 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4270128 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: unidirectional and bidirectional relationship
"Wolfgang Knauf" wrote : Hi, | | what is an "oaw project" ;-)? | | I assume that this is a project type in eclipse which is provided by some plugin? | | The "add to server" works only for EJB projects, EAR projects and Dynamic Web Projects". Maybe you can convert the oaw project to one of those? | | Best regards | | Wolfgang Hi Sir , An oaw project mean an open architecture ware project!! THaNK You for replying i really appreciate it!! You really my saver sir. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270038#4270038 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4270038 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to find Entity by Id
Thanks Wolfgang Knauf and jaikiran. That helped me much. Know its working fine. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269994#4269994 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269994 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: unidirectional and bidirectional relationship
Hi, what is an "oaw project" ;-)? I assume that this is a project type in eclipse which is provided by some plugin? The "add to server" works only for EJB projects, EAR projects and Dynamic Web Projects". Maybe you can convert the oaw project to one of those? Best regards Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269966#4269966 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269966 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: unidirectional and bidirectional relationship
"Wolfgang Knauf" wrote : Hi, | | assume that you have a relation "Person has many addresses" with two entities "Person" and "Address". | | If you declare a bidirectional relationship, your code can navigate from Person to Address, and from Adress to Person. | | With a unidirectional relationship, your code can navigate only from one side to the other. E.g. you can get the addresses of a person, but you cannot get the person of an address. | | The database representation of the relationship is not affected by your unidirectional/bidirectional decision. This defines only, how the code side looks like. | | Hope this helps | | Wolfgang tHANK U so much sir , Now i can see the difference but i have a new question another time, i'm developping an oaw project so after generating the code i have to build tables, That's why i used jboss ,but when i wanna add the oaw project in the server(add and remove option by right click on the sever ),i can not find the name of the oaw project ,So i created a new ejb3 project and i copy and paste the generated class into it finally i added the annotation and the relation ships into entities is it a good idea!!! Because My collegues add annotation (ejb3 code)in the Template!! That's why i'm wondering ,and I'm afraid if made a mistake!! What do you think Sir Knauf!! Viele Danke für Ihre Hilfe!! Thank you for ur help View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269838#4269838 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269838 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: unidirectional and bidirectional relationship
Hi, assume that you have a relation "Person has many addresses" with two entities "Person" and "Address". If you declare a bidirectional relationship, your code can navigate from Person to Address, and from Adress to Person. With a unidirectional relationship, your code can navigate only from one side to the other. E.g. you can get the addresses of a person, but you cannot get the person of an address. The database representation of the relationship is not affected by your unidirectional/bidirectional decision. This defines only, how the code side looks like. Hope this helps Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269767#4269767 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269767 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Using enviroment variables in persistence.xml
Please post the exact details including what you did and what doesn't work. While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269756#4269756 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269756 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: transaction closed ... guess timeout problem
increase the timeout period Regards, Premraj View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269752#4269752 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269752 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Using enviroment variables in persistence.xml
I couldn't manage to get it working though i followed the advices posted here. Can anybody tell me in which versions of JBoss it is supposed to work? I have a Jboss 4.2.0 in use. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269746#4269746 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269746 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR
Continued here: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=164609 Best regards Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269593#4269593 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269593 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EntityManager.refresh() - Works on Detatched Or Managed
Hi, the second statement is correct. To make a detached entity managed, you have to use "find" or "getReference". See https://www.hibernate.org/hib_docs/ejb3-api/javax/persistence/EntityManager.html#refresh%28java.lang.Object%29 Best regards Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269545#4269545 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269545 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Session EJB 3.1 packaged in war file not recognized in J
JBoss AS 6.0.0.M1 does not support any EJB 3.1 features. https://jira.jboss.org/jira/browse/JBAS-7526 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269540#4269540 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269540 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB jar cannot be deployed as a library (JBoss 5.0.1.GA)
"rsoika" wrote : | | So I installed now JBoss AS 6.0.0 M1 and now the project with EJBs and JPA Entities deploys successfully without errors ! Also when the EJB modul only contains the ejb-jar.xml and the persistence.xml. All implementations classes are provided by jars placed in the /lib folder of my EAR. | | That's good to know. Thanks for reporting. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269176#4269176 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269176 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB jar cannot be deployed as a library (JBoss 5.0.1.GA)
After all I was not able to deploy my EAR with the provided EJB jars successfully. But I found the following Bug report which seems to be similar to my general deployment problem: https://jira.jboss.org/jira/browse/JBAS-6842 So I installed now JBoss AS 6.0.0 M1 and now the project with EJBs and JPA Entities deploys successfully without errors ! Also when the EJB modul only contains the ejb-jar.xml and the persistence.xml. All implementations classes are provided by jars placed in the /lib folder of my EAR. So it seems that the general EAR Folder layout is ok for JBoss AS 6.0. So for now I will go further with JBoss 6.0 - I found some new problems during deployment with my current Faclets and WebService configuration ;-) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269172#4269172 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269172 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Customize jboss cache mechanism
Not the right place for this question. Please create a new thread here http://www.jboss.org/index.html?module=bb&op=viewforum&f=287 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269168#4269168 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269168 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR
"Wolfgang Knauf" wrote : Hi, | | in my "Properties" snippet, there is one thing you have to replace with your own config: the "j2ee.clientName" should be declared in your "jboss-client.xml" file. | But you don't need this line if you don't want to use the ENC for lookup. | | What do you mean with "sun server lib"? Is your client actually a ejb app in a sun app server? | | It seems that you are missing big conceptual parts of EJB3. So I would advice you (as Jaikiran already did) to take the time and read a good book or at least some EJB tutorials ;-). | | Best regards | | Wolfgang Hi Sir, Thank u for ur reply!! My client is an ejb application:and this it: | package ClientBeans; | | | | import java.util.Iterator; | import java.util.List; | import java.util.Properties; | | import javax.naming.Context; | import javax.naming.InitialContext; | import javax.naming.NamingException; | import javax.persistence.EntityManager; | import javax.persistence.PersistenceContext; | | import de.laliluna.library.Hotel; | import de.laliluna.library.HotelTestBean; | import de.laliluna.library.HotelTestBeanRemote; | | | public class ClientA { | | /** | * @param args | */ | | | | | public static void main(String[] args) { | | // Context context; | | | | | try | { | | Properties props = new Properties(); | props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); | props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client"); | props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099"); | // props.setProperty("j2ee.clientName", "ClientNameFromJBossClientXML"); | | InitialContext initialContext = new InitialContext(props); | | | | | | | //context = new InitialContext(); | | HotelTestBeanRemote beanRemote = (HotelTestBeanRemote) initialContext.lookup("HotelTestBean/local"); | | beanRemote.test(); | | | | } catch (NamingException e) | { | e.printStackTrace(); | | throw new RuntimeException(e); | } | | | | | } | | } | I have an error when i start my jboos server , sop that's why the client can't be executed and this it: | | 04:38:38,232 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#sample state=Create | javax.persistence.PersistenceException: [PersistenceUnit: sample] Unable to build EntityManagerFactory | at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677) | at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132) | at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:301) | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) | at java.lang.reflect.Method.invoke(Unknown Source) | at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59) | at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150) | at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66) | at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241) | at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47) | at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109) | at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70) | at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221) | at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) | at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) | at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR
Hi, in my "Properties" snippet, there is one thing you have to replace with your own config: the "j2ee.clientName" should be declared in your "jboss-client.xml" file. But you don't need this line if you don't want to use the ENC for lookup. What do you mean with "sun server lib"? Is your client actually a ejb app in a sun app server? It seems that you are missing big conceptual parts of EJB3. So I would advice you (as Jaikiran already did) to take the time and read a good book or at least some EJB tutorials ;-). Best regards Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269017#4269017 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269017 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection
Thanks for help your answers realy help. I understand that I can't be sure that I get the same instance (of Stateless) in the same transaction by lookup. Is there exists other way to pass some data from one statelsss to other in the same transaction In web application I used to it HttpSession and setAttribute. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268940#4268940 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268940 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR
"Wolfgang Knauf" wrote : Hi, | | Do you have a "jndi.properties" file? If not, you have to provide some properites to "InitialContext": | Properties props = new Properties(); | | props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); | | props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client"); | | props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099"); | | props.setProperty("j2ee.clientName", "ClientNameFromJBossClientXML"); | | | | InitialContext initialContext = new InitialContext(props); | | What is the value of "HotelTestBean.RemoteJNDIName"? | It should be "EARName/EJBName/remote" if your app is bundled as EAR file, or "EJBName/remote" if you deploy only an EJB jar. | | Hope this helps | | Wolfgang Hi i ried to use this code without editing it but i still have this error: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 But after a reaserch i found that i have to install jars "So Just adding the "appserv-rt.jar" in sun server lib folder to the classpath does the trick for providing the corba properties" :tih is what i found is this a solution!! Thank u for help View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268879#4268879 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268879 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR
Hi Mr wolfgang, i'm just using u property code: Properties props = new Properties(); props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client"); props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099"); props.setProperty("j2ee.clientName", "ClientNameFromJBossClientXML"); InitialContext initialContext = new InitialContext(props); But i'm having an exception and this is it: 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 com.et.GestionDeStockClient.main(GestionDeStockClient.java:29) Thank you so much View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268878#4268878 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268878 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection
Hi, anonymous wrote : I need this information (about changed entity) to inform my Swing client which records was updated This could be achieved be a Topic Queue. The ID changed message is posted by the EJB, and all swing clients register to it. Hope this helps Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268835#4268835 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268835 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection
anonymous wrote : JNDI lookup for a STATELESS session bean i the same transaction will return the SAME instance as a previous call ?? No. Stateless beans are kept in a pool; each time you ask for one via JNDI you could get a different instance. If you need a single bean, then look it up once and pass it to the methods that need to interact with it. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268831#4268831 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268831 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Logging an EJB jar deployed under JBoss
Sorry, i did not completely understand what you are trying to do and what issues you are running into. Please post the details with an example maybe. But looking at the details that you have posted, i guess a better place to ask this question in the AS User forum http://www.jboss.org/index.html?module=bb&op=viewforum&f=287 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268767#4268767 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268767 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: 2 persistence.xml files in EAR archive
The details are a bit long to post here. Chapter 6 of the EJB3 Persistence spec has all these details, so that would be a better place to check this. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268765#4268765 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268765 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR
Since you are new to EJB3, the best place to start is, looking at the tutorials. Download AS 5.1.0 and try these tutorials http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.7/html/index.html View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268748#4268748 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268748 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection
Thanks for replay I need this information (about changed entity) to inform my Swing client which records was updated. "Wolfgang Knauf" wrote : | I am also not sure whether a JNDI lookup for a stateful session bean in the same transaction will return the SAME instance as a previous call. | And what with stateless : JNDI lookup for a STATELESS session bean i the same transaction will return the SAME instance as a previous call ?? Best regards View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268675#4268675 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268675 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR
Hi Sir, after a reaserch i wanna tell you that my appl is an EjB jar , so everything is correct as u said it to me! so what is the problem should i install another jboss server Thank you in advance View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268633#4268633 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268633 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR
Hi Mr Knauf, I'm so sorry for late reply i was at university! yes i have the jndi.properties: java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=localhost:1099 HotelTestBean.RemoteJNDIName= public static final String RemoteJNDIName = HotelTestBean.class.getSimpleName() + "/remote"; Sir i know that it's a stupid question BUT I'M SORRY i'm a biginner: how can i know if my app is bundled as EAR fil or as EJB jar. But i think it is bundled as EAR file because i have this error:so how can i know the name of my EARName. Thank u so much sir View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268603#4268603 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268603 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: MBean with Scheduler: IllegalArgumentException
That was wrong: hitTest(int There are only fix defined types of attribute in org.jboss.varia.scheduler.Scheduler allowed. I took REPETITIONS, that means so match as long. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268590#4268590 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268590 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Persistence Context Transaction
I found the bug: The checkout method must return the order returned by the entity manager. | @Stateless | public class WarehouseBean implements Warehouse { | | @PersistenceContext(unitName="ECB") | EntityManager entityManager; | | @TransactionAttribute(TransactionAttributeType.MANDATORY) | public Order checkout(Order order) { | return this.entityManager.merge(order); | //wrong: return order | } | } | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268561#4268561 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268561 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection
Hi, I think I understand. But as I said above: a stateless bean must not contain member variables, because their values will be lost/undefined after a business method is finished. I also think that it is not really possible to "store" data beetween two EJB calls, because the EJB layer does not know "sessions", only transactions. I am also not sure whether a JNDI lookup for a stateful session bean in the same transaction will return the SAME instance as a previous call. Didn't find anything about this in the web. What for do you need the "ChangedIdsCollectorService"? If you need it to update an ID after its autocreation in other entities: would relationships help? Best regards Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268543#4268543 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268543 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to handle a correct ejb module undeployment
Hi jaikiran Yes, we use standard JBoss datasource files and JPA and ORM technology. The datausources are not part of the EAR. What is the recommended way of shutting down an EJB module in order to be able to cleanup? At the moment, we use an external event that informs the application to finish all transactions, and not to start new transactions. If someone forgets the send this event, then we have a problem. Is there perhaps a possibility to define an interceptor that we could use instead of this external event? Thanks for your help Ralf View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268533#4268533 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268533 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR
Hi, Do you have a "jndi.properties" file? If not, you have to provide some properites to "InitialContext": Properties props = new Properties(); | props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); | props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client"); | props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099"); | props.setProperty("j2ee.clientName", "ClientNameFromJBossClientXML"); | | InitialContext initialContext = new InitialContext(props); What is the value of "HotelTestBean.RemoteJNDIName"? It should be "EARName/EJBName/remote" if your app is bundled as EAR file, or "EJBName/remote" if you deploy only an EJB jar. Hope this helps Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268520#4268520 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268520 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Default value for transaction-type in persistence.xml
Thanks Jaikiran. That is what I read too a while ago. I guess I needed confirmation of that same behaviour in JBoss, which should be anyways, since it is JEE compliant. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268350#4268350 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268350 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Default value for transaction-type in persistence.xml
"longbeach" wrote : | That is what this documentation for Apache Geronimo states : | http://cwiki.apache.org/GMOxDOC21/persistencexml.html | anonymous wrote : | | In general, in Java EE environments, a transaction-type of RESOURCE_LOCAL assumes that a non-JTA datasource will be provided. In a Java EE environment, if this element is not specified, the default is JTA. In a Java SE environment, if this element is not specified, a default of RESOURCE_LOCAL may be assumed. | | | That's actually what the EJB3 Persistence Spec states too: "EJB3 Persistence Spec" wrote : 6.2.1.2 transaction-type | The transaction-type attribute is used to specify whether the entity managers provided by the entity manager factory for the persistence unit must be JTA entity managers or resource-local entity managers. The value of this element is JTA or RESOURCE_LOCAL. A transaction-type of JTA assumes that a JTA data source will be provided either as specified by the jta-data-source element or provided by the container. In general, in Java EE environments, a transaction-type of RESOURCE_LOCAL assumes that a non-JTA datasource will be provided. In a Java EE environment, if this element is not specified, the default is JTA. In a Java SE environment, if this element is not specified, a default of RESOURCE_LOCAL may be assumed. | | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268349#4268349 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268349 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection
I try explain exacly what I doing, the prevoius example wasn't real(but describe problem) I have fasade | @Stateful | public class FasadeBean implements Fasade{ | | @EJB | private ChangedIdsCollectorService; | | | | public ServerResponse execute(String serviceName, String serviceMethod, Object[] arguments){ | | Object result = serviceExecutor.execute(serviceName,serviceMethod, arguments); | | return new ServerResponse(result, ChangedIdsCollectorService.getChangedIds()); | | | } | | | } | and service which collect ids of changed object(ENTITY) | @stateles | public class ChangedIdsCollectorServiceBean inplements ChangedIdsCollectorService{ | | private List changedIds; | | public void addChangedId(Long id){ | changedIds.add(id); | } | | public List getChangedIds(){ | return changedIds; | } | | } | When i call fasade and execute for example ("OperatorService","update" , operatorEntity) this fasade invokes "OperatorService" and return updated enitity, but I also have in my Entity metod which lookup for ChangedIdsCollectorService and add yourself to his list: | public class AbstractEntity { | | @javax.persistence.PostUpdate | public void changeListener(){ | Context context = new InitialContext(); | ChangedIdsCollectorService ChangedIdsCollectorService = ChangedIdsCollectorServicecontext.lookup("ChangedIdsCollectorService/local"); | ChangedIdsCollectorService.addChangedId(this.id); | | | } | } | In this way I get information about changed objectsupdate of operator can invokes some businness rule which can updates another object and I also will be have this Ids. Now I don't now if in FasadeBean I will be have the same instance of ChangedIdsCollectorService (from injection) like in Entity(from lookup) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268305#4268305 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268305 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection
Hi, by definition, the management of EJB class instances (created by "new MyBean()" calls) is a matter of the server and totally undefined for your own client code. So, you can never expect to get instance of a previous method call. This is also true for stateful session beans, but here the server will restore the instance variables state for you. Please provide us with more details of your architecture. Currently, I don't get the point what is happening in "AccountServiceBean". If it contains some business method, which stores it's results in a member variable, I would advice you to convert the bean to some POJO/helper class, and return the instance of this class from "SimplePojo.search". Hope this helps Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268289#4268289 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268289 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection
Thanks for reply AccountService is Stateless. I need the same instance beacuse in InvoiceItemServiceBean a do some job which generates data and assign it to the AccountService field. After in POJO I want this data View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268269#4268269 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268269 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to setting up an MBean depend on some SessionBeans
"larryxu77" wrote : | | In JBoss4 I find a way to specify MBean depends on some SessionBeans by adding below words in jboss-app.xml | | strict | | | That's fixed in the upcoming JBoss AS 6.0 M1. "larryxu77" wrote : | Now we are working on JBoss5.1, it seems doesn't work on JBoss5.1 | I only find the similar function by the annotation 'depends' or xml setting like below. | @Depends(...) | | But I don't want to keep this way because it is not a elegant way and I have to specify all references EJBs in the annotation. | Your MBean depends on *all* EJBs? Ideally the @Depends on the MBean should only point to the EJB on which the Mbean depends. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268241#4268241 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268241 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB 3.0 lookup from Pojo and Injection
"MirekSz" wrote : | | If I can be sure that injected object AccountService will be the same lookup object??? What is the AccountService? Is it a Stateless session bean or a stateful session bean? More importantly, why do you want it to be the same instance? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268236#4268236 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268236 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB jar cannot be deployed as a library (JBoss 5.0.1.GA)
Jaikiran, thanks for your help. Yes when I put the persistence.xml into the .ear it looks much better. The deployer now recognizes the entities and so I take one step forward... :-) "jaikiran" wrote : | The weird part about the packaging is - the my_ejb_module.jar is mapped as a EJB module and contains only the descriptors (ejb-jar.xml, jboss.xml etc..). No classes within that jar. | I know this looks not typical for an jee project, but I think it should be a typical way deploying existing JEE components. The reason for that ear layout is, that I want to provide developers of workflow applications with a EJB based workflow component. This component is part of the imixs wokflow project and packaged into the imixs-workflow-jee-x.x.x and imixs-workflow-jee-impl-x.x.x jars. So if you plan to add Imixs workflow components into your JEE Web project there should be no need to add sources/classes into the EJB Module or deal with the whole EJB stuff. The developer should only declare a few descriptors. So the JEE Project becomes very compact. My vision is that the application developer concentrates on the GUI and add only some Richfaces libs and some business logic bundled in ejb-jars. I think this is one of the concepts behind JEE component architecture. And I did not understand why we found so much cool GUI components like RichFaces but no business components which helps developers to speed up the application development. Maybe this idea becomes more clear if you look at one tutorial I wrote about the usage of my maven archetype: http://www-02.imixs.com/roller/imixsworkflow/entry/building_a_imixs_workflow_webapp2 you see - I want to attest that not only RubyOnRails developers are speedy ;-) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268028#4268028 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4268028 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to handle a correct ejb module undeployment
"rbattenfeld" wrote : | At the moment, container stops the database resources before the EJBs are stopped. | Hmm, probably because there's no explicit dependency specified on the database resource (datasource?) in the EJBs. How does the EJB access the database resource? Through datasources? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267938#4267938 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267938 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB jar cannot be deployed as a library (JBoss 5.0.1.GA)
Ralph, I looked at that application and it's packaging looks invalid on one count and a bit weird on another count. The invalid part is - the persistence.xml is deployed through the META-INF of the my_ejb_module.jar. Which means that, as per the EJB3 spec, the persistence unit is scoped only to that jar and will not be visible outside it. So you can't inject using @PersistenceContext from some other jar (imixs-workflow-jee-impl-x.x.x.jar). If you want the persistence unit to be visible to all components in the ear, then you will have to place the persistence.xml in the .ear/META-INF folder. The weird part about the packaging is - the my_ejb_module.jar is mapped as a EJB module and contains only the descriptors (ejb-jar.xml, jboss.xml etc..). No classes within that jar. The EJB interfaces and the implementations are then packaged in imixs-workflow-jee-x.x.x.jar, imixs-workflow-jee-impl-x.x.x.jar and placed in the .ear/lib folder. This is causing issues with the EJB3 deployers. Ideally, the bean implementations should be outside the lib folder, at the root of the ear. Why not package those implementations in the my_ejb_module.jar? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267907#4267907 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267907 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: JBoss 6.0.M1 and ejb 3.1 (JSR 318)
We don't have an exact date right now. But we will be releasing EJB3.1 components after 6.0 M1 has been officially released. So tentatively, you can expect it to be some weeks after AS 6.0 M1. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267738#4267738 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267738 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Client JNDI lookup (vs. JBoss), ClassNotFoundException
It seems to be working... A LOT OF THANKS! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267656#4267656 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267656 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Client JNDI lookup (vs. JBoss), ClassNotFoundException
Hi, seems your client requires "commons-lang.x.jar". Maybe the JNDI lookup raises an exception on this client, and some internal exception if from commons-lang. Hope this helps Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267651#4267651 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267651 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Call EJB 3 deployed under JBoss 4.2.3 from JBoss 4.0.5
See this http://www.jboss.org/community/wiki/JBossVersionCompatibilityMatrix and follow the instructions mentioned there. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267511#4267511 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267511 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NamedQuery problem: TABLE is not mapped
Thank *you* :)! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267501#4267501 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267501 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NamedQuery problem: TABLE is not mapped
I'm sorry, I was wrong with the casing of the property. You are right, it has to be lower case. Getter/Setter "getArtnr"/"setArtnr" indeed form a property "artnr". Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267487#4267487 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267487 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB jar cannot be deployed as a library (JBoss 5.0.1.GA)
Hi Jaikiran, yes I mean JPA entities. And yes, they are just plain jar files without ejb deployment descriptor. I am deploying a separate EJB Module in my EAR which defines session EJBs and also the persistence.xml with the definition of my persistence unit. So my ear folder structure looks like this: | / | +- lib/ | | +- imixs-workflow-api-x.x.x.jar | | +- imixs-workflow-jee-x.x.x.jar (contains the JPA entity beans) | | +- imixs-workflow-jee-impl-x.x.x.jar (contains EJB 3.0 Session beans) | +- my_ejb_module.jar(contains ejb-jar.xml and persistence.xml) | +- my_web_module.war | +- ... The project is deployable on glassfish successfully. To me it looks like that scanning of the /lib folder did not happen during deployment. Did I need any special descriptor/properties? I read about that this problem was an issue in version 4.x. The ear is part of the imixs workflow project so you can download the application if this would help you understanding my problem: https://imixs-workflow.dev.java.net/servlets/ProjectDocumentList thanks for help ralph View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267405#4267405 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267405 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB jar cannot be deployed as a library (JBoss 5.0.1.GA)
anonymous wrote : I try to deploy an EAR with Entity EJBs You mean JPA entities right and *not* EJB2.x entity beans. anonymous wrote : | contained in a shared jar located in the /lib folder of my ear. | If they are "deployments" and not just plain jar files then place them at the root of the ear instead of the lib folder. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267322#4267322 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267322 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EJB jar cannot be deployed as a library (JBoss 5.0.1.GA)
Hi, I have the same issue running on JBoss 5.1.0.GA_j6. I try to deploy an EAR with Entity EJBs contained in a shared jar located in the /lib folder of my ear. I get the following error message during deployment: | 15:25:49,501 INFO [Ejb3DependenciesDeployer] Encountered deployment abstractvfsdeploymentcont...@25040105{vfszip:/opt/jboss-5.1.0.GA_j6/server/imixs/deploy/imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear/} | 15:25:49,501 INFO [Ejb3DependenciesDeployer] Encountered deployment abstractvfsdeploymentcont...@25040105{vfszip:/opt/jboss-5.1.0.GA_j6/server/imixs/deploy/imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear/} | 15:25:49,501 INFO [Ejb3DependenciesDeployer] Encountered deployment abstractvfsdeploymentcont...@14529946{vfszip:/opt/jboss-5.1.0.GA_j6/server/imixs/deploy/imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear/imixs-workflow-jsf-sample-ejb-0.0.1-SNAPSHOT.jar/} | 15:25:49,501 INFO [Ejb3DependenciesDeployer] Encountered deployment abstractvfsdeploymentcont...@14529946{vfszip:/opt/jboss-5.1.0.GA_j6/server/imixs/deploy/imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear/imixs-workflow-jsf-sample-ejb-0.0.1-SNAPSHOT.jar/} | 15:25:49,501 INFO [Ejb3DependenciesDeployer] Encountered deployment abstractvfsdeploymentcont...@14529946{vfszip:/opt/jboss-5.1.0.GA_j6/server/imixs/deploy/imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear/imixs-workflow-jsf-sample-ejb-0.0.1-SNAPSHOT.jar/} | 15:25:49,501 INFO [Ejb3DependenciesDeployer] Encountered deployment abstractvfsdeploymentcont...@14529946{vfszip:/opt/jboss-5.1.0.GA_j6/server/imixs/deploy/imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear/imixs-workflow-jsf-sample-ejb-0.0.1-SNAPSHOT.jar/} | 15:25:49,599 ERROR [Ejb3Deployment] Exception while processing container metadata for EJB: EntityServiceBean in unit: imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear | 15:25:49,599 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/opt/jboss-5.1.0.GA_j6/server/imixs/deploy/imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear/ state=PreReal mode=Manual requiredState=Real | org.jboss.deployers.spi.DeploymentException: Error deploying imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear: Exception while processing container metadata for EJB: EntityServiceBean in unit: imixs-workflow-jsf-sample-ear-0.0.1-SNAPSHOT.ear | at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:196) | at org.jboss.ejb3.deployers.Ejb3Deployer.deploy(Ejb3Deployer.java:99) | at org.jboss.deployers.vfs.spi.deployer.AbstractVFSRealDeployer.internalDeploy(AbstractVFSRealDeployer.java:45) | at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50) | at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171) | at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439) | at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157) | at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098) | at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) | at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631) | at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) | at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) | at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) | at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) | at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) | at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781) | at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702) | at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117) | at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:362) | at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255) | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) | at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351) | at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178) | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165) | at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267) | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) | at java.util.concurrent.ThreadPoolExecutor
[jboss-user] [EJB 3.0 Users] - Re: Set JNDI location for EJB 3.0 Bean in jboss-4.2.1.GA
Thanks! Making these changes worked. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267294#4267294 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267294 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NamedQuery problem: TABLE is not mapped
Wolfgang, thanks for caring, thumbs up! The book I'm studying does not mention case sensitivity, and I thought the statement would be table related, not class related. So thank you very much, because after changing the case, it worked. There's one thing: I have indeed a artnr field and public getters and settes which render it Artnr (getArtnr and setArtnr). I tried your hint first, i.e. | SELECT a FROM Artikel a ORDER BY a.Artnr but this yields an exception when deploying: ERROR [SessionFactoryImpl] Error in named query: findAllArtikel | org.hibernate.QueryException: could not resolve property: Artnr of: ser.kap08.Artikel [SELECT a FROM ser.kap08.Artikel a ORDER BY a.Artnr] If I try with the field case instead, i.e. SELECT a FROM ser.kap08.Artikel a ORDER BY a.artnr it's fine. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267287#4267287 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267287 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: NamedQuery problem: TABLE is not mapped
Hi, in your named query, you have to use the name of the entity bean class, not the table name. So it should be "SELECT a FROM Artikel a ORDER BY a.Artnr". If the property has getter/setter "getArtnr"/"setArtnr", it has to be named "Artnr" in the query. Hope this helps Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267277#4267277 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267277 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EntityManager.refresh() works only on managed entities.
I am just trying to figure out why such a constraint. Well i personally don;t see any complexity in refreshing entity graph using PK. As the PK is intact in detached instances, we can always load(refresh) the entity graph. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267085#4267085 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267085 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Migration EJB2.1 -> EJB3 - Usage of ValueObjects / DataT
Duplicate post, see http://www.jboss.org/index.html?module=bb&op=viewtopic&t=164123. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267060#4267060 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267060 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Set JNDI location for EJB 3.0 Bean in jboss-4.2.1.GA
Hi, ejb-jar.xml: I think you have to use "business-local" instead of "local". "local" is for EJB 2.1 beans, while "business-local" is for 3.0. With JBoss 4.2, I think both versions work, but in 5.0 this will no longer work. Probably, someone at JBoss misunderstood the spec and this was changed later ;-). jboss.xml: you need "local-jndi-name" for you local interface, not "jndi-name". This might be the reason for your error. Hope this helps Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267029#4267029 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267029 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: EntityManager.refresh() works only on managed entities.
Hi, you might better ask this in some EJB spec forum ;-). The spec/JavaDoc at http://java.sun.com/javaee/5/docs/api/javax/persistence/EntityManager.html#refresh%28java.lang.Object%29 explicitely states: ... | Throws: | IllegalArgumentException - if not an entity or entity is not managed | ... | To refresh a detached entity, you have to use "find" or "getReference". Best regards Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267023#4267023 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267023 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: [JBoss 5.1 GA & EJB 3.0] persistence.xml problem : Canno
I do have 2 persistence.xml files in my EAR archive but i am specifically calling a unit-name that is present in one persistence.xml file only. All i do in my servlet is call a stateless session bean. And from the SSB I execute a JPQL query. Transactions are container-managed. No manual commit. That SSB is a timer service by the way but i do not think it matters. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267013#4267013 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267013 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: [JBoss 5.1 GA & EJB 3.0] persistence.xml problem : Canno
As part of the transaction are you enrolling more than one resource in the transaction? Maybe multiple (local-tx) datasources are being used in that transaction? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267005#4267005 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267005 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: [JBoss 5.1 GA & EJB 3.0] persistence.xml problem : Canno
Hi Jaikiran, thanks for helping. Well, before reading your answer, I did some googling and found a link where someone had previously encounter that error : http://venugopaal.wordpress.com/ I did what he suggested, I modified the file bossts-properties.xml (jbossjta-properties.xml was merged) and added the following line : | | And it works. But I would like to understand what was wrong : some issue with the arjuna API ? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266995#4266995 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266995 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: [JBoss 5.1 GA & EJB 3.0] persistence.xml problem : Canno
anonymous wrote : at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:76) | at com.eni.dvtejb.metier.sessions.StockTimerService.verifierStocks(StockTimerService.java:64) | anonymous wrote : | 10:37:22,853 ERROR [JDBCExceptionReporter] Could not enlist in transaction on entering meta-aware ob | ject!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlis | t resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -3f57c7ff:cec5:4b0a5793:64 status: ActionStatus.ABORT_ONLY >) Looks like you are trying to run that query when the transaction is already marked for rollback (probably because of some exception earlier). View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266993#4266993 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266993 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Custom StrictMaxPool settings in ...-aop.xml ignored
"shreyasshinde" wrote : It turns out that when EJBs applications are deployed, the properties in ejb3-interceptors-aop.xml file under the deploy directory are applied first. That's because, your configuration instructs the container to do so: | Notice the "extends". You have instructed that your domain extends the Stateless Bean domain which comes from ejb3-interceptors-aop.xml View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266969#4266969 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266969 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Custom StrictMaxPool settings in ...-aop.xml ignored
Okay. I have a solution for this. It turns out that when EJBs applications are deployed, the properties in ejb3-interceptors-aop.xml file under the deploy directory are applied first. The following annotation in the file says "if the class is not present then apply this property. | | @org.jboss.ejb3.annotation.Pool (value="ThreadlocalPool", maxSize=20, timeout=1) | | So, when I was bundling my -aop.xml file with my EJB application, the property should read: | | @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=10, timeout=1) | | Which means, if the class is present then apply this property. As the properties from ejb3-interceptors-aop.xml file are always applied first, the class is present and therefore we only check for its existence. Most of the documentation is misleading in a way that this point is not very clear. Thanks, Shreyas View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266942#4266942 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266942 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: JBoss 6.0.M1 and ejb 3.1 (JSR 318)
Hi jaikiran And what is the stage of ejb 3.1 project? is there any release date scheduled? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266909#4266909 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266909 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Custom StrictMaxPool settings in ...-aop.xml ignored
I am trying to use StrictMaxPool in JBoss 5.1.0.GA and the properties in the -aop.xml file seem to be ignored. This is for a stateless session bean. The EJB3 container seems to honor only the properties in ejb3-interceptors-aop.xml. Any -aop.xml bundled with the EJB application seem to be ignored. Any ideas what I could be missing? Thanks, Shreyas jboss.xml: | | http://www.jboss.com/xml/ns/javaee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="5.0" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss_5_0.xsd";> | | | ClusterOne.USA_MAP.MapServer | esri/services/ClusterOne/MapServer/USA_MAP | true | | ClusterOne | org.jboss.ha.framework.interfaces.RoundRobin | | Strictly Pooled Stateless Bean | | | | mydomain-aop.xml: | | | | | @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=10, timeout=1) | | | | | | @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=10, timeout=1) | | | | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266854#4266854 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266854 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: TimerService Restart Issue
"jaikiran" wrote : Try our latest EJB3 plugin http://www.jboss.org/ejb3/ejb3plugin.html against AS-5.1.0. | | Thanks for suggestion, i've tried JBoss EJB3 Plugin 1.0.18 (JBoss 5.1). I didn't reproduce all the code I had before but the problem ("Could not dereference object") doesn't appear anymore, at least if i do NOT cancel timers at application shutown. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266788#4266788 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266788 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: JBoss 6.0.M1 and ejb 3.1 (JSR 318)
JBoss AS 6.0 M1 does *not* have EJB3.1. EJB3.1 is currently work in progress and we'll post in this forum once it's available for use against AS-6. Our release process allows us to release EJB3.x components outside a AS release. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266733#4266733 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266733 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Resolve an EJB Module Remote or Local type in a web appl
Thaks a lot this conf work also with JBoss Tools View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266647#4266647 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266647 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Resolve an EJB Module Remote or Local type in a web appl
Thaks; "Wolfgang Knauf" wrote : | do you use Eclipse Web Tools Platform or JBoss Tools? | I'm using JBoss Tools View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266644#4266644 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266644 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: TimerService Restart Issue
Try our latest EJB3 plugin http://www.jboss.org/ejb3/ejb3plugin.html against AS-5.1.0. The latest download is available here http://www.jboss.org/ejb3/downloads.html If the latest plugin too doesn't solve your issue then please post the entire details. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266605#4266605 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266605 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: TimerService Restart Issue
I've just had a similar issue with Timer and EJB injection, at application redeploy / server restart. Direct JNDI lookup didn't work out as well. What I did is a partial workaround - I switched to timer start thru MBean in sar module and I do reset all the timers in MBean stop() method. This way I don't get any perstent timers kept but there's no any classloader / "Could not dereference object" errors at new timers creation. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266587#4266587 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266587 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Resolve an EJB Module Remote or Local type in a web appl
Hi, do you use Eclipse Web Tools Platform or JBoss Tools? If you use WTP: you have to add an "Java EE Module Dependency". See this screenshot: http://www.cs.hs-rm.de/~knauf/KomponentenArchitekturen2008/stateless/webmoduledependencies.png Hope this helps Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266506#4266506 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266506 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: ejb3 and web services
1. Anyone have an example of doing this? I see you can register a web service in jndi via a descriptor, and retrieve; so I'd expect you could inject and call getPort? 2. I see that the answer requires jsr-237 or using an implementation like commonJ. Is there going to be an out-of-the-box service in a future JBOSS, or is commonJ adequate. Howard View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266411#4266411 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266411 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Remote and local interface on same ejb instance
Hi, do you mean something like this? | @Stateless | public class ABean implements ARemote | { | //Access B and C through local interface? | @EJB | private BBean; | | @EJB | private CBean; | } | | | @Remote | public interface ARemote | { | } | | | @Stateless | public class BBean implements BLocal | { | } | | | @Local | public interface BLocal | { | } | | @Stateless | public class CBean implements CLocal | { | } | | | @Local | public interface CLocal | { | } | If not, please modify my sample. Currently, I don't get your question ;-). Best regards Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266276#4266276 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266276 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to find Entity by Id
Hi, the JNDIView is here: http://www.jboss.org/community/wiki/DisplayTheJDNITreeWithTheJMXConsole The default JNDI name of "CustomerHome" is "EarName/JarName/Beanclass" if the the app is deployed as EAR file. If it is a JAR file, it is "JarName/Beanclass". You don't need JNDI properties if your portal webapp is running in the same JBoss instance as the EJBs. Hope this helps Wolfgang View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266272#4266272 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266272 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: tuning ejb3 calling
hi jaikiran, anonymous wrote : Actually, this isn't specific to EJB3 or tuning of EJB3 :) :d , yeah but is there a know pattern or best practices for that ? if yes is there some example somewhere :d ? yeah thanks yu were right in my jboss side i was compiling ejb's with java6 and thanks a lot View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266237#4266237 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266237 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: tuning ejb3 calling
anonymous wrote : Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file | Actually, this isn't specific to EJB3 or tuning of EJB3 :) I guess you compiled some class (or classes) using a higher version of Java (Java 1.6?) and are using it in a server running on a lower version of Java (Java 1.5?) View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266224#4266224 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266224 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to load external parameters in ejb?
Hi, here is the whole stateles bean class: | | @Stateless | public class QueueSenderBean implements ISenderLocal { | | private static final Logger log = Logger.getLogger(QueueSenderBean.class); | | @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) | public void send(final Serializable obj, String queueName, String cf) { | sendToQueue(obj, queueName, cf); | } | | @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) | private void sendToQueue(Serializable obj, String queueName, String cf) { | Connection queueConnection = null; | Session queueSession = null; | Queue queue = null; | MessageProducer sender = null; | try { | final Context initCtx = new InitialContext(); | final ConnectionFactory qFactory = (ConnectionFactory) initCtx.lookup(cf); | queueConnection = qFactory.createConnection(); | queueSession = queueConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); | queue = (Queue) initCtx.lookup(queueName); | sender = queueSession.createProducer(queue); | log.debug("Sending message to " + queue); | final Message msg = queueSession.createTextMessage((String) obj); | sender.send(msg); | } catch (final javax.jms.JMSException e) { | log.error("send() -> JMS Error: ", e); | } catch (final NamingException e) { | log.error("sendToQueue() -> JNI Error: ", e); | } catch (final Exception e) { | log.error("sendToQueue() -> Error: ", e); | } finally { | try { | if (queueConnection != null) { | queueConnection.close(); | } | if (queueSession != null) { | queueSession.close(); | } | queue = null; | if (sender != null) { | sender.close(); | } | } catch (final Exception e) { | log.error("sendToQueue() -> Error while closing resources: ", e); | } | } | } | | } | I use TransactionAttributeType.NOT_SUPPORTED because i send messages to websphere in CLIENT transportType, which throws exceptions if this is done in transaction scope, so i added this attribute. Regards. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266153#4266153 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266153 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Lookup for a session bean if only the interface is given
"Juergen.Zimmermann" wrote : | Just one question: when doing this in the way described above, how do I get the DeploymentUnit object? Can you give me another hint please? It's actually the responsibility of the JBoss Microcontainer Virtual Deployment Framework (which is used in the JBoss AS-5), to pass the deployment unit to your deployer. It's easy, but you will need some introduction to the JBoss Microcontainer and the deployment framework. Here's the MC docs http://www.jboss.org/file-access/default/members/jbossmc/freezone/docs/2.0.x/userGuide/index.html and the deployment framework chapter http://www.jboss.org/file-access/default/members/jbossmc/freezone/docs/2.0.x/userGuide/pt04.html View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266098#4266098 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266098 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Lookup for a session bean if only the interface is given
Thank you very much! That's what I was looking for. Just one question: when doing this in the way described above, how do I get the DeploymentUnit object? Can you give me another hint please? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266064#4266064 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266064 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to find Entity by Id
I couldnt find a JNDIView where my CustomerHome is listed, so i took CustomerHome because of the console output where the ejbname is CustomerHome. Where could i proof the name of the jndi name for my CustomerHome? I made a lookup in the client. Context context = new InitialContext(); | CustomerHome customer = (CustomerHome)context.lookup("CustomerHome"); | customer.findById(1); And become the Error Message: ERROR [JBossInjectionProvider] Injection failed on managed bean. | javax.naming.NameNotFoundException: de.counter.CounterBean not bound | at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) | So I thought, jbossinjectionprovider doesnt know where the managedbean has to lookup. That way i gave it these properties. Properties properties = new Properties(); | properties.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory"); | properties.put("java.naming.factory.url.pkgs","=org.jboss.naming:org.jnp.interfaces"); | properties.put("java.naming.provider.url","localhost:1099"); Now, i am getting nothing. no error, no success message. If i cancel my changes (the properties or give a other jndi name) it is always the same, no answers from the console. Sorry, but that has completly confused me. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266039#4266039 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266039 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Remote and local interface on same ejb instance
Thanks for reply I have three stateful beans A,B and C. Beans B and C are parts of A bean and A bean access it through local interface. Is ti posible to create remote interface for same instances, B and C beans, and delegate it to remote client. This means thath both clients, A bean and remote client, operate on same bean instance. Thanks Zlaja View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265922#4265922 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265922 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Remote and local interface on same ejb instance
Sorry, but i did not understand your question. Can you please elaborate on what you are doing? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265869#4265869 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265869 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: JPA/EJB3 Entitybean/Hibernate JPA....Confused...
"gohiljigar15" wrote : | | 1) wt additional/special features does hibernate provides if I want to use Hibernate JPA...? | I don't exactly know the list of such features. But each persistence provider including Hibernate have their own set of additional features. Most of the applications just use JPA since that covers almost everything that they require. "gohiljigar15" wrote : | 2) wt would be better the core Hibernate OR Hibernate JPA...? why? | I mean obviously the standardization does gives an advantage of switching the PP anytime...but still have not explored the power of Core Hibernate fully...thats why have this question... | | I would recommend that you use JPA initially. Then as and when you feel the need for some Hibernate specific functionality, then you can think of using those. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265868#4265868 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265868 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to load external parameters in ejb?
"jaikiran" wrote : | | 1) I assume that this is a typo in your post and you actually meant bean.sendToQueue. If it's not a typo then please post the exact code and config files, so that there's no confusion | 2) How do you get hold of the "bean" in that code? Ignore, both those questions. The stacktrace that you posted has the answers to both those questions. Could you please post the code in the send method (which invokes sendToQueue), just want to make sure there's nothing wrong in there? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265866#4265866 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265866 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to load external parameters in ejb?
bean.send(xml, "java:comp/env/AS.1.BFT_ORDERS", "java:comp/env/CF.1"); 1) I assume that this is a typo in your post and you actually meant bean.sendToQueue. If it's not a typo then please post the exact code and config files, so that there's no confusion 2) How do you get hold of the "bean" in that code? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265865#4265865 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265865 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to find Entity by Id
anonymous wrote : new CustomerHome() CustomerHome is a @Stateless bean. You are not supposed to instantiate a EJB using the new operator. Instead you should lookup the bean from JNDI. See this for more details http://www.jboss.org/index.html?module=bb&op=viewtopic&t=137590#4158957 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265862#4265862 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265862 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Lookup for a session bean if only the interface is given
"Juergen.Zimmermann" wrote : I'm trying to integrate Jersey with JBossAS. Jersey is an implementation of JAX-RS, and we want to compare RESTEasy and Jersey. | | However, Jersey resolves @EJB only for Glassfish. Therefore, I have to implement a class You have to do similar to what the JBossWS deployer does. See this http://www.jboss.org/index.html?module=bb&op=viewtopic&t=154621 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265855#4265855 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265855 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How do I define attributes in a service bean?
Jakiran, sorry for waiting your time. I am an eejit! I never put get/set in front of the attribute method calls. All working now. Thanks. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265749#4265749 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265749 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How do I define attributes in a service bean?
What does your @ManagementInterface look like? anonymous wrote : However I don't know how to define attributes. Do you have getter/setters for those attributes? EJB3 just delegates the service creation to the MBeanServer and does nothing special. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265742#4265742 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265742 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Lookup for a session bean if only the interface is given
I'm trying to integrate Jersey with JBossAS. Jersey is an implementation of JAX-RS, and we want to compare RESTEasy and Jersey. However, Jersey resolves @EJB only for Glassfish. Therefore, I have to implement a class as follows: | import java.lang.reflect.Type; | ... | @Provider | public class EJBProvider implements InjectableProvider { | ... | public Injectable getInjectable(ComponentContext componentCtx, EJB ejb, Type type) { | if (!(type instanceof Class)) | return null; | Class clazz = (Class) type; | String interfaceName = clazz.getSimpleName(); | ... | Object obj = ...; // the session bean being referenced: How to get it? | | return new Injectable() { | public Object getValue() { | return obj; | } | }; | } View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265604#4265604 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265604 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to load external parameters in ejb?
I think, res-ref-name>CF.1 is not bound. When i lookup my connection factory with "java:comp/env/CF.1", jboss will search for resource with that name and will "return" the real jndi in my case "java:/CF.1" and that jndi will be used to lookup my connectionfactory (which i can see from the jndi view is bound). So i assume that the res-ref-name not used properly. Is there any way to see in the jmx console those res-ref-names, or something? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265544#4265544 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265544 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: How to load external parameters in ejb?
Yes, excuse me, i forgot to rename the second bean. That is not the problem. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265540#4265540 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265540 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: JBoss 4.2.1 RemoteEJB Lookup ClassCastException
anonymous wrote : com.thesearchagency.mms.service.user.UserException: Non matching type for inject of field: com.these | archagency.mms.service.customization.ICustomizationRemote com.thesearchagency.mms.service.user.impl. | UserEJB.theCustomizationService for type: $Proxy220 of jndiName env/com.thesearchagency.mms.service. | user.impl.UserEJB/theCustomizationService | intfs: , com.thesearchagency.mms.service.customization.ICustomizationRemote, org.jboss.ejb3.JBossPro | xy, javax.ejb.EJBObject; nested exception is: | java.lang.RuntimeException: Non matching type for inject of field: com.thesearchagency.mms.service. | customization.ICustomizationRemote com.thesearchagency.mms.service.user.impl.UserEJB.theCustomizatio | nService for type: $Proxy220 of jndiName env/com.thesearchagency.mms.service.user.impl.UserEJB/theCu | stomizationService | intfs: , com.thesearchagency.mms.service.customization.ICustomizationRemote, org.jboss.ejb3.JBossPro | xy, javax.ejb.EJBObject | As suspected, it's the similar to what we fixed as part of EJBTHREE-1889 for AS-5. anonymous wrote : | Also if this is a bug is there any way to patch it in a JBoss 4.2.1.GA environment? The 4.x community branch is way too old and is no longer being developed. The code too is vastly different from the current state. The possible options are: 1) Upgrade to latest 5.1.0 AS and you start using the EJB3 plugins 2) Checkout AS 4.x branch from source and then you will have to manually create the patch and build the AS. 3) If you have a support contract with the enterprise edition of AS (the EAP version), you can always file a ticket and the issue will be fixed in the enterprise edition branch and will be made available to you. anonymous wrote : | So I am assuming this is a bug in JBoss 4.2.1 and Remote EJB calls from a client are not possible... ? Remote calls are possible. The problem you are running into is that you have isolated your deployments and are packaging the EJB interfaces in each deployment (a valid case, btw). The proxy being bound is JNDI uses a different classloader (corresponding to deployment A) and the injection/lookup happens using a different classloader (corresponding to deployment B) and hence the classcast exception. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265533#4265533 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265533 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0 Users] - Re: Lookup for a session bean if only the interface is given
What exactly are you trying to do? Maybe there's a better way to do that. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265528#4265528 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265528 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user