Maven 3 + JavaFX 2 + EJB 3.1 + JBoss AS 7. Is this possible?
Good afternoon guys I'm new in the forum, and I'm studying recently JavaFX 2.
My question is: Is it possible to create an application JavaFX 2 and make it available in a JBoss 7 application server?
I'm doing some tests of architecture (a simple login), and this is my structure, I'll need JBoss 7 as server, EJB 3.1 for the business layer and as Maven dependency management. If the JFX not fit this scope, I will need to change the view layer technology.
So what I did do, was the integration of JavaFX 2 with EJB 3.1 (@EJB) and maven, all right here.
The problem is that when I put the module in order to deploy jboss, the following message appears in jboss log:
*"java.lang.ClassNotFoundException: javafx.application.Application"*
The structure consists of:
- a jar with the business logic layer and the model / database access;
- a jar with a client application in JavaFX.
These jars are in the "deployments" from JBoss and when JBoss starts, it creates these jars and provides as modules.
The business jar starts and it becomes available, but the client does not , giving the above message.
Note: The same structure works with JSF 2, the only difference therefrom is that the jar is replaced by a customer client war.
Could someone give me a help or light on this situation?
Perhaps some possible outputs for this situation, I do not know if this is the best practice, but in order to use separate jars, is able to make an application that can be modified in parts, not needing to re-deploy a complete application, every time that a change is made.
Thank you.
Thanks for posting a link to the TreeGrid control you are using, this greatly helps in understanding the context.
Also thank you for the feedback.
The functionality of the TreeGrid is significant and the effort involved in implementing something like that native to JavaFX would be substantial, hence I understand why you want to embed it in a WebView. It amazes me that people go to such effort to build html controls of such complexity.
Evaluating JavaFX performance with TreeGrid is mostly evaluating just the WebView component. rather than JavaFX as whole. WebView is just one part of JavaFX. I assume you know that already and have likely tested other features. Using TreeGrid as a benchmark is reasonable if you need to create JavaFX clients with embedded WebView that renders TreeGrid or similar very rich html components.
I tried running the TreeGrid off the TreeGrid site.
From a few quick tests, most of the generated TreeGrids seemed to work fine.
Startup of the TreeGrid was slow (maybe 10 seconds) before the page rendered vs about 2 seconds in Firefox. Performance of WebView in general is not too bad at the moment and is comparable with the major browsers for most tasks (see http://stackoverflow.com/questions/10762979/performance-of-webview-in-javafx). There exist some particular operations which obviously bottleneck it sometimes when stressed and I guess TreeGrid uses some of those.
Some functions of the TreeGrid did not work because JavaFX WebView does not natively support them.
Support for these functions should be added at a later stage, for other functions support will likely never be added.
For example,
- some of the combo box options embedded in the TreeView were displayed sequentially rather than in a dropdown as on Firefox.
- the Gannt Chart project schedule did not render (likely because it makes use a bdo tag which is not yet supported).
- tables embedding Adobe Flash and Silverlight components did not render those because WebView does not (and probably won't ever) support those plugins.
- printing of the TreeGrid is not supported (printing is being added to JavaFX in a future release).
- trying to display some tables even generated jvm crashes - which is unfortunate.
Taking all of the above together, really if you app required a TreeGrid, I would agree with you that it would be best not to display it in a WebView as WebView is not quite mature enough to handle it (perhaps in a couple more releases it will be). Instead, what I would do is just use a HostServices.showDocument call to display the TreeGrid in the system web browser and use JavaFX for other parts of the app as appropriate.
http://docs.oracle.com/javafx/2/api/javafx/application/HostServices.html#showDocument%28java.lang.String%29
Could be web (war), attach a jar in a web application (shell), is ugly hack.I was just advocating not placing the JavaFX application in a war because it is then deployable against a standard web server or off the file system rather than on a war aware web application server and is because it is easier to describe for troubleshooting because there is one less packaging step to go wrong. But there is nothing stopping you placing the jnlp, html, app jar and dependent jars inside a war and serving the war containing those contents from your java web application server if you wanted to do it that way.
Could be compatible with Maven natively, or at least be less sufferable to implement using Maven.Yeah, quality maven integration support is lacking . . . could definitely be improved with time and effort.
It would be nice to see an independent 3rd party implementation of an open source javafx specific maven plugin, but nobody has yet and the JavaFX deployment team has been too busy implementing other (important) features such as the ant packaging tasks, native packaging support and deployment support across all supported platforms and configurations to undertake this (which is understandable to me).
The JavaFX could have a TreeTable with such features as this Treegrid.Yep, that would also be a good thing . . . could definitely be added with time and effort.
Probably this could be done as a 3rd party control or project like the jgoodies stuff for swing: http://www.jgoodies.com/.
JavaFX has failed the test . . . JavaFX could be a web development language for enterprise software.For some organizations, some application types, some functions and some processes (e.g. organizations which rely solely on Maven, make use of highly complex html apps like TreeGrid or Google HTML Apps, applications which are mainly document based like a news site, applications that require printing/webcam support, organizations where the skill base is solely html and very little java, or only server side java skills and no client side java development, etc) - then a 100% javafx based solution would not be the way to go. However, that does IMO leave a still large (and growing) number of enterprises and enterprise applications which could potentially benefit greatly from JavaFX based technology. It will be interesting to see if other Oracle groups outside the JavaFX team also come to that conclusion.
For further perspective, I highly recommend reading: http://fxexperience.com/2012/06/javafx-the-10000-foot-view/
Sample code I used to run tests on TreeGrid.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class TreeGridView extends Application {
public static void main(String[] args) { launch(args); }
@Override public void start(Stage stage) {
WebView webview = new WebView();
webview.getEngine().load("http://www.treegrid.com/treegrid/www/");
stage.setScene(new Scene(webview));
stage.show();
}
Similar Messages
-
How to access EJB deployed in JBOSS 4 from Creator
Hello.
I am trying to access EJBs deployed on JBOSS in order to develop a web app client, when I import the EJB set from Creator (sessions and entities packages in a jar file) I got the following error message....."No EJB set found in file....." .
I presume there is an kind of xml file description specific for Sun App Server missing. I would like to know if there is other way to expose EJB in creator?....maybe write a config file by hand.
I already read the tutorials related to EJB but those only use pre build EJB jars for Sun App Sserver.
Also I read all the posted about JBoos and EJB in this forum but those are pretty general.
By the way I have Delegate classes to access the EJB. How do I register my delegates in Creator in order to expose their methods?
I�ll really appreciate some light in this matter.
Thanks in advance!!!Hi,
The below forum thread may help you :
http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=51321
Thanks,
Runa. -
OSB calling EJB on JNP(JBoss) protocol
Hello
I'm trying create a JNDI Provider on OSB to call an EJB on a JBoss Application server on the JNP protocol, but when i try to call/test it, I get this error:
java.net.UnknownHostException: Unknown protocol: 'JNP'
I read on documentation: "You can use any protocol, for example, http, https, t3, t3s, iiop, iiops"
Can I use just it? or no?
Thanks.
Leonardo
Edited by: lmfantinel on 21/10/2009 10:19we can use any of the protocols listed in the documentation at http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/global_resources.html. Other protocol like ormi,jnp etc don't have out of box support. Such use cases will require using iiop if possible.
two cents
Manoj -
Hi,
Currently I am working on EJB 3 and JBoss 5. I am new to this kind of environment. Now the present application is running on different platform. Basically when the customer/shop owner swipes a card in POS system we get message. Now I need to listen existing port and need to get that message then process it through using EJB3. We are not using servlets. JSP's , JMS.
Is there anyway to start a thread to listen on port when the EJB is deployed? or Is there anyway to listen on port using JBoss or EJB?
What is the best way to do it?
Thanks in advance.
Bachi.Yeah we can do that. In fact I tried it and it worked but as a stand alone application. I need to make sure that listens on the port when the application server starts or when the ejb is deployed. That is the problem here. In my first question I mentioned that we are not using JSP's right if there is any solution through servlets or JSP's I would like to use them.
Here is the program which runs as standalone. Unfortunately I got this program from online :)
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.ServerSocket;
import java.net.Socket;
public class BeanSocket implements Runnable {
private Socket connection;
private String TimeStamp;
private int ID;
Runnable runnable;
BeanSocket(Socket s, int i) {
this.connection = s;
this.ID = i;
public static void main(String args[]){
int port = 19999;
int count = 0;
try {
ServerSocket socket1 = new ServerSocket(port);
System.out.println("MultipleSocketServer Initialized");
while (true) {
Socket connection = socket1.accept();
Runnable runnable = new BeanSocket(connection, ++count);
Thread thread = new Thread(runnable);
thread.start();
} catch (Exception e) {
public void run() {
try {
// need to wait 10 seconds to pretend that we're processing
// something
try {
Thread.sleep(1000);
} catch (Exception e) {
e.printStackTrace();
TimeStamp = new java.util.Date().toString();
String returnCode = "MultipleSocketServer repsonded at " + TimeStamp + (char) 13;
BufferedOutputStream os = new BufferedOutputStream(connection.getOutputStream());
OutputStreamWriter osw = new OutputStreamWriter(os, "US-ASCII");
osw.write(returnCode);
osw.flush();
} catch (Exception e) {
System.out.println(e);
} finally {
try {
connection.close();
} catch (IOException e) {
}Edited by: bachi. on Jun 28, 2009 12:00 PM
Edited by: bachi. on Jun 28, 2009 12:02 PM -
Is this possible: images from 9i through ejb physically embedded in jsp
I am trying to determine whether this is possible...
I would like to store a number of images in an Oracle 9i db in CLOB/BLOB
fields. So far everything is ok. Now for the fun part.
Using an EJB I would like to retrieve the image, and embed it in a JSP page,
contents and all. Rather then the image physically being downloaded as a
separate resource, I'd like to embed the contents right in the document. Is
this possible via the object html tag, or some other tag - has anyone done
anything like this? Although the image would be embedded, I would like it
to display as normal in the browser. Please help! In the end, I'd be
looking for a file like:
<body>
<h2>below is the image</h2>
<object params>1294574599445BE3049AAACCEDDAAFFF023...etc</OBJECT>
<h2>above is an image being displayed by the browser</h2>
</body>
It seems like a pretty nutty thing to do, but we have a few requirements,
and large enough connect/teardown time to make it worthwhile if its
possible. Any ideas as to whether this is doable?
Thanks,
ChrisHi Chris,
You may use ServletResponse to setContentType to
image/jpeg
image/gif
image/ief
image/tiff
And then write corresponding binary image data to the stream.
Corresponding tag in the html page could look like
<img src="http://my/image.jsp"/>
Hope this helps,
Slava Imeshev
"Chris Hettinger" <[email protected]> wrote in message
news:[email protected]..
I am trying to determine whether this is possible...
I would like to store a number of images in an Oracle 9i db in CLOB/BLOB
fields. So far everything is ok. Now for the fun part.
Using an EJB I would like to retrieve the image, and embed it in a JSPpage,
contents and all. Rather then the image physically being downloaded as a
separate resource, I'd like to embed the contents right in the document.Is
this possible via the object html tag, or some other tag - has anyone done
anything like this? Although the image would be embedded, I would like it
to display as normal in the browser. Please help! In the end, I'd be
looking for a file like:
<body>
<h2>below is the image</h2>
<object params>1294574599445BE3049AAACCEDDAAFFF023...etc</OBJECT>
<h2>above is an image being displayed by the browser</h2>
</body>
It seems like a pretty nutty thing to do, but we have a few requirements,
and large enough connect/teardown time to make it worthwhile if its
possible. Any ideas as to whether this is doable?
Thanks,
Chris -
EJB 3.0 & JBoss -- How to run a SLSB in JBoss
Hi All,
I am having trouble running an EJB 3.0 SLSB on JBoss AS. I have also tried those specified by others in their cases but havent been able to solve mine. The ejb-jar file is deploying nicely in the server without any errors but I do find that jar files of aspect are not being deployed (the trace is avbl at the end). Have they got to do anything with this?
I dont know whether I am missing anything or something that has been overlooked. Please diagonise this.
JBoss AS 4.0.4 GA (installed using EJB 3.0 option)
JDeveloper 10.1.3 (updated)
Local
@Local
public interface TestStateLessLocal {
SLSB
@Stateless(name="TestStateLess")
@LocalBinding(jndiBinding="TestStateLess")
public class TestStateLessBean implements TestStateLessLocal {
public TestStateLessBean() {
System.out.println(">>> In the bean constructor");
Client Prg
public class SLSBClient {
public SLSBClient() {
try {
Hashtable env = new Hashtable();
env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
env.put("java.naming.provider.url", "jnp://localhost:1099");
Context ctx = new InitialContext(env);
System.out.println("Context created");
ctx.lookup("java:comp/env/ejb/TestStateLessLocal");
System.out.println("Success");
catch (Exception ex) {
System.out.println("... EXCEPTION THROWN ...");
ex.printStackTrace();
public static void main(String[] args) {
SLSBClient sLSBClient = new SLSBClient();
jboss.xml
<session>
<ejb-name>TestStateLess</ejb-name>
<local-jndi-name>TestStateLess</local-jndi-name>
</session>
Exception Trace
javax.naming.NameNotFoundException: comp not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at SLSBClient.<init>(SLSBClient.java:18)
at SLSBClient.main(SLSBClient.java:29)
Process exited with exit code 0.
Trace in JBoss when starting the server
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@5b9bf3f3 { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/base-aop.xml }
deployer: org.jboss.aop.deployment.AspectDeployer@4ac216
status: Created
state: CREATED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/base-aop.xml
altDD: null
lastDeployed: 1151050772890
lastModified: 1151050772890
mbeans:
org.jboss.deployment.DeploymentInfo@24ac8a8b { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/jboss-aop.jar }
deployer: org.jboss.deployment.JARDeployer@7a1576
status: Created
state: CREATED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/jboss-aop.jar
altDD: null
lastDeployed: 1151050773171
lastModified: 1151050772984
mbeans:
org.jboss.deployment.DeploymentInfo@36b91a6d { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/jboss-aspect-library.jar }
deployer: org.jboss.deployment.JARDeployer@7a1576
status: Created
state: CREATED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/jboss-aspect-library.jar
altDD: null
lastDeployed: 1151050773281
lastModified: 1151050773203
mbeans:
org.jboss.deployment.DeploymentInfo@baf16a1f { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/trove.jar }
deployer: org.jboss.deployment.JARDeployer@7a1576
status: Created
state: CREATED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/trove.jar
altDD: null
lastDeployed: 1151050773406
lastModified: 1151050773312
mbeans:
org.jboss.deployment.DeploymentInfo@c84cee44 { url=file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/ }
deployer: org.jboss.deployment.SARDeployer@5dd582
status: Deployment FAILED reason: Trying to install an already registered mbean: jboss.aop:service=AspectManager
state: FAILED
watch: file:/D:/JBoss/server/default/deploy/jboss-aop.deployer/META-INF/jboss-service.xml
altDD: null
lastDeployed: 1151050773406
lastModified: 1150602082358
mbeans:
Any help would be greatly appreciated.
Thanks & Regards,
Hans.Hi Prasanth,
Thank you for responding. Checked out the link. As per the steps listed, I added the jar files and tried looking up as mentioned. However, I am not able to find the session bean registered in JNDIView. I am attaching the trace. Could you please check that out.
Thanks & Regards,
Hans.
Trace in JMX Console
java: Namespace
+- jaas (class: javax.naming.Context)
| +- other (class: org.jboss.security.plugins.SecurityDomainContext)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
+- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- comp.ejb3 (class: javax.naming.Context)
| NonContext: null
+- JBossCorbaNaming (class: org.omg.CosNaming.NamingContextExt)
+- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
+- TransactionManager (class: org.jboss.tm.TxManager)
+- JBossCorbaPOA (class: org.omg.PortableServer.POA)
+- MSSQLDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- JBossCorbaInterfaceRepositoryPOA (class: org.omg.PortableServer.POA)
+- Mail (class: javax.mail.Session)
+- JBossCorbaORB (class: org.omg.CORBA.ORB)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- comp (class: javax.naming.Context)
Global JNDI Namespace
+- HASessionState (class: org.jnp.interfaces.NamingContext)
| +- Default (class: org.jboss.ha.hasessionstate.server.HASessionStateImpl)
+- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy47 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| +- rmi (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
+- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- TestStateLess (proxy: $Proxy74 implements No ClassLoaders found for: TestStateLessLocal (no security manager: RMI class loader disabled))
+- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- UserTransactionSessionFactory (proxy: $Proxy57 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
+- invokers (class: org.jnp.interfaces.NamingContext)
| +- soumitri (class: org.jnp.interfaces.NamingContext)
| | +- iiop (class: org.jboss.invocation.iiop.IIOPInvoker)
+- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
+- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax.naming.LinkRef)
+- HAPartition (class: org.jnp.interfaces.NamingContext)
| +- DefaultPartition (class: org.jboss.ha.framework.server.HAPartitionImpl)
+- topic (class: org.jnp.interfaces.NamingContext)
| +- testDurableTopic (class: org.jboss.mq.SpyTopic)
| +- testTopic (class: org.jboss.mq.SpyTopic)
| +- securedTopic (class: org.jboss.mq.SpyTopic)
+- queue (class: org.jnp.interfaces.NamingContext)
| +- A (class: org.jboss.mq.SpyQueue)
| +- testQueue (class: org.jboss.mq.SpyQueue)
| +- ex (class: org.jboss.mq.SpyQueue)
| +- DLQ (class: org.jboss.mq.SpyQueue)
| +- D (class: org.jboss.mq.SpyQueue)
| +- C (class: org.jboss.mq.SpyQueue)
| +- B (class: org.jboss.mq.SpyQueue)
+- console (class: org.jnp.interfaces.NamingContext)
| +- PluginManager (proxy: $Proxy49 implements No ClassLoaders found for: org.jboss.console.manager.PluginManagerMBean (no security manager: RMI class loader disabled))
+- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
+- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming.LinkRef)
+- EventDispatcher (class: org.jboss.ws.eventing.mgmt.DispatcherDelegate)
+- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
+- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory) -
BC4J datatags, EJB dpeloyed in JBoss
Is it possible to use BC4J JSP datatags to connect to an application module deployed as an EJB Session Bean in JBoss?
I'm struggling to get this to work. Any advice is appreciated. I've read some of the HOW-TOs, etc, but they do not discuss using the BC4J datatags specifically.
Thanks very muchYou can have a look at the following link
http://otn.oracle.com/products/jdev/howtos/appservers/deploy_bc4j_to_jboss.html
Regards,
Anupama -
Read this : ejb , cocoon and jboss
Integrating cocoon with jBoss
Download cocoon-war-2.1.7.war and then we have to deploy that to the jboss server , to deploy that , we started jboss server in standard mode and then copied the cocoon war file to /usr/local/jboss-4.0.0/server/standard/deploy/ folder and in the server console we got the message saying that the perticular war file is being deployed .Then run the cocoon home page using http://localhost:8080/cocoon-war-2.1.7/ .
Deploying ejb in cocoon
To deployment ejb in cocoon you should have an ejb container , so we have to integrate ejb with any application server , here we are using jBoss server. Here i'm using a js (java script ) file to invoke an ejb client , i'm using the command
var query = new Packages.hibernate.logging.Query();
where hibernate.logging is the package and Query is the bean's client , and Packages is the inbuilt keyword for accessing packages. Then from the client you can call the bean class as we normally calling the bean. If you are using data base in the bean you have to configure the cocoon.xconf file as
<datasources>
<jdbc logger="core.datasources.personnel" name="personnel">
<pool-controller max="10" min="5"/>
<dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
<user>sa</user>
<password/>
</jdbc>
<jdbc name ="hibernatedbds">
<pool-controller min = "5" max = "10" />
<dburl>jdbc:postgresql://192.168.0.129:5432/hibernatedb</dburl>
<user>xxxxx</user>
<password/>
</jdbc>
and in the bean calss we can access the database as
public String xxxxxxx(String user, String password,Session session) throws RemoteException
try
if(session == null)
System.out.println("Session is null");
Transaction tx = session.beginTransaction();
org.hibernate.Query q = session.createQuery("from hibernate.logging.User as user where user.users = :users and user.password = :passwords");
q.setString("users",user);
q.setString("passwords",password);
List list = q.list();
tx.commit();
if(list.isEmpty())
return "false";
catch(Exception e)
e.printStackTrace();
System.out.println("Called EJB");
return "true";
and in the client program we'll give
String value = remote.Validate(user,password,session);
to access the remote method
when the program is ready and compiled create the jar file and then deploy it to the deploy folder of jboss and a copy od the same jar file to the cocoon/WEB-INF/lib/. Then you can run the program .And ? What happens next?
Gosh! That suspense is killing me... -
Hi ,
I am able to successfully deploy the .ear file in Jboss ..but when i try to call the Entity Bean ...i get the following Exception on JBoss Server Console :
18:15:42,595 INFO [STDOUT] javax.ejb.CreateException: Error checking if entity exists:com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near 'WHERE'.
This is giving me a lot of pain ..can anyone suggest me is something i am missing ?
I would appreciate for Ur feedback .
Thankstopic"virtual routing network emulation framework"http://www.google.com/search?q=virtual+routing+network+emulation+framework&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official
-
Hello,
I've been using SUN's RI for developing/deploying EJBs, but of late have decided to move to Jboss. In Jboss do we have any deploy tool as in the RI ? Despite having checked out some documentation, I still haven't found an easy way of deploying EJBs on Jboss. Any help/pointers will be appreciated.
thanks,LOL! I wonder if he prefaces all of his repsonses with "Are you stupid or what?". Willing to bet he has it mapped to F1 on his keyboard. Not to say that JBoss deployment isn't trivial; it is trivial, but I can see a newbie overlooking the instructions the first time they leaf through the manual.
-
JavaFX EJB 3.1 with Netbeans and GlassFish v3
Hi everyone.
I'm searching for a solution to connect my JavaFX WebApplication with EJB's.
It seems there is no information in the Web.
Basicly, is it possible?
has anyone a link or a small running example?
How can i deploy a JavaFX Application into an Enterprise Application.
Thanks for your response
Kind RegardsSince you can use regular java from javafx, it's not too difficult. Keep in mind javafx is more like a swing application than a servlet or jsp. It's an important factor when deciding how you want to connect. There are a couple options:
EJBs and the ACC
I'm sure it's possible to get the Glassfish ACC (application client container) integrated in some way, but haven't actually done it. I don't think it's a good solution for javafx since it it uses an extra port (3700 by default) for RMI communication. However, depending on your requirements, it may be a possibility.
REST
I'm fairly sure this will be the preferable approach for javafx and writing REST like services using Glassfish 3.1 is very easy. It's mostly annotation based. There's lots of documentation around the we for writing REST like services for Glassfish and I've seen several examples of how to consume those services in javafx. I don't have any links handy, so you'll have to do a bit of googling.
Most of the documentation about connecting a swing application to Glassfish is still relevant for javafx. I know you were looking for code samples, but I haven't seen many (or any) on the topic. Hopefully my info is enough to get you started.
Good luck,
Donald McRonald -
Error at the time of Deploying EJB jar on JBoss
Hi:
I am going to create web service using EJB3.0.
But at the time deploying file on JBOss i am getting following error:
12:22:51,856 ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/home/crayom/projects/tools/jboss-5.0.0.CR2/server/default/deploy/TempConvert.jar state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/home/crayom/projects/tools/jboss-5.0.0.CR2/server/default/deploy/TempConvert.jar
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:175)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
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:627)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:265)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:143)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:544)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at org.jboss.wsf.common.JavaUtils.getPackageName(JavaUtils.java:533)
at org.jboss.ws.metadata.wsdl.WSDLUtils.getTypeNamespace(WSDLUtils.java:700)
at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.processWebService(JAXWSWebServiceMetaDataBuilder.java:313)
at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:107)
at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3.buildMetaData(JAXWSMetaDataBuilderEJB3.java:76)
at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.start(UnifiedMetaDataDeploymentAspect.java:70)
at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.start(DeploymentAspectManagerImpl.java:144)
at org.jboss.wsf.container.jboss50.BareWSFRuntime.start(BareWSFRuntime.java:66)
at org.jboss.wsf.container.jboss50.deployer.AbstractDeployerHookEJB.deploy(AbstractDeployerHookEJB.java:48)
at org.jboss.wsf.container.jboss50.deployer.AbstractWebServiceDeployer.internalDeploy(AbstractWebServiceDeployer.java:60)
at org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB.internalDeploy(WebServiceDeployerEJB.java:115)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
... 18 more
12:22:51,897 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** CONTEXTS IN ERROR: Name -> Error
vfszip:/home/crayom/projects/tools/jboss-5.0.0.CR2/server/default/deploy/TempConvert.jar -> java.lang.StringIndexOutOfBoundsException: String index out of range: -1So, can any body tell me the solution of this problem?
Thank You.AnupDesai wrote:
Hi:
After adding require packages also i am getting the same error.
Well, if it's not a version problem with either the JDK (installing java 6 on top of a java 5 distribution) or the Jars (like JAXB) , then , as pointed out, you might have written your Web service using a packageless class:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1938)
at org.jboss.wsf.common.JavaUtils.getPackageName(JavaUtils.java:533)Restart a new project in your IDE with a packaged ws from the start, and see if it works. -
Hi. I'm in a class developing a BMP Entity EJB. I deployed the
bean, whose functionality does simple insert, update, delete
from one table. I created a test client to run from the command
line which works for the create (it inserts a row into the
database). I run SQLPLUS to confirm this.
I then go in to the database through SQL PLUS and delete the row
and commit.
Then I RERUN the test client and the application gives me an
javax.ejb.DuplicateKeyException . Should this happen? When I
look in the database, the ejbCreate is called because the row is
inserted back in, so that much works, but for some reason the
exception is called. Anybody have an idea?
Thanks - MattFigured it out thanx to the instructor. Apparently OC4J sets an
EJB setting in the orion-ejb-jar.xml file.
Under <entity-deployment>,
you need to set exclusive-write-access = "false"
The current default is "true"
The default of "true" basically assumes the EJB is the only way
to access the data in the database, so it gives better
performance since data is cached. However, if your application
is used in a distributed environment where you have other
applications working with the data (i.e. Developer App, or
SQLPLUS), then you will want to set this field to "false". -
Identity Server using external LDAP
anyone have idea whether ID Server can use external an LDAP server for authentication, like the Policy Server in Portal Server 3 ?
Wilson.You typically need to use our JNDI store. We strongly recommend this for
performance reasons..
You can use the JNDI To LDAP bridge which is available from the sun web
site.
Michael Girdley
BEA Systems Inc
"Jack Archer" <[email protected]> wrote in message
news:[email protected]..
I'm trying to find out if it is possible to re-direct JNDI calls to the WL
server to an external LDAP server. I know you can install an external LDAP
server for security purposes, but I would like to use an external LDAP
server to handle all JNDI lookups (like for JNDI EJB name location, etc.).
Is this possible? -
Using external LDAP server for WL JNDI lookups
I'm trying to find out if it is possible to re-direct JNDI calls to the WL
server to an external LDAP server. I know you can install an external LDAP
server for security purposes, but I would like to use an external LDAP
server to handle all JNDI lookups (like for JNDI EJB name location, etc.).
Is this possible?You typically need to use our JNDI store. We strongly recommend this for
performance reasons..
You can use the JNDI To LDAP bridge which is available from the sun web
site.
Michael Girdley
BEA Systems Inc
"Jack Archer" <[email protected]> wrote in message
news:[email protected]..
I'm trying to find out if it is possible to re-direct JNDI calls to the WL
server to an external LDAP server. I know you can install an external LDAP
server for security purposes, but I would like to use an external LDAP
server to handle all JNDI lookups (like for JNDI EJB name location, etc.).
Is this possible?
Maybe you are looking for
-
Hi Sap gurus, I am facing one issue in pricing. I am getting this error in my effective pricing condition. "Inactive via formulae of incorrect". Can any body please give me some lights on the issue? Thanks. chetali
-
SECURITY CODE CHANGED IN NOKIA 5300 XPRESSMUSIC
Hey everybody, this is my damn NOKIA 5300 XpressMusic and dont know who changed the security code. Now I m getting 1dum tension, please help me. None of the following gets me off the problem: I need a security code to switch off to switch ON/to enter
-
Can I log out of icloud without losing information and pictures?
Can I log out of Icloud without losing pictures and info?
-
All of a sudden, we find that users configured in MSAD cannot access workspace, planning or any other component. when they try to do that, the error they get is: "You must supply a valid username & password to log onto the system" In Hyperion/logs/wo
-
WRT300N - Suddenly disconnected from internet
I have WRT300N which was configured and working well in a DSL connection - without login/password. Suddenly from 15 days back, i lost the connection. The IP address is assigned to my computer and wifi equipments (198.162.1.1 ...), as well as the In